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.
| Author |
Topic |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-05-26 : 11:23:56
|
| HI I have a security table that then is used by the SSRS and Silverlight reports.I have one user named Jeff and I want to now allow a second user named Gary to have the exact same reports as Jeff.How do I make such a copy?UserName CustomerNumber CustomerIDJeff NM01 21Jeff F01 22Jeff NADC01 7Jeff NG01 8Jeff NM01 9Rich bhcc02 28Jeff NMMC01 11Jeff NMMC02 12Jeff NMR01 13Jeff NMR03 14Jeff Northern 15Jeff NR01 16Jeff NRH01 17Jeff NRH03 18Debra IAD01 19Debra IAH01 1Debra IAD01 20Debra IAH01 1Debra IAH01 2 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-26 : 11:27:24
|
Try:insert your_tableselect'Gary',CustomerNumber,CustomerIDfrom your_tablewhere UserName='Jeff' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-26 : 11:28:07
|
To see what will happen you can execute the select without the insert part. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-26 : 11:29:19
|
| insert into table(UserName ,CustomerNumber ,CustomerID)select 'Gary', CustomerNumber ,CustomerID from tablewhere username='Jeff'MadhivananFailing to plan is Planning to fail |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-26 : 11:32:18
|
quote: Originally posted by madhivanan insert into table(UserName ,CustomerNumber ,CustomerID)select 'Gary', CustomerNumber ,CustomerID from tablewhere username='Jeff'MadhivananFailing to plan is Planning to fail
Your refresh-button is damaged? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-26 : 11:33:14
|
Webfred is faster today MadhivananFailing to plan is Planning to fail |
 |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-05-26 : 12:21:36
|
| Yep, thanks again. |
 |
|
|
|
|
|
|
|