November 17, 2004 at 8:58 pm
HI,
I want to get records based userid. I wrote query some thing like this. But i get this error when i try to run the report.
The expression for the query ‘Employee’ contains an error: [BC30648] String constants must end with a double quote.
My Query is
="SELECT Employee_ID, domain_login
FROM Employee where domain_login=user!userid"
Can any one help me with this??
Thanks,
November 19, 2004 at 3:25 am
Hi
Sorry for the stoopid question but what are you writing this in?
I've never seen the "user!userid" construct within T-SQL. Perhaps it's just something I've missed.
Sam
November 22, 2004 at 2:50 pm
Sam,
I'm creating report using Reporting Services.
November 22, 2004 at 2:50 pm
Anyway, i got it.
August 3, 2005 at 8:37 am
I am having the same problem - what was the answer?
I suspect a problematic embedded carriage return...
August 3, 2005 at 6:13 pm
Could be a type but the User!UserId need to be outside of the quoted dynamic sql string, probably should be quoted with single quotes if being passed to MSSQL (it's a character string) and also case sensitive i thought?
e.g. ="SELECT Employee_ID, domain_login FROM Employee where domain_login = '" & User!UserId & "'"
Your CR issue may be solved by either i) doing the statement as one long string (ugly at times) or using the .Replace(Chr(10), " ").Replace(Chr(13), " ") to replace the CR and LF's out with spaces.
Steve.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply