SQLTeam.com | Weblogs | Forums

File content varbinary


#1

hi

i have a column in tabel, the content data in varbinary.
how can i export to readable flat file?

for example:
"
0x504B030414000600080000002100CE01BC8EFE010000370A0000130008025B436F6E74656E745F54797065735D
2E786D6C20A2040228A00002000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CC564B6FD4301
0BE23F11F225F51E26D9110429BEDA194235462115C5D679298C60FD9B36DF7DF334EBAD1769B6E52A2455C22C5F6F798F1D8E3E5C5836E923BF041
5993B3B36CC11230D216CA5439FBB1FE927E644940610AD1580339DB426017ABB76F96EBAD839010DA849CD588EE13E741D6A045C8AC034333A5F55A
20FDFA8A3B216F4505FC7CB1F8C0A5350806538C1C6CB5FC0CA5D834985C3DD070E7C4998A2597DDBA289533A5233E8EF341C46F07C390766218E3A109
0732C2B9464981940F7E678A8358D2C7383242B66B42AD5C7847C1BEE02ACE3C8D635FE0655CA5CA035C177F1CA758BED196795540722D3C7E159AF2C3EF
"

thanks


#2

Please refer the below link


#3

thanks,

but i get strange characters,not in my language
"'}+×2°ֽ‡‡žֿ­Ž‹ץ²B©n,:~ק˜¾ell÷ U׃ך-c§R“¢]ײ³†n4[³—)Dצ¸ יt]8^4\ײCJu66{£G‰¦jh×hק™Š‘ו6Tמצ#Yָ%1צ½(D=³ֲ¨:VC=p,T³±²ן,hׂ״´!¨]kהte_ֿד¾ֳִח q£&kֳח-"(n˜”סָEכ„@·ֵw|JחV*csVgn¥ע[Ie¦]׃ZzyG«N¾F€Nk§÷^i @V:cֳ3b¼b¬׀vœ¸H §ְQׁBלי7½°°—F׃´"¢׃´~n¦¡ןם<צ0m‡³šֶַ±)<K3,er 81uKyeֵ‘f!tž™ֺ©ׁךŠqעכה‹ֹ›ֹֹֻ·¦²ˆּxקת2¥ַ˜”œ‎„™w»­¾ֵ1]סױֱq mי°C¸~±¥™׀כֽ’ד…?GףװŸ&+m3Ge¯”ֳ‹<¢,a»ֽƒ«ּ׃¬R¦³C{ כ¶¢®2ַE³״ם–>ת¨tŒ¿Uזlֱ\n])[Š–ֻףORח״ƒ·"¶¢&!ת‏nTJ÷A3ƒ¦iž³r¥ָׁיaž״P®ָM1™ל`©¶£Uק+E®|>²0'~
eœ׃ƒ_ט¨O :B
V8#³…†ƒˆ!PװMU8‰e$·"k¨I”¥@d׃ָ]›ziU´jµZ₪Xש¹G\7v2ֺu¦=ג´}]:ׁׂ¦8QŒ„םאֱe¸–œ&vְzסv9'$!Šš¶®כ+÷]ž¿Nֿ¡Nx[9ש]ֽ>Q"ֿ\9_swב“¯±u~עױה‡…»ַŒFLכ‎De.5ֵds'¯&b׃ר~…_B'9kL°2ƒִy׀״ֿ)F¢-™אw¾¹ִ¹ײeeq¨w/כד–©Ÿanoוsחg0ֻ e¬Y7Kfנץש»Kװ›°בn´™ֳ‚«+&‏ל!a9ž¼w.¶Gœף[v-ר8‹ּge~5¦B¿|d{eִ¾ת×‏dָo=y¬=קׁׂSיּ#‎ִֺ‎«Yֵg€œֹ/ֲץnZֿs[£¼ֳw]›«†·b«שHֻj°÷µ–ד¨׀g/·ֻe‎פ”œn&
›סףֽ…ֿׁ|
(.נצקGK´}¡ֿnhF׃¸Ÿ†H–ֹ§}kµסV|"¼‎#}ׂZ¹^>ַ³ץk»§OsuCmrֲַezpטש}ע[ˆ>¿Eֻ“ֹ“o±±‏Ÿ?”&¿*ְ›ן±ׁ₪
חKנף…¸A™¼ž¼@e_@ƒŸ''ֺּצפ׳œ×/ך[}!ר¿פƒiV’u( קT›½¢œ»-ּWתנ]yzתGשfץִLK²|s¬LŽֽB<žֲ›פזk´ִE7z[Rױםֿˆ¢il”OדײBeM£R½י({ם¡+ב'“"„רo@צwג¯pּ59ֵ׳tשfע
‎!ֲK2'(שאנלu׃µ…q׳ּ´_8I¼‰פ³T|
‚K°Ve@To”?¡ֹ׳ׂ״%N‏|o9lL­•enJ¾שֽrS
au‘^ 07kgֲuq„u®oקVQg‰o.œֵ€…,¾™œaשR8חTח›‹¥T³š›ןgּjcŽ׳ֳŠxחנI“ּ
¸
®­סף׳ŸD־½y‡לף!£}fף¡ƒWֳW:תXhKעֶ!
:›-ֹטj‡Lטְ“ŒN'bתyמ.v©ננx¥¡>}אןXצ3zם´ם}qŽI¶”‚Dl9¿ות₪7“ֱKƒןצ½SְwUא·‎¿ם—§K¾גµר´ֶ´g|mִY5פצn-ֻš¢|0EqQ‘Užfנz‡u£÷¾›ֶcָ3¼ׂ¢ָ¼°Hּ½°—וƒ‚sMsfײ‎,–זGף.ֲ&9ֿו½קr״‘qR(מ·Hi® P^P [@ׁŸהK

־“‚´
7N¶ֳּ…G~#FתHLgֶֿ7_¶¥™^VK¬C´הפ6wv)Y…ŒUץŠ¾»^d ע 2±ž״kֺ¾\@
aœN<7װš!^kֽœŽײ׳µyה›eֳֵּ,»y
—}9ױצ]Ÿד¶גֵem—‏ׁ(„ZT׳P#qׂ׃ֲסt mG‘בד<y׃…«לבױ”ŽgדHוײ(lץ}$’Pָ£vp,Gֽ‘p{œ‰ —iyvCט:at /÷I¯!…^&EœGO~†־ pž÷¨”YFלC&hTפJqVUי0€I DC׳·Ÿ1יה¹ײ±?Œz-זג¬9x´\׳Œ4e®ˆ:נ!תT[µJ­¦¦¨]'¢b£B*‹¶ˆf:.וHנ˜>ֹMְּJ=סa:6קa8eי»ֳG¢m>מץBm­Wכ•²¾1gK“Ÿ’PׂEתdŠ,¥8הV׀Ÿ¦\(׳×ZB)¾]עS’„1ף”8ִ#µj½j¨Š
nפŠfאd®d‰ץzּŽמֻ†גzM§¹Š׀¬®Uhbj¹B¯ם+HJ¯װaŒ1²ַHV"י KֹWָ§ײׁT:˜G>U£אכ‰‚״~<z@|9v›ֳMד(¶Lֱ×cַ‰I*׳ֲע”"E†װ®Yֺ_2„ּ÷@Eצ•^;ֵXx„8{Fk2z| pŸ₪g”ֻ÷±©³(ףֹ”2Y&<œ;1%IŠתָ¯נ€ש….׃#hrמYkפ(Œ0´NZQ׀wnq]סƒvZ.W@´‏h׀%׳ּץ.ײt¨+T<‚¸ŠŽ]F]oŸץ P@CY$ˆaי€,›־o׃›לOך29־Jv˜”ד†zˆA‚װ÷a‏R1₪¥$’׀–ֶם©«Tש´³¶h²sC™vַֺ‹¸א¾³lŸIŠ†₪D¹:°f„÷ֽ„ֹ4c+_€°,"@כ״×_© קyQ9µֲַA-0K¬¡†Ÿ-Ž₪!מCH[׳¡–XגG¼®y¶¦“­ס†(³¸Dg®₪´aרIdštWTIc @Œxע£AP…tB6k6ֵµּ#פָ{B¹Œהה‘}jס Vt2[‎dםYז”²ֻ¶4žF~ֿ+בT®±¼ֵ‚…–ֶאBˆ )‏M‹&"tž³}זNד:t¾9n״ׁ§N7ךo הE¯´€פ?C%OtױgˆJ“—¥—הֹ~"8Š­]ŸšבRj¬…nֳvץְ8ְּ±aּG´÷ב׀¶ְט§G´ֲžFה³״>&@נ¾¡ikגSU| f•šXֿס¥Œ:תP$ך#¥‚¶­¹ת¶¶­ֻ>Fע½Sֱ·®ױ׀ן hקŸ1ו3ֱבkוeˆ׃7ŒLJ85t­צצ9eµ”;°עEbm¥Eבp ˆA+šr'…I]P@1¬Bk2׳uš²½.ײ**2C &!ק<XHפzF‏€dֳeֱ×’<j›¶¶)ˆסlJnCdi‹—¡Q…ljZ][C5i{ַ?ג¸SC…<·ֻk‰4וxw‎hפ}%סCך}
עQŽ8ָb|±¸Uו8-³IP„ž \§
!ז…´ChFֽš@–=ײšP׳׳)‘;YUŠח4žiud†₪œA¦¶I\µ\ח׀Y„6וR¸+jzם^ם ₪XŽכ¸‎•†הֵט«ֵZ}§a׀ךM²וU–´›­ױr¿H^ƒ<ח‡מן„”»{ז־ ‚D€ו"Y<¬:U,J¢‹תkj—!ָ^כ¼˜2צtְ«¯Sז†¯>¯ץ” ¾p¨Yזµ]ƒ<›¾8ŽS־׳ַ+ָ<>%i‚¡y’¡¾¶ H@Oa1ס¿¦U‏•vסZױ}גO«[c—ן½h½׳ֲ/]?«§ר ש\צ7ֳtTµ¹‏kגaץ”G| !gž8O)a
~<ַֹכ:O§y›¯׳¼<«םdj;Už4ץ׃ז(¼–~¹i‎iםŸV}jµ~YקA>† 1ד7<˜œֵOeža‎5—¿j_‘¯Kטה4ž—ר£—|wֿ®ם·ׁQ©dQ
b(,x-¶>ְac£ˆנ~@‎&¾nl—ְ_pš'ו¼צ´לZ;ֻ‎n{de]ױ?י.|וסָם‚…¹<2לVֶZב{\ֺח31>Wev§³keׁer†ןwז:,—5|חcUŸ­Cזײlo³@¼¢-”t[ף‰L,;Q^te}¹šף₪(~xף¨¿ן׃לכ1>מ3׃°X¡ ײ[1÷²װן¼PָX.€›הPזוץL&×’װ;o]G}—U¾šCo‰"ם ֶRUŸ/'!onס>µצי•'“•µ®ֹס“p־]צ ו2ּזץעpT@Y-¬œֺ£d;vwֻ8–c/U÷׃yŸ<¥†/®©זfµ‡d£D!¿ֶתpY}W»ב·±)3)aי—1¬׃…aK °‎#P°–[, ‏„ףd™8s½ױ²e2 :ףMכך­{תµֻ­eל‚ףּממ :€q„ֿb^ֹHuִ­žJR§QֿJחט[žJ° »ך€¸םžždµ©™ד2פֶ ‡A q~¬&ךiOxžSŠ#]³;נ³חפ\¯¬כ-‘÷”wְ%¾›ep³@’´ְ¡´ֹ״ׂe"!ך­<ֱ1ַH']g­ס;ֱ…Et„U×Hpuֻמנל°VN“ˆֹשְ>ֺœ אֶJMַ[־&ln,¶
זažמK‹n€ב\gX\g”{›1¿œnIִף ¸״
©ִ”
mR!ֿeDצe¾|hה±wנ]kץ4ו˜}uׂ‰ל¡lkְָ±6¹dcL¯ ]ˆ›כEš=9§ּ׳´ֺnם׃eֵ{„ׂ¹'f\Sד…A.Sֺע·­e®—·‹Cדל’= NF½ZX'Joל¹½=‚> ^Yֽל©ו¸)ֶ״ֶ>+¾}ׁŠXֲׂ”Qף{p lc>פז´ק©²׃pb q5ֶײK%vK OֵֺOJ1 vaGֿIp›ֹŒֱz.pדHױֺ¼w‹׃c</O+?ֶ©¸
ƒ‹ֶ¿-–ְ‰]0š+9aקq¹˜©}e ׃ײ+ׁ‹qG´-^״1yAן›ֲִזvsbUה;ק±¦¥‹ףPִd¬ׂ‹R
ח¥kqא˜9g[š±ײ־ƒֵ´׳0¼š'[.jֶcv־?wֹ-^9f#$צ„N¯6%3O#g»®,½´ױ rׂ טד hֽױX¡3?Š{-»מחGLקטz«n:~אxי÷ֻR!ֿ6-¿*†T״B©³÷I†‘Fװֱֶדmשˆ ˜oŠ‏דטװמY*4"¼cדIןSµ;כk¹x´u׃ִץ6=zׂAIy˜c[י„0vף‚ £yBך8,®קP+ֶ&9«zžר־>¸4F‰ךX‚hšK~1±]½’aMמ±wu¾pv›€8[ֵהֱˆJbvהכr ¬tN\­ת[ִ?.r¿#ao׉״T‏4₪<¸F¶״ָ;œזט”ֵ˜a¢l¡Za¹—š‏Lףּ³ְ¥״ )‹¥1׃¦¢y¼®}«Žuֲֺ$ֺS—Q®yD ׳חעt4ע°³€קB–?w+€ד2{%a/@¹Š(iM8Y׳bc¼¨š«wקT©ׁQֲהAוVJנu ס´µvנָ§ן¦ףŠפ=­ֺֹּ3(„,:‏E$²ֵn~־š±{ֺ”{ŸM‏:eOV¸Ÿפ־ֲַ»ֳ~5י„ח!%×¾ֶ/a׳z$_־Vדֿˆך°א׳{n)§
[מmהץֱפ¥M¬U"כy׃ֽ'ְwּ¥3¸לHvK)1y4>/G£|<Zג%>P־&מlb‹ײ
–®ZםŒee¡¸Iָrֹm¬Yb]Ÿכƒ•>ֿeמה2₪[3NIT¡<ג÷E©ךjײ”ַMַוFE,¿2ה~cX{ ‰[{ן-דר6Ÿa3U
}ײ&'¼wיֱֲk־WGP¦g°r6ֳ׃״…/­7י¹ךfא<¹|0ו–;mװַx'¹ׂ׃G₪
›y­’t§ֵv Ty÷ג®קרה–˜Al1ִ%†q² Šš°]װֲס˜‚ז k |Šט.:[’o¼©סT‏טŸִֵ%נ!0נH€°œֿ£ֲU#X‡05Aקך·€h¶Tש‏bZ£
(YZŸן;„p&ץa€!<[f»םשDOyֵ!ץ?¶Rœן3¼!4הe”´_Zס ;¯q׃9<÷A^ֵ­5(ֳהUCG² ׁץ6 Ž^l/ze1’½ I<ֹֻ·Qי{£—×.ף״}O7¼O¼ָ¢a?„u׃¸5Rw×Iג״nl Iם—™]|‏†oƒrשףOפy3†¿,7ֺ<žPו³ֿ+םd!T-¦ K@ז¿ Wƒֳ
’ר)iŸׂ"


#4

have you tried using bcp command?
as said in the below link