Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 GETUSERID()

Author  Topic 

cmccannm
Starting Member

5 Posts

Posted - 2008-12-12 : 11:30:14
How do i use the GETUSERID() function? I cannot find any examples of how this is used or what the syntax is.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-12-12 : 12:36:19
http://blogs.msdn.com/bobmeyers/archive/2006/03/24/560200.aspx
Go to Top of Page

cmccannm
Starting Member

5 Posts

Posted - 2008-12-15 : 12:19:35
Thank you for your reply! I appreciate any and all help!
I was trying to use it in a Reporting Services report. I thought I could use it to get the Domain account of the user attempting to run a report. Then I want to compare the Domain account to data in a table that would then return the divisions that the user has access to and show only those divisions in a report parameter dropdown. I tried using SUSER_SNAME() but that gives me the account that the Data Source is using and that is not what I need. Is there a different function that I could use in the T-SQL code in the data set for my report parameter?
Go to Top of Page

savior faire
Posting Yak Master

194 Posts

Posted - 2008-12-20 : 15:50:47
Interestingly, the MS Press Training Kit(70-445) text has one of the authors actual real life example of this exact issue. And the text has practice exercises that retrieve this value....

Talk sense to a fool and he calls you foolish.
Go to Top of Page
   

- Advertisement -