SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 9.1.276 Pro] - DECLARE @variable + scalar function

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 9.1.276 Pro] - DECLARE @variable + scalar function
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [SA 9.1.276 Pro] - DECLARE @variable + scalar function Reply with quote
SQL Server allows declaring a value and adding a value at the same time, it even allows using user defined functions like this:
Code:

DECLARE @alap_jarat_tipus int = dbo.GetAlapJaratTipus(), @datum date = GETDATE();


In this case GetAlapJaratTipus is a scalar function. If I start typing GetAlap after '=' the popup contains and lets me select GetAlapJaratTipus and puts 'dbo.GetAlapJaratTipus' into the code. But this only works if I need a function in my default schema as schemas do not appear in the popup. If I type 'dbo' (or any other schema name) the schema is not shown, therefore it cannot allow expanding it to filter further. Also, if I type 'dbo' (or any other schema) followed by '.' the popup no longer shows scalar functions, it only contains tables, views, and table functions, none of which qualify as valid on the right side of an assignment operator for a declared variable.
Tue May 16, 2017 4:10 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
Design by Freestyle XL / Flowers Online.