Sei sulla pagina 1di 9

Questions

Home > Question Details

Resources

Archives

Links

Popular

Hot

Files

Firas -- Thanks for the question regarding "Long Raw to BLOB", version 8.1.7
Submitted on 22-Oct-2003 19:01 Central time zone Last updated 5-Apr-2010 10:23 Tom's latest followup | Bookmark | Bottom

You Asked
H Tm i o, W aeuiga Oal 817dtbs.I teeawyi P/Q o Jv Soe Poeue e r sn n rce .. aaae s hr a n LSL r aa trd rcdr t cnetaLn Rwit aBO? o ovr og a no LB Tak, hns FrsKaanh ia hswe

and we said...
ostyeOA1DV cet tbegt(i it xbo ) p$kt@R87E> rae al t d n, lb ; Tbecetd al rae. ostyeOA1DV p$kt@R87E> ostyeOA1DV cet tbet(i itpiayky xln rw) p$kt@R87E> rae al d n rmr e, og a ; Tbecetd al rae. ostyeOA1DV p$kt@R87E> ostyeOA1DV isr it tvle(1 ra('' 20,'')) p$kt@R87E> net no aus , pd a, 00 a ; 1rwcetd o rae. ostyeOA1DV p$kt@R87E> ostyeOA1DV p$kt@R87E> ostyeOA1DV dcae p$kt@R87E> elr 2 li nme : 1 _d ubr = ; 3 lbo bo; _lb lb 4 bgn ei 5 eeueimdae' xct meit 6 isr it gt net no t 7 slc :,t_o() eet x olbx 8 fo t rm 9 weei =:'uigli,li; hr d x sn _d _d 1 0 1 1 slc xit lbo fo gtweei =li; eet no _lb rm t hr d _d 1 ed 2 n; 1 / 3 P/Q poeuescesul cmltd LSL rcdr ucsfly opee.

i yujs wn t cnetsnl rwfrassin ue f o ut at o ovr ige o o eso. s cet tbenwtbea slc ..,t_o(ogrw fo odtbe rae al e_al s eet .. olbln_a) rm l_al t praetycnetalrw. o emnnl ovr l os

Reviews Excellent, Thanks October 23, 2003 - 3pm Central time zone Reviewer: Firas from NC USA H Tm i o, Bookmark | Bottom | Top

03/12/12

Ask Tom "Long Raw to BLOB"

Tak altfryu pop rsos.I i psil t udt aLn Rwclm wt aBO hns o o or rmt epne s t osbe o pae og a oun ih LB vle Ira sm weeta ta i psil b cnetn tebnr btsit hxbtIa nt au? ed oe hr ht ht s osbe y ovrig h iay ye no e u m o sr i ta i psil o hwt d i.Aysgetosi hgl apeitd ue f ht s osbe r o o o t n ugsin s ihy prcae.

Followup October 23, 2003 - 7pm Central time zone:


