Viewing 15 posts - 31 through 45 (of 206 total)
Yeah, it is a table that only has session scope. So once you close the query window where you created it, it will be gone.
November 3, 2009 at 10:06 am
I think something like this would work.
CREATE TABLE #temp (bundle VARCHAR(10), analyse VARCHAR(10), material INT)
INSERT INTO #temp
SELECT 'XCOM','AL',100
UNION ALL
SELECT 'XCOM','AL',905
UNION ALL
SELECT 'XCOM','AL',909
UNION ALL
SELECT 'XCOM','AS',100
UNION ALL
SELECT 'XCOM','AS',905
UNION ALL
SELECT 'XCOM','AS',909
UNION ALL
SELECT 'XCOM','B1',100
UNION...
November 3, 2009 at 9:57 am
There is probably a much simpler way of doing this but this is the first thing that came to mind.
select
CAST(name as varchar(66)) logical_name,
database_id,
size*8/1024 mb_size
INTO #temp
from
master.sys.master_files
where
physical_name NOT LIKE '%.ldf'
UNION ALL
SELECT...
November 3, 2009 at 9:50 am
Try printing out the @sql variable instead of executing it. Then copy and paste that into a new window and see what the error is. That...
November 3, 2009 at 9:44 am
At the bottom of the script is a line that starts with --EXEC (@sql)
Remove the -- and it will run each statement.
Good luck
October 30, 2009 at 1:34 pm
Sorry, I can't duplicate this behavior. I tried to just start notepad.exe through xp_cmdshell. The process starts and the query just sits and runs until I kill the...
October 30, 2009 at 1:24 pm
Are you sure you want to execute all the stored procedures in a database with all NULL parameters being passed? It looks like this will select * from every...
October 30, 2009 at 1:16 pm
Check out @@rowcount in books online. Just make sure you run it right after your insert statement. If you aren't doing the insert in 1 transaction this probably...
October 29, 2009 at 12:22 pm
Sorry about not getting back on this thread. I don't know if I overlooked the email or what. Anyway, check out the links in my previous post about...
October 29, 2009 at 8:52 am
Here is a script I had for index usage. Not sure where it came from but it looks like it returns accurate info.
/*
important info are the user_ columns
low number...
October 27, 2009 at 8:14 am
I knew there was a table I was missing. I couldn't think of the master_files table to save my life.
Thank you Lynn 😀
October 26, 2009 at 12:56 pm
Let me start by saying, if you are learning cursors to do actual data manipulation or lookups you need to be very careful. The performance is terrible if you...
October 26, 2009 at 12:52 pm
I didn't think so but I usually don't run statements quite this long through that procedure. I was just trying to get a little bit better error messages but...
October 26, 2009 at 8:52 am
Sorry for the lame question but that was the forum this was in. I just wanted to make sure. This code works for me but I am using...
October 26, 2009 at 8:40 am
Viewing 15 posts - 31 through 45 (of 206 total)