Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SELECT INTO FILESTREAM Expand / Collapse
Author
Message
Posted Tuesday, May 28, 2013 9:13 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 8:58 PM
Points: 31,075, Visits: 15,519
Comments posted to this topic are about the item SELECT INTO FILESTREAM






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1457565
Posted Tuesday, May 28, 2013 9:38 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, September 25, 2014 12:16 AM
Points: 1,371, Visits: 1,561
Interesting question Steve. I had no idea about this, except the connection of VARBINARY and FILESTREAM. Luckily was able to guess the correct answer

~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1457569
Posted Wednesday, May 29, 2013 1:02 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 4, 2014 5:38 AM
Points: 945, Visits: 558
I don't have idea about filestream but i'm sure other than IDENTITY property no other attributes will be copied to new table. So i guessed it should be varchar(max) but it was wrong , could have gone through the BOL before answering.

--
Dineshbabu
Desire to learn new things..
Post #1457598
Posted Wednesday, May 29, 2013 2:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 12:09 AM
Points: 1,916, Visits: 2,337
Dineshbabu (5/29/2013)
I don't have idea about filestream but i'm sure other than IDENTITY property no other attributes will be copied to new table. So i guessed it should be varchar(max) but it was wrong , could have gone through the BOL before answering.

Same thing happened with me



_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1457608
Posted Wednesday, May 29, 2013 3:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 AM
Points: 6,018, Visits: 8,287
I am not surprised that SELECT ... INTO loses the FILESTREAM attribute. However, I was surprised to find that varchar(max) with FILESTREAM would be converted to varbinary(max).
So then I did a bit more research, and found that FILESTREAM is not even permitted with varchar(max) - so not really a surprise that all FILESTREAM columns get converted to varbinary(max), since that already was their data type!



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1457627
Posted Wednesday, May 29, 2013 3:57 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 5:37 AM
Points: 88, Visits: 325
Interesting question Steve. I had no idea about this, except the connection of VARBINARY and FILESTREAM. Luckily was able to guess the correct answer

~ Lokesh Vij


+1, except I guessed wrong. Thanks for the question.


Dave Morris

"Measure twice, saw once"
Post #1457642
Posted Wednesday, May 29, 2013 4:38 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:22 AM
Points: 13,017, Visits: 10,798
Easy one, thanks Steve!



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1457656
Posted Wednesday, May 29, 2013 5:38 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 3:57 AM
Points: 3,980, Visits: 5,226
Excellent question, thanks Steve - discovered this while doing an investigation for the implementation of FILESTREAM in my environment

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1457675
Posted Wednesday, May 29, 2013 9:20 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 11:01 PM
Points: 17,694, Visits: 15,561
Hugo Kornelis (5/29/2013)
I am not surprised that SELECT ... INTO loses the FILESTREAM attribute. However, I was surprised to find that varchar(max) with FILESTREAM would be converted to varbinary(max).
So then I did a bit more research, and found that FILESTREAM is not even permitted with varchar(max) - so not really a surprise that all FILESTREAM columns get converted to varbinary(max), since that already was their data type!


Thanks Hugo.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1457799
Posted Wednesday, May 29, 2013 9:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:09 AM
Points: 7,732, Visits: 9,476

Nice question.

Dineshbabu (5/29/2013)
I don't have idea about filestream but i'm sure other than IDENTITY property no other attributes will be copied to new table. So i guessed it should be varchar(max) but it was wrong , could have gone through the BOL before answering.

But why did you think the source type was varchar(max) filestream? varchar(max) isn't a BLOB type any more that text was it's LOB but not BLOB, so varchar(max) filestream doesn't exist.


Tom
Post #1457809
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse