Need help with syntax
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Need help with syntax

  1. #1
    Join Date
    Sep 2001
    Posts
    163

    Need help with syntax

    I am trying to write a piece of pl/sql code and I can't figure out the syntax.

    Inside a table, I have a column called "attribute_name"
    The data for attribute_name looks like this:
    Product_id_1
    Product_id_2
    Product_id_3
    etc.
    (the only difference is the # part)

    What I am trying to do is loop though a routine and append the number on to the end of the field criteria.

    For example. I want to append the current value of the loop onto the end of the "Product_id_" field so I can get the value from colA.

    Select colA
    from tableA
    where attribute_name = 'Product_id_'

    I am at a loss on how to append the value of the loop counter on to the end of the field.

    Any suggestions?

    Thanks.

  2. #2
    Join Date
    Feb 2004
    Posts
    77
    use || (double pipe)

    'product_'||l_seq

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