np,n cnd tee Yuwudhv t ueteAIst udt teln rw(fteln oe o a o hr. o ol ae o s h P' o pae h og a i h og rwbo i oe 3k i 3kadls te ys pslcnd i) a/lb s vr 2, f 2 n es hn e, lq a o t

April 19, 2005 - 9am Central time zone Reviewer: A reader H Tm i o, Ihv tbe xadya ae als n s cet tbex rae al ( i nme, d ubr srvrhr(5) t aca225, liaeln_a rmg ogrw ) ; cet tbey rae al ( i nme, d ubr srvrhr(5) t aca225, biaebo lmg lb ) ;

Bookmark | Bottom | Top

Tbexhsaot1 mlinrw adIa tyn t mv dt fo tbext tbey al a bu 1 ilo os n m rig o oe aa rm al o al . Itidtefloig re h olwn: cet o rpaepoeuepobo rae r elc rcdr rclb a s tt vrhr(5) sr aca225; tmg bo; iae lb bgn ei ..... ..... slc sr t_o(rmg)it tt,tmg eet t, olbliae no sr iae fo xweei =1 rm hr d ; isr it yvle (,tt,tmg) net no aus 1 sr iae; ... .. ed n; / We Ityt cmieti poeueIa gtigteerr hn r o opl hs rcdr m etn h ro P/Q:OA092 icnitn dttps epce -gtBNR LSL R-03: nosset aaye: xetd o IAY Ias tid lo re cet o rpaepoeuepobo rae r elc rcdr rclb a s tt vrhr(5) sr aca225; tmg ln rw iae og a; bgn ei ..... ..... slc sr liaeit tt,tmg eet t, rmg no sr iae fo xweei =1 rm hr d ; isr it yvle (,tt,t_o(iae) net no aus 1 sr olbtmg); ... .. ed n; / AanIa gtigtesm err Pes ltm ko wa t d. gi m etn h ae ro. lae e e nw ht o o
asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654 2/9

03/12/12

AanIa gtigtesm err Pes ltm ko wa t d. gi m etn h ae ro. lae e e nw ht o o Tak. hns

Ask Tom "Long Raw to BLOB"

Followup April 19, 2005 - 9am Central time zone:


ueISR IT slc .. s NET NO eet ..

d ntfthot ptit pslol t sn bc. o o ec u, u no lq ny o ed ak

isr it yslc sr t_o(rmg)fo xwee.. net no eet t, olbliae rm hr .; n psl js sl o lq, ut q.

April 19, 2005 - 10am Central time zone Reviewer: A reader TakyuTmi wrsget hn o o t ok ra.

Bookmark | Bottom | Top

Does it work in 9.2.0.6 too? May 2, 2006 - 7am Central time zone Reviewer: Roland Rottlaender from Germany H Tm i o, i teeadfeec fr9206? s hr ifrne o .... Ihv atbe ae al bodt( lbaa onrd wei lni ogd sgetd emni sget emn ) BtaQey u ur Slc lni,t_o(emn)fo bodt weelni =135 eet ogd olbsget rm lbaa hr ogd 24 rtrs eun OA092 icnitn dttps epce -gtBNR R-03: nosset aaye: xetd o IAY

Bookmark | Bottom | Top

nme(0, ubr1) nme(0, ubr1) nme(0, ubr1) LN RW OG A

Te Icet tbe hn rae al bodt_ep lbaatm( onrd wei NME(0, UBR1) lni ogd NME(0, UBR1) sgetd emni NME(0, UBR1) sget emn BO LB ) adtid n re ISR IT bodt_epSLC onrd lni,sgetd t_o(emn)fo bodt wee NET NO lbaatm EET wei, ogd emni, olbsget rm lbaa hr .. .
asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654

AlIgti l o s

3/9

03/12/12

Ask Tom "Long Raw to BLOB"

AlIgti l o s OA097 ilglueo LN dttp R-09: lea s f OG aaye Iral hsn ie wa' gigwog. ely a o da hts on rn.. Wudb geti yucudhl m.. ol e ra f o ol ep e. Tak, hns Rln oad

Followup May 2, 2006 - 7am Central time zone:


t_o ol wrso isr a slc. olb ny ok n net s eet

gv m actadpse eape smtiglk ti fo m 90 dtbs: ie e u n atd xml. oehn ie hs rm y 26 aaae ostyeOAI2 cet tbebodt( p$kt@R9R> rae al lbaa 2 onrd wei nme(0, ubr1) 3 lni ogd nme(0, ubr1) 4 sgetd emni nme(0, ubr1) 5 sget emn LN RW OG A 6 ) ; Tbecetd al rae. ostyeOAI2 isr it bodt vle (1 2 3 ra('0,40,'')) p$kt@R9R> net no lbaa aus , , , pd 0' 00 0 ; 1rwcetd o rae. ostyeOAI2 dcae p$kt@R9R> elr 2 lrwln rw _a og a; 3 bgn ei 4 lrw: ra('0,376 '') _a = pd 0' 26, 0 ; 5 isr it bodt vle (1 2 3 lrw) net no lbaa aus , , , _a ; 6 ed n; 7 / P/Q poeuescesul cmltd LSL rcdr ucsfly opee. ostyeOAI2 p$kt@R9R> ostyeOAI2 cet tbebodt_ep p$kt@R9R> rae al lbaatm( 2 onrd wei NME(0, UBR1) 3 lni ogd NME(0, UBR1) 4 sgetd emni NME(0, UBR1) 5 sget emn BO LB 6 ) ; Tbecetd al rae. ostyeOAI2 p$kt@R9R> ostyeOAI2 ISR IT bodt_ep p$kt@R9R> NET NO lbaatm 2 SLC onrd lni,sgetd t_o(emn) EET wei, ogd emni, olbsget 3 fo bodt; rm lbaa 2rw cetd os rae. ostyeOAI2 p$kt@R9R> ostyeOAI2 slc dm_o.elnt(sget fo bodt_ep p$kt@R9R> eet bslbgtegh emn) rm lbaatm; DM_O.ELNT(EMN) BSLBGTEGHSGET -------------------------20 00 133 68 ostyeOAI2 p$kt@R9R>

asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654

4/9

03/12/12

Ask Tom "Long Raw to BLOB"

September 4, 2008 - 10am Central time zone Reviewer: Visi from Albania

Bookmark | Bottom | Top

H Tm i o, Ihv be vstn yu st s mn tms bti i ol ti tm Ia tkn tecac t ae en iiig or ie o ay ie, u t s ny hs ie m aig h hne o mk aqeto rgrigtecneto o Ln Rwt BO. ae usin eadn h ovrin f og a o LB Ia i tepoeso laigsm 4(Bpcue fo aMSLsse t Oal 1gR uigOEB m n h rcs f odn oe 0G)itrs rm SQ ytm o rce 0 2 sn LD tog htrgnu sse(S. huh eeoees ytmH) Ti i m tre tbei oal: hs s y agt al n rce cet tbeTPCUE rae al _ITRS ( IAEI VRHR(0 ntnl, MG_D ACA21) o ul FLNM VRHR(5) IEAE ACA220, ATON NME, CINR UBR PCUE BO, ITR LB BTS YE VRHR(0, ACA21) IF NO VRHR(0, ACA21) IAEAEDT MGDT AE ) ; atrtbeTPCUE le al _ITRS adcntan XKPCUE piayky(MG_D) d osrit P_ITRS rmr e IAEI);

Adti i tedsrpinfo sllso termt tbei MSL n hs s h ecito rm qpu f h eoe al n SQ. iaei mg_d vrhr() aca28 flnm ieae vrhr(5) aca220 y aton cinr nme(0 ubr1) y pcue itr ln rw og a y bts ye nme(0 ubr1) y if no nme(0 ubr1) y iaeae mgdt dt ae y Tefloigi acd Iwoeadi i spsdt mgaearcr a atm,aytm i i h olwn s oe rt n t s uoe o irt eod t ie n ie t s bigeeue adcnetn teLN RWpcuefedt BO uigteT_O fnto. en xctd n ovrig h OG A itr il o LB sn h OLB ucin

bgn ei frci (eettapo o n slc .pn fo sgpsprst tpcue p rm t_asot , _itrs weetapo=piaei() hr .pn .mg_d+ adpiaei i nl n .mg_d s ul adrwu < 1) n onm = lo op isr it tpcue net no _itrs (mg_d flnm,aton,pcue bts if,iaeae iaei, ieae cinr itr, ye, no mgdt) SLC "mgI"iaei, EET IaeD mg_d "ieae flnm, FlNm" ieae "cinr aton, AtoN" cinr t_o(Pcue)pcue olb"itr" itr, "ye"bts Bts ye, "no if, If" no "mgDt"iaeae Iaeae mgdt FO ICotatmsl RM TPrri@sq WEE"mgI"=capo HR IaeD .pn; cmi; omt edlo; n op ed n; We Ityt rni,Ia gtigOA097 ilglueo LN dttp hn r o u t m etn R-09: lea s f OG aaye OA052 a ln 1 R-61: t ie 0 A Idigsmtigwoghr?Ia raycnue.Idral apeit yu itreto o m on oehn rn ee m el ofsd ' ely prcae or nevnin n ti.Ihp Iwssmhwceri m epaain. hs oe a oeo la n y xlntos Tak adrgrs hns n ead, Vs ii
5/9

03/12/12

Ask Tom "Long Raw to BLOB"

Followup September 4, 2008 - 1pm Central time zone:


to_lob is not implemented by mysql - it would be the thing that would have to convert the long raw into a lob.

long raws are not going to be dblink friendly at all. Your best bet will be to write an external application that selects from mysql, inserts into Oracle. Or dump the data out into a flat file and load that. September 5, 2008 - 7am Central time zone Reviewer: Visi from Albania H Tm i o, Sryfrtecnuin B MSLImn McootSLSre ntMSL or o h ofso. y SQ et irsf Q evr o YQ. Hwvr ItikIwsal t oecm teiseb itouigamdl se i tepoeue oee, hn a be o vroe h su y nrdcn ide tp n h rcdr. Isedo uiga ISR..NOcas wt aT_O fnto,Iue arcr tp Vral a a nta f sn n NET.IT lue ih OLB ucin sd eod ye aibe s hle. epr Ti i tefnlcd o tepoeue hs s h ia oe f h rcdr: cet o rpaepoeuepla_itr rae r elc rcdr _odpcue a s tp TiDt i rcr( ye Pcaa s eod iaei vrhr() mg_d aca28, flnm vrhr(5) ieae aca220, aton nme(0, cinr ubr1) pcue ln rw itr og a, bts ye nme(0, ubr1) if no nme(0, ubr1) iaeaedt) mgdt ae; vdt TiDt; _aa Pcaa bgn ei frci (eettapo o n slc .pn fo sgpsprst tpcue p rm t_asot , _itrs weetapo=piaei() hr .pn .mg_d+ adpiaei i nl n .mg_d s ul adrwu < 1 n onm = ) lo op SLC "mgI" iaei, EET IaeD mg_d "ieae flnm, FlNm" ieae "cinr aton, AtoN" cinr "itr" pcue Pcue itr, "ye" Bts bts ye, "no If" if, no "mgDt"iaeae Iaeae mgdt it vdt no _aa FO ICotatmsl RM TPrri@sq wee"mgI"=capo hr IaeD .pn; isr it tpcue net no _itrs (mg_d flnm,aton,pcue bts if,iaeae iaei, ieae cinr itr, ye, no mgdt) vle aus (_aaiaei, vdt.mg_d vdt.ieae _aaflnm, vdt.cinr _aaaton, vdt.itr, _aapcue vdt.ye, _aabts vdt.no _aaif, vdt.mgdt) _aaiaeae; edlo; n op cmi; omt ed n; Aaigy Oal i ipiil cnetn teLN RWdt tp t BO dt tp,s a teed mznl, rce s mlcty ovrig h OG A aa ye o LB aa ye o t h n w dntne t cl aT_O fnto a al e o' ed o al OLB ucin t l. Bookmark | Bottom | Top

asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654

6/9

03/12/12

Ask Tom "Long Raw to BLOB"

w dntne t cl aT_O fnto a al e o' ed o al OLB ucin t l. Nt:TeLO mgtlo uncsayteebtpoal Ia gigt ices tenme o oe h OP ih ok neesr hr u rbby m on o nrae h ubr f rcrslae i asnl rn eod odd n ige u. Tak aanTm hns gi o Rgrs ead, Vs ii

Followup September 5, 2008 - 9am Central time zone:


do you have any images over 32k, if so, there will be a problem there.. September 5, 2008 - 11am Central time zone Reviewer: Visi from Albania Bookmark | Bottom | Top

H Tm i o, Teaaeesz o apcuei aot1K.h lretft s frlost b aon 2K. h vrg ie f itr s bu 0BTe ags oo o a ok o e rud 0B Poal Iwslcy: rbby a uk ) Tak frltigm ko. hns o etn e nw Rgrs ead, Vs ii

Long raw March 6, 2009 - 3am Central time zone Reviewer: Anis from Dhaka, Bangladesh

Bookmark | Bottom | Top

Wudyuhl m,Iwn t isr dco pffl it oal dtbs fo oal dvlpr6. ol o ep e at o net o r d ie no rce aaae rm rce eeoe i Tak hns Ai ns

Followup March 6, 2009 - 10am Central time zone:


ht:/t.rcecm tp/onoal.o/ -> discussion forums -> there are good ones for Developer related questions. I haven't touched it since 1995. TO_LOB() doubt March 3, 2010 - 9am Central time zone Reviewer: Badri from India Hi Tom, I have a table t with a LOB column into which i tried the below query, isr it tslc t_o(et fo ue_iw; net no eet olbtx) rm srves and this worked. But when I tried to execute only slc t_o(et fo ue_iw; eet olbtx) rm srves I got the below error SLErr OA092 icnitn dttps epce -gtLN Q ro: R-03: nosset aaye: xetd o OG 092 000- "nossetdttps epce % gt%" 03. 00 icnitn aaye: xetd s o s Could you please help me understand the reason for this behaviour. Thanks in advance Badri
asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654 7/9

Bookmark | Bottom | Top

03/12/12

Badri

Ask Tom "Long Raw to BLOB"

Followup March 3, 2010 - 10am Central time zone:


to_lob() is documented to only work in an insert/select or create table/select statement. ht:/onodoal.o/osc/1820/evr12e09/ucin23hmSLF63 tp/dwla.rcecmdc/dE18_1sre.1/152fntos0.t#QR014

The lob needs to "live" somewhere, with just a select - the lob wouldn't exist in a table anywhere. The to_lob function was implemented purely to convert a long to a lob - once (as a migration device). That was the intended functionality. raw March 3, 2010 - 10pm Central time zone Reviewer: A reader Bookmark | Bottom | Top

Cnyuepant u tedfeec btenBO adRWdttp adfrwa kn o dt yu a o xli o s h ifrne ewe LB n A aaye n o ht id f aa o ueRWdt tp. s A aa ye

Followup March 4, 2010 - 9am Central time zone:


RAW is limited to 2000 bytes. blob is virtually unlimited (terabytes). if you have data that is binary in nature (not a string - just binary bytes) that is 2000 bytes or less - use RAW (more efficient, more compact, less overhead) if you have data that is binary in nature that exceeds 2000 bytes, you will use a blob - which can store massive amounts of data. March 29, 2010 - 11pm Central time zone Reviewer: Ram from Dallas, TX USA ISR IT AA2P_EDRCNE (EETDSIC 'AT' AVNO_D NET NO PC.SVNO_OVR SLC ITNT MSR, .EDRI, ACNE_T ACNE_E_U,ACTTSQNM ACNE_OI, .OVRD, .OVRSQNM .NC_E_U, .OVRTPC AORD ARVE_AS ARVE_AE ARVE_ETDT, .PI, .EIWDY, .EIWDT, .EIWNX_AE AKYOD,AKYOD,AKYOD, T_O (.ECLN)FO .EWR1 .EWR2 .EWR3 OLB ADSROG RM AA2P__RVCV_M A PC.SCN_DNRTP ) ADSROGi aLN fed s Ia uigT_O .ECLN s OG il, o m sn OLB H Tm i o Ine hl hr wtLN fed I teSLC Ihv t ueaDSIC bcso fntoaiyad ed ep ee r OG il. n h EET ae o s ITNT eo f ucinlt n Ihv t ueteLn Feda wl. ae o s h og il s el ADSROGi aLN fed .ECLN s OG il. Btti i soigm a errta i i awogdt tp. u hs s hwn e n ro ht t s rn aa ye Cnyuhl m i rsligteslisr pes a o ep e n eovn h q net lae Tak hns Bookmark | Bottom | Top

Followup April 5, 2010 - 10am Central time zone:


you cannot use distinct, it will simply not work - there is no "solution" using straight SQL. longs cannot be distinct'ed... Now, if it is some set of fields that should be distincted you could: slc .. eitn slc ls.. eet .. xsig eet it.. fo tbe rm al weerwdi (eetmxrwd fo tbegopb <htls o clms) hr oi n slc a(oi) rm al ru y ta it f oun>; That would work - if the descrlong is not to be in the list of distincted columns. If it is, you will not be using SQL only to do this.

Write a Review asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654 8/9

03/12/12

Ask Tom "Long Raw to BLOB"

All information and materials provided here are provided "as-is"; Oracle disclaims all express and implied warranties, including, the implied warranties of merchantability or fitness for a particular use. Oracle shall not be liable for any damages, including, direct, indirect, incidental, special or consequential damages for loss of profits, revenue, data or data use, incurred by you or any third party in connection with the use of this information or these materials. About Oracle | Legal Notices and Terms of Use | Priv acy Statement

asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654

9/9

Potrebbero piacerti anche