March 12, 2013 at 8:25 pm
Comments posted to this topic are about the item Temp Table Data Types
March 12, 2013 at 8:25 pm
March 12, 2013 at 9:53 pm
bitbucket-25253 (3/12/2013)
Nice question .. learned something from it ... thanks
+1
Thanks Dave
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
March 12, 2013 at 10:20 pm
bitbucket-25253 (3/12/2013)
Nice question .. learned something from it ... thanks
+1
I gotta learn about Select Into ; as I mostly avoid it , I don't pay attention ...
I guessed for Varchar and Date :w00t:
time for research 😎
thanks for the question
~ demonfox
___________________________________________________________________
Wondering what I would do next , when I am done with this one :ermm:
March 12, 2013 at 11:18 pm
Nice question.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 12, 2013 at 11:37 pm
demonfox (3/12/2013)
bitbucket-25253 (3/12/2013)
Nice question .. learned something from it ... thanks+1
I gotta learn about Select Into ; as I mostly avoid it , I don't pay attention ...
I guessed for Varchar and Date :w00t:
time for research 😎
thanks for the question
Same here. Good learning. 🙂 !!!
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
March 12, 2013 at 11:51 pm
One easiest way to avoid this confusion is .. don't use SELECT * INTO.
Always prefer CREATE TABLE..
--
Dineshbabu
Desire to learn new things..
March 13, 2013 at 1:32 am
Learned something new here, and by the way, the reference should be:
March 13, 2013 at 1:59 am
okbangas (3/13/2013)
Learned something new here, and by the way, the reference should be:
Good!
March 13, 2013 at 2:07 am
This was removed by the editor as SPAM
March 13, 2013 at 2:25 am
Stewart "Arturius" Campbell (3/13/2013)
Interesting question, thanks DaveAnother way to check the detail of the temp table would be to execute
tempdb..sp_help #TempQoD
Now this is very very new thing to me... thank you.
(and for the INTO.. table stuff, I thought it is obvious... like when you use the import/export tool and when you trying to import the data from the excel file it marks all the column as varchar except the first one if there are any number like 1 2 3... it marks as int... and if we need the col type to any specific then the tool allows us to modify the value accordingly. As the source data is like a variant, I thought it will be difficult to sql to pick the exact datatype to meet the source and the destiny.... until proven otherwise. This is very interesting, thank you for posting the question, Dave)
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
March 13, 2013 at 2:59 am
Carlo Romagnano (3/13/2013)
okbangas (3/13/2013)
Learned something new here, and by the way, the reference should be:Good!
+1
ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.
March 13, 2013 at 4:04 am
Raghavendra Mudugal (3/13/2013)
Stewart "Arturius" Campbell (3/13/2013)
Interesting question, thanks DaveAnother way to check the detail of the temp table would be to execute
tempdb..sp_help #TempQoD
Now this is very very new thing to me... thank you.
(and for the INTO.. table stuff, I thought it is obvious... like when you use the import/export tool and when you trying to import the data from the excel file it marks all the column as varchar except the first one if there are any number like 1 2 3... it marks as int... and if we need the col type to any specific then the tool allows us to modify the value accordingly. As the source data is like a variant, I thought it will be difficult to sql to pick the exact datatype to meet the source and the destiny.... until proven otherwise. This is very interesting, thank you for posting the question, Dave)
New thing for me too 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 13, 2013 at 4:05 am
Stewart "Arturius" Campbell (3/13/2013)
Interesting question, thanks DaveAnother way to check the detail of the temp table would be to execute
tempdb..sp_help #TempQoD
+1 🙂
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
March 13, 2013 at 5:50 am
Stewart "Arturius" Campbell (3/13/2013)
Interesting question, thanks DaveAnother way to check the detail of the temp table would be to execute
tempdb..sp_help #TempQoD
I often use sp_help to get db object info, but never try the query on explanation. That query can be handy since it provides more info about a particular table. Thank Dave!
Derived on the query on the explanation, this query can be used to object info for other db objects such as trigger and stored procedure.
USE tempdb;
go
SELECT *
FROM sys.objects o
LEFT JOIN sys.columns AS c ON c.object_id = o.object_id
LEFT JOIN sys.types AS t ON t.system_type_id = c.system_type_id
WHERE o.object_id = object_id('#TempQoD');
--------------------------------------------------------------------------------------
Hai Ton
My Db4Breakfast blog.
Viewing 15 posts - 1 through 15 (of 36 total)
You must be logged in to reply to this topic. Login to reply