varchar sequence Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: varchar sequence

  1. #1
    Join Date
    Feb 2002

    varchar sequence

    I need a varchar sequence of number.

    Say, i want something like PQ1,PQ2,PQ3,PQ4......

    Using sequence i can generate, only number. How can i generate or conacatenate the char with the numbe and insert into a table ?

  2. #2
    Join Date
    Mar 2002
    Mesa, Arizona
    I haven't tried this code out, but I'd try something like this...

    insert into mytable (id) values ('PQ'||to_char(mysequence.nextval));

    I'm assuming "PQ" is a constant.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width