Viewing 15 posts - 5,926 through 5,940 (of 7,191 total)
But be careful if your INSERT..SELECT..UNION ALL... statement is very big or your transaction log is very small.
John
May 8, 2008 at 7:35 am
Please post your code.
Thanks
John
May 8, 2008 at 7:23 am
I think a better way would be to store the results of sp_helpsrvrolemember into a temp table, then LEFT JOIN syslogins to that so that you also get logins that...
May 8, 2008 at 6:50 am
OK, hopefully this should get you started. Please post again if there's anything you don't understand.
You can use ROW_NUMBER or RANK (read about both of them and decide which...
May 8, 2008 at 6:42 am
You're going to have to try harder than that if you want any of us to be able to help you. Please show us what you tried, and state...
May 8, 2008 at 3:56 am
Romakanta
I'm confused - you say VehicleID is unique, and then you say there are duplicates. Also, the word "consecutive" only has any meaning if you define how the rows...
May 8, 2008 at 3:54 am
You will need to use a LEFT JOIN so that you get all the logins, and not just the ones with server roles. The query you have written will...
May 8, 2008 at 3:41 am
I assume @parameter is a comma-separated list, or something similar? If that's the case, see Jeff Moden's article on "Numbers" or "Tally" tables for a solution to this.
http://www.sqlservercentral.com/articles/TSQL/62867/
John
May 8, 2008 at 3:26 am
bcronce (5/7/2008)
May 8, 2008 at 1:24 am
There may be a better way, but my first instinct would be to use CTEs (or further temp tables) to show (a) distinct combination of salesman and week (b) property...
May 7, 2008 at 9:49 am
And if, as you seem to suggest, the application only runs SELECT statements, deny INSERT, UPDATE and DELETE permissions to the login the application uses.
John
May 7, 2008 at 3:39 am
Integrity is more important than shaving a few milliseconds off your processing time. With your current design, what's to stop someone inserting a row such as this?
Corporate ...
May 7, 2008 at 1:48 am
Sorry, you're still not clear. What do you want to update the prices to? Do you want to update the price in all 5000 rows, or just those...
May 6, 2008 at 8:48 am
Try turning the subquery into a derived table and joining to it.
John
May 6, 2008 at 7:00 am
Viewing 15 posts - 5,926 through 5,940 (of 7,191 total)