all groups > sql server programming > march 2004 >
You're in the

sql server programming

group:

Record number


Record number Sharon
3/17/2004 10:54:40 PM
sql server programming:
Dear All,
Could anyone please help me with this problem which
regarding the record number.i need to display a records
as the following:
No ID MemName
----- -------- ----------------------------------
1. 12345 NOVAINA HALIMAH
2. 12346 EDYA PUTRA
3. 12347 RICA MANDASARI
4. 12348 PAULUS EFENDI
5. 12349 LELY CHANDRA

My queries are like following :
select m.memcode as ID,m.memname as MemberName
from memreg m, mbr_statemoney o
where m.memcode=o.mbr_id and m.membank='BCA' and
o.t_money>=50000 and o.pv_month='2004.02'
order by m.membank,m.membkbch,m.membankac,m.memcode


what queries do i need to add on at the Queries Analyser
in order for me to display the record number in a file
like above?1.,2.,3.,4........

please help....
it urgent!

thanks

Re: Record number Hari
3/18/2004 1:48:25 PM
Hi,

Have a look into the below link (sample script) to generate record number
and impliment the same in to your script,

http://www.databasejournal.com/scripts/article.php/2224051

Thanks
Hari
MCDBA


[quoted text, click to view]

Re: Record number toylet
3/18/2004 9:34:49 PM
you need something like a self-join to create the record number.
so first generate the result table, then apply self-join on aa.pk >=
bb.pk, where aa and bb are aliases for the same table.

[quoted text, click to view]
--
.~. Might, Courage, Vision. In Linux We Trust.
/ v \ http://www.linux-sxs.org
/( _ )\ Linux 2.4.22-xfs
AddThis Social Bookmark Button