• Rauf Miah (6/3/2013)


    I have a table with fields and data type like

    companycode [nchar(4)] actcode [nchar(12)] vounum [nchar(14)] trnam [decimel (18,6)]

    I like to build a query which will bring almost 900 rows

    and build query like

    select comcod, actcode, vounum,trnam where comcod=3305 and

    vounum in ('BC201203000073',

    'BC201204000001',

    'BC201204000002',

    'BC201205000001',

    'BC201206000001',

    'BC201206000002') ----------Here I would like to put 900 (nine hundred) vounum data and run the query, the

    problem is data type. It is time consuming to edit every data by putting ' ' and append coma (,) for every vounum. Is there any way to paste the vounum without putting single quote ' vounum ' and appending a coma (,) for every vounum and successfully run the query.

    Are you pulling the vounum data from a seperate table?

    I would go for something like

    select comcod, actcode, vounum,trnam from table where comcod=3305 and

    vounum in (select vounum from table)

    Is this what you're looking for?