Viewing 15 posts - 5,941 through 5,955 (of 7,191 total)
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
If the application is properly written, so that it "identifies" itself to the SQL Server when it connects, then you can see all the connections from the application using the...
April 30, 2008 at 4:22 am
I think there's a column called HostName that you can filter on.
John
April 30, 2008 at 2:42 am
Well, you haven't given us any table DDL to go on, but after a cursory glance I would say that you should use an OUTER JOIN instead of an INNER...
April 29, 2008 at 9:36 am
This should work as well, and looks a bit neater:
SET @SQL = 'EXEC ' + @dbname + '.dbo.sp_MSForeachtable ''ALTER TABLE ? WHATEVER'' '
PRINT @SQL
John
April 29, 2008 at 7:36 am
nicolas.pages (4/29/2008)
Out of curiosity, don't you miss a blank in 'go'? --> ' go'
GO is a batch separator... I don't think you should use it in dynamic SQL. ...
April 29, 2008 at 7:09 am
What will happen to the rows that aren't ordered? Please show us how your result set should look.
John
April 29, 2008 at 3:42 am
I'm not an ASP expert so it's difficult for me to tell what SQL this is actually sending to the SQL Server. And you didn't post the error message....
April 29, 2008 at 2:48 am
Please post the code you're running and the error message you get. By the way, if this is, or is going to be, production code, then it's not good...
April 29, 2008 at 2:28 am
Viewing 15 posts - 5,941 through 5,955 (of 7,191 total)