SESSION_USER function
dan67890
Posts: 21
SQL Prompt adds a () to SESSION_USER when it inserts it like so:
DECLARE @su NVARCHAR(128)
SET @su = SESSION_USER() -- SQL Prompt added the ()
However SESSION_USER() generates a syntax error. SESSION_USER has to be used without the () like
DECLARE @su NVARCHAR(128)
SET @su = SESSION_USER -- this works
Dan
DECLARE @su NVARCHAR(128)
SET @su = SESSION_USER() -- SQL Prompt added the ()
However SESSION_USER() generates a syntax error. SESSION_USER has to be used without the () like
DECLARE @su NVARCHAR(128)
SET @su = SESSION_USER -- this works
Dan
Comments
I'm afraid that this is a bug in the current version of SQL Prompt. Unfortunately we treat all functions the same, regardless of whether they take parameters or not. I have raised this problem internally and would hope that it will get sorted out in the next release.
Many thanks, Tom