 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 9.1.276 Pro] - DECLARE @variable + scalar function |
|
SQL Server allows declaring a value and adding a value at the same time, it even allows using user defined functions like this:
 |
 |
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 |
|
 |
|
|
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
|
|
|