Red Gate forums :: View topic - Table function column names beginning with an @
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

Table function column names beginning with an @

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
rhodrie



Joined: 28 May 2012
Posts: 3

PostPosted: Fri Apr 04, 2014 11:15 am    Post subject: Table function column names beginning with an @ Reply with quote

Code:
CREATE FUNCTION fn_MyQuery ()
RETURNS TABLE AS RETURN
(SELECT 'test' [@Attribute], 'element' [Element]);
GO
SELECT  fn_m.* FROM fn_MyQuery() fn_m
FOR XML PATH ('Test'), TYPE, ELEMENTS


In the above example SQL Prompt (6.1.0.67) identifies fn_MyQuery as having one parameter @Attribute, returning a single column Element.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 190
Location: Red Gate Software

PostPosted: Fri Apr 04, 2014 2:39 pm    Post subject: Reply with quote

Hi rhodrie,

Thanks for reporting this, I can recreate it here and will look into a fix for you. Seems like we pull down the columns and parameters in a single query and then differentiate them based on if they start with an '@', which clearly doesn't work in this case!

Thanks,
Aaron.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 190
Location: Red Gate Software

PostPosted: Mon Apr 07, 2014 5:07 pm    Post subject: Reply with quote

I think I've got a fix for this. Unfortunately it just missed out on making our 6.3 release which we're currently in the process of release testing, but I've made a private build for you and the fix will be included in a future release of prompt.

Thanks again for reporting it!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group