Sql statement to insert text datatype
Posted in 2004
Topics: General Discussion
Dear All, We use filetoblob & filetoclob function to load data in to blob & clob datatype through sql. Is there a similar function for text datatype too. Please let me know. Thanks in advance. Best Regards, Lloyd
--0__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974 Content-type: multipart/alternative; Boundary="1__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974" --1__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable U'll have to use a ESQL/C program for it ... if you've got CSDK on your= box ..in your demo directory there's a program named blobload.ec. U can com= pile that to use it for insertion of BYTE/TEXT data in the table. There's no= straight cut insert SQL statement for BYTE/TEXT data types. Thanx much, Rajib Sarkar Advisory Software Engineer DB2/UDB Regional Advanced Support IBM Data Management Group http://www.ibm.com/software/data/db2/udb/winos2unix/support If we all did the things we are capable of doing, we would literally astound ourselves. -- T. Edison = "LLOYD SERRAO" = <lloyd_s@rediffma = il.com> = To Sent by: ids@iiug.org = forum.subscriber@ = cc iiug.org = Subj= ect Sql statement to insert text = 05/31/2004 05:24 datatype [3057] = AM = = = = = = Dear All, We use filetoblob & filetoclob function to load data in to blob & clob datatype through sql. Is there a similar function for text datatype to= o. Please let me know. Thanks in advance. Best Regards, Lloyd = --1__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable <html><body> <p>U'll have to use a ESQL/C program for it ... if you've got CSDK on y= our box ..in your demo directory there's a program named blobload.ec. U= can compile that to use it for insertion of BYTE/TEXT data in the tabl= e. There's no straight cut insert SQL statement for BYTE/TEXT data type= s.<br> <br> Thanx much,<br> <br> Rajib Sarkar<br> Advisory Software Engineer<br> DB2/UDB Regional Advanced Support<br> IBM Data Management Group<br> <br> <a href=3D"http://www.ibm.com/software/data/db2/udb/winos2unix/support"= >http://www.ibm.com/software/data/db2/udb/winos2unix/support</a><br> <br> <br> If we all did the things we are capable of doing, we would literally as= tound ourselves. -- T. Edison<br> <br> <img src=3D"cid:10__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" width=3D= "16" height=3D"16" alt=3D"Inactive hide details for "LLOYD SERRAO&= quot; <lloyd_s@rediffmail.com>">"LLOYD SERRAO" <lloy= d_s@rediffmail.com><br> <br> <br> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D88BBE43= 5DFC509748f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " wid= th=3D"40%"> <ul> <ul> <ul> <ul><b><font size=3D"2">"LLOYD SERRAO" <lloyd_s@rediffmail= .com></font></b><font size=3D"2"> </font><br> <font size=3D"2">Sent by: forum.subscriber@iiug.org</font> <p><font size=3D"2">05/31/2004 05:24 AM</font></ul> </ul> </ul> </ul> </td><td width=3D"60%"> <table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">= <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">ids@iiug.org</font></td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"= 100%"><img src=3D"cid:30__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" = border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> </td></tr> <tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3= 0__=3D88BBE435DFC509748f9e8a93df938@us.ibm.com" border=3D"0" height=3D"= 1" width=3D"58" alt=3D""><br> <div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt= h=3D"100%"><img src=3D"cid:30__=3D88BBE435DFC509748f9e8a93df938@us.ibm.= com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br> <font size=3D"2">Sql statement to insert text datatype [3057]</font></= td></tr> </table> <table border=3D"0" cellspacing=3D"0" cellpadding=3D"0"> <tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D88BBE435DFC5= 09748f9e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt= =3D""></td><td width=3D"336"><img src=3D"cid:30__=3D88BBE435DFC509748f9= e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><= /td></tr> </table> </td></tr> </table> <br> <tt>Dear All,<br> <br> We use filetoblob & filetoclob function to load data in to blob &am= p; clob datatype through sql. Is there a similar function for tex= t datatype too. Please let me know. Thanks in advance.<br> <br> Best Regards,<br> <br> Lloyd<br> <br> </tt><br> </body></html>= --1__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974-- --0__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=88BBE435DFC509748f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYXJ0U2F2ZXIhAAA7 --0__=88BBE435DFC509748f9e8a93df938690918c88BBE435DFC50974 Content-type: image/gif; name="pic22781.gif" Content-Disposition: inline; filename="pic22781.gif" Content-ID: <20__=88BBE435DFC509748f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB1sZeZgLVA9YVCpnGagVjV171aRVrYR RghXcAG
Succinctly, no. To get a TEXT or BYTE blob into the database, you have to arrange to use a locator variable placeholder, which requires programming. There is code that should do it for you in the SQLCMD package at the IIUG Software Archive (updblob, f'r'instance). -- Jonathan Leffler (jleffler@us.ibm.com) STSM, Informix Database Engineering, IBM Data Management 4100 Bohannon Drive, Menlo Park, CA 94025 Tel: +1 650-926-6921 Tie-Line: 630-6921 "I don't suffer from insanity; I enjoy every minute of it!" forum.subscriber@iiug.org wrote on 05/31/2004 05:24:56 AM: > We use filetoblob & filetoclob function to load data in to blob & > clob datatype through sql. Is there a similar function for text > datatype too. Please let me know. Thanks in advance.