|
|
| Author |
Message |
vaibhav_pal
New User
Joined: 20 Jan 2007 Posts: 4 Location: Mumbai
|
|
|
|
Hi,
I am trying to insert records thru spufi. The data which I want to insert has got ' and , in it. However I am not able to insert the data because either it treats it as end of data for the field or continuation to next field.Is there any way to typecast the single quote(') and comma(,) in spufi insert statement? |
|
| Back to top |
|
 |
References
|
Posted: Wed Mar 19, 2008 3:17 pm Post subject: Re: How to type cast ' and , in Spufi while inserting records |
 |
|
|
 |
vaibhav_pal
New User
Joined: 20 Jan 2007 Posts: 4 Location: Mumbai
|
|
|
|
For Example
INSERT INTO SAMPLETBL VALUES ('ER3,'xyz abc' time')
I am not able to insert the record with the , and ' in the data.
Can anyone provide help on it? |
|
| Back to top |
|
 |
Gnanas SNG
Senior Member
Joined: 06 Sep 2007 Posts: 417 Location: India
|
|
|
|
Here values for how many columns are inserted?
Say,
Two columns,
col1 value - ER3
col2 value - xyz abc' time |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1393 Location: germany
|
|
|
|
for two columns:
| Code: |
INSERT INTO SAMPLETBL
VALUES ('ER3
,'xyz abc' || x'7d' || 'time')
|
that will insert <xzyabc'time> into the second column.
|| is concatenation
x'7d' is hex for an ebcidc apostrophe (single-quote) |
|
| Back to top |
|
 |
Gnanas SNG
Senior Member
Joined: 06 Sep 2007 Posts: 417 Location: India
|
|
|
|
You have to put one more quote if the value contains a qoute.
To insert this,
Use like this,
What is the problem with comma?
Please post the error message and error code. |
|
| Back to top |
|
 |
vaibhav_pal
New User
Joined: 20 Jan 2007 Posts: 4 Location: Mumbai
|
|
|
|
It worked with extra quote.
The problem was with the ' symbol and not comma.
Works fine now.
Thanks for all the help. |
|
| Back to top |
|
 |
|
|