Viewing 15 posts - 1 through 15 (of 25 total)
print len(@a) {=7999}
print len(@b) {=8000}
print len(@a+@b) {=7999}
execute( @a + @b-2 ) {fires just fine!!}
Rockmoose, so I think I am starting to understand.
Though len(@a+@b) {=7999},which has hit the varchar(8000)...
July 1, 2004 at 10:04 am
*********
DECLARE @sqlprt1 VARCHAR(8000),@sqlprt2 VARCHAR(8000)
SET @sqlprt1 = 'SELECT * FROM /*....and long and long...*/'
SET @sqlprt2 = ' INFORMATION_SCHEMA.COLUMNS /*...and long and long...*/'
EXECUTE(@sqlprt1+@sqlprt2)
*********
Hi we are trying something almost exact to this suggestion...
July 1, 2004 at 8:31 am
Thank you for the insight.
Yes we did get it working again by creating a dynamic query string and capturing in a local var @t.
Firing the script with execute(@t) was just...
June 25, 2004 at 10:14 am
Ohh, I hate when its that easy!!
Thanks, tried it and works great.
Is there any drawback to using straight execute() to sp_executesql?
My Thanks
June 24, 2004 at 8:21 am
Try taking advantage of SQL jobs.
We did the same you are trying to do like this.
Set up a Job with say 2 steps.
Step 1 searches for that file, if it...
February 23, 2004 at 12:20 pm
Though i have never encountered that message, I have had problems like that in the past.
Have you examined the source and the destination to make sure they are active and...
February 23, 2004 at 12:08 pm
We are also using SQL 2K AS, and this SP in question used no temp tables.
Also, good idea on testing with constants.
Thank you
January 26, 2004 at 9:17 am
Thanks for all the posts,
_____________________________________________
That sounds like "parameter sniffing" with atypical values. Does your stored procedure have defaults (like null) for its parameters?
______________________________________________
Yes we are assigning default values to...
January 26, 2004 at 9:15 am
Thank you for the posts,
We did our own testing and optimizing and found the same thing, using a count was 6Xs faster than the If Exists(). I had always thought...
January 26, 2004 at 9:03 am
You might want to experiment using
with recompile
in the stored procedures.
We experienced the same problem and we needed this clause in a few of the Stored Procs hitting large dynamic...
November 25, 2003 at 3:49 pm
I think we got it.
We threw With recompile in the proc and bamm, back to normal.
Question:
Why was QA acting differently?
Why was is recompile needed?
Thanks
November 25, 2003 at 2:44 pm
You might also look into sp_executesql.
Basically it allows you to build a dynamic sql query and run it in a Stored Proc.
November 18, 2003 at 2:11 pm
BULK Insert does not allow you to manipulate the as it goes in,
though there is a way using a Format File.
I ran into this issue; Need the performance of the...
November 18, 2003 at 1:49 pm
Viewing 15 posts - 1 through 15 (of 25 total)