Viewing 15 posts - 1 through 15 (of 19 total)
That's a useful SP!
To give it extra benefit you could add some checking for constraints on the object (e.g. FK on the table to be dropped) and add an option...
May 26, 2010 at 3:35 am
I also had some difficulty finding the solution to this problem, not helped by [JOBID] only working in SQL 2000, not in SQL 2005.
See link (http://msdn2.microsoft.com/en-us/library/ms175575.aspx or search for 'Using...
December 13, 2006 at 9:36 am
I agree with Noel wholeheartedly, the lack of alphabetical sorting is extremely annoying and wastes precious time.
However I much prefer to have source control integrated into the 1 piece of s/w...
December 4, 2006 at 7:22 am
Alternatively you could use dynamic SQL to set the DB and also execute the SP. You'd need to exec the SP in the same context as the DB you've specified...
September 13, 2006 at 6:24 am
Response to stax - some nice code there!
Just for completeness I've got a set version of the penumbra, although it seems to be a bit more expensive to execute:-
June 7, 2006 at 6:57 am
It was an interesting article, but I don't see why you would store the logic for the calculation in the table definition rather than in the SQL you use to...
May 9, 2006 at 6:18 am
To list the names of files in a directory you can use the 'dir' command. Execute it using xp_cmdshell.
There might be an extended procedure to do it for you too....
October 11, 2005 at 6:56 am
I think it's actually a double quote that's missing. Try this:-
set @cad='BULK INSERT webmisco.dbo.wr_primero FROM ''d:\transferencia$\web\reports\'+@Fichero+' with (DATAFILETYPE = ''char'', FIELDTERMINATOR = '','',CODEPAGE=''850'')'
should be
set @cad='BULK INSERT webmisco.dbo.wr_primero FROM ''d:\transferencia$\web\reports\'+@Fichero+'"...
August 31, 2005 at 9:09 am
Why not try something like this, it uses 2 updates but doesn't require a select to get the value of nextticket from #ytable:-
CREATE TABLE #xtable (ticket int)
CREATE TABLE #ytable (nextticket...
August 26, 2005 at 2:46 am
Why not just use different code for each known sort param, e.g.
Declare @SortOrder as varchar(10)
Set @SortOrder = 'myString'
IF @SortOrder = 'My_ID'
Select My_ID_Int, My_Date, My_String From MyTable Order By My_ID_Int
ELSE IF @SortOrder =...
August 17, 2005 at 8:43 am
This may not be a problem but have you tried executing an SP that does not have spaces in the name?
I know the [square brackets] should allow spaces to be...
June 23, 2005 at 3:27 am
Ok guys, this might seem like a strange question but how about creating an SP with a lot more logic that retrieves data from a smaller subset of tables in...
June 21, 2005 at 2:48 am
Just a warning note about the EXCLUDE list - you should probably add start and end delimiters to your excluded DB names to prevent a custom DB called My_master being...
June 20, 2005 at 4:06 am
Alternatively, once you've unzipped the file containing SQL statements you can load them into a temp table with a single field using a BULK INSERT command (look in BOL).
Then process each...
June 14, 2005 at 3:29 am
You could try looking at the sp_addtrace and related system s procs.
These will let you save info on queries, in a similar way to profiler does but more flexibly, to a...
May 24, 2005 at 3:05 am
Viewing 15 posts - 1 through 15 (of 19 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy