472,145 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 3055
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 Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.