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: 2 days ago @ 11:24 AM
Points: 32,781, Visits: 14,942
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: Wednesday, April 09, 2014 2:46 AM
Points: 1,371, Visits: 1,547
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: Wednesday, April 16, 2014 5:16 AM
Points: 905, Visits: 553
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: Monday, April 14, 2014 11:50 PM
Points: 1,868, Visits: 2,275
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 @ 4:57 AM
Points: 5,797, Visits: 8,013
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: Thursday, April 17, 2014 8:31 AM
Points: 85, Visits: 306
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 @ 1:28 AM
Points: 12,208, Visits: 9,174
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: Friday, April 18, 2014 6:40 AM
Points: 3,683, Visits: 4,818
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


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:30 PM
Points: 20,467, Visits: 14,104
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


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 12:16 AM
Points: 8,289, Visits: 8,742

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