469,166 Members | 2,174 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,166 developers. It's quick & easy.

Lpad and Rpad?

11
can we use Lpad() or Rpad() in insert statement?.............

if yes, kindly help me out with the query.....
Oct 30 '07 #1
3 2920
debasisdas
8,127 Expert 4TB
Kindly post the query that that you are trying to execute with the mentioned functions.
Oct 30 '07 #2
Ale
11
Kindly post the query that that you are trying to execute with the mentioned functions.
we can use rpad() in the select statement........

for Ex: select lpad(cust_code,5,'0') from customer;

I've generated a sequence for the column cust_code in the table....startin with 1 and so on....,now after executing the above query....we get....

00001
00002
00003
.
.
.

my question is....can we directly pad them and insert in to the table, rather than selecting it...storing it in some variable....and thn inserting it as a string???
Oct 30 '07 #3
debasisdas
8,127 Expert 4TB
Yes you can directly use both of those functions in insert statment.
Oct 30 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by woody.hagar | last post: by
8 posts views Thread by Vinay Jain | last post: by
1 post views Thread by vp | last post: by
amitpatel66
reply views Thread by amitpatel66 | last post: by
3 posts views Thread by Roy | last post: by
1 post views Thread by Roy | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.