Viewing 15 posts - 5,926 through 5,940 (of 7,185 total)
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
Someguy (5/2/2008)
Wrong: The things for which XML is useful are make it VERY useful. It provides a standard for inter-system communication that allows developers to avoid re-inventing the wheel for...
May 2, 2008 at 8:51 am
If it's a complex query then it's possible that most of those 30 seconds are taken compiling a new execution plan. This would explain why it takes 30 seconds...
May 2, 2008 at 8:37 am
Rob
I think your first query is actually equivalent to this:
SELECT mpe.din, mpe.pkgsize, mp.client, mc.active
FROM
...
May 2, 2008 at 8:32 am
Or this one, which uses less string manipulation, but does contain dynamic SQL:
--Data
declare @table table(col1 varchar(5), col2 varchar(200), col3 varchar(10))
declare @sql varchar(1000)
INSERT INTO @table VALUES ('Mut1',
'AZ5397UA9,AZ539CYK2,AZ54022Z3,AZ8040BQ1,AZ0442BB0,AZ2404AW1,AZ307TAD0,AZ442FAE8,AZ442FAQ1,AS490FAV1',
'Credit1')
INSERT INTO @table VALUES ('Mut2',
'AZ5397UA9,AZ539CYK2,AZ54022Z3,AZ8040BQ1,AZ0442BB0,AZ2404AW1,AZ307TAD0,AZ442FAE8,AZ442FAQ1,AS490FAV1',
'Credit2')
SET...
May 1, 2008 at 9:23 am
The only way to know is to test it, I'm afraid. The outer join issue was just an example: there are many more pieces of code that work in...
May 1, 2008 at 7:36 am
Click on the Jobs folder in SQL Server Management Studio. In the Object Explorer Details window, select all of the jobs. Right-click, and choose Script Job As ->...
May 1, 2008 at 7:25 am
Viewing 15 posts - 5,926 through 5,940 (of 7,185 total)