I'm need to have a unique record number for each row that a Select statement returns (i.e. - 1 for the 1st record, 2 for the second record, etc.). I've been attempting to do this via "Count", however I am receiving the same record number (1) for each row returned.
SELECT COUNT(*) "RecNum", company_number, accounting_unit, account_number, description, amount, cr_dr
FROM schema.view
WHERE applied_date = '31-JAN-05'
GROUP BY company_number, accounting_unit, account_number, description, amount, cr_dr;
Am I going about this the wrong way or is there something I'm missing??? Thanks.
SELECT COUNT(*) "RecNum", company_number, accounting_unit, account_number, description, amount, cr_dr
FROM schema.view
WHERE applied_date = '31-JAN-05'
GROUP BY company_number, accounting_unit, account_number, description, amount, cr_dr;
Am I going about this the wrong way or is there something I'm missing??? Thanks.