Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Can u please help me in one of my query reports

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-27 : 08:26:50
Neeraj writes "I have 4 tables of a legacy system and i need to generate a report with fields from these tables.
[Unique Fields]

CSD table
[csd_orig, csd_subj, csd_type, csd_numb, csd_revi,] csd_labl, csd_stage, csd_issu, csd_altr, csd_reqd, csd_ownr, csd_tdes, csd_aclas

TRA table
[tra_trno, tra_drgn,] tra_medi, tra_copy, tra_appr, tra_stag, [tra_part,] tra_type

TRD table
[trd_trno, trd_part,] trd_lock, trd_copy, trd_medi, trd_type, [trd_cc,] trd_recd, trd_dset

APR table
[apr_docu, apr_part,] apr_type, apr_trn2, apr_stat, apr_reqd

select
csd1.csd_altr, csd1.csd_labl, csd1.csd_issu,
csd2.csd_altr, csd2.csd_issu,
trd1.trd_recd,
apr1.apr_reqd, apr1.apr_trn2, apr1.apr_stat
from
e0362csd csd1,
e0362tra tra1,
e0362csd csd2,
e0362trd trd1,
e0362apr apr1
where
csd1.csd_orig = 'BS' and
csd1.csd_subj = 'MSUB' and
csd1.csd_type = 'M' and

tra1.tra_trno = csd2.csd_orig + csd2.csd_subj + csd2.csd_type + csd2.csd_numb + csd2.csd_revi and
tra1.tra_drgn = csd1.csd_orig + csd1.csd_subj + csd1.csd_type + csd1.csd_numb + csd1.csd_revi and
tra1.tra_part = 'NAKHE' and
tra1.tra_type = 'A' and

trd1.trd_trno = tra1.tra_trno and
trd1.trd_part = tra1.tra_part and
trd1.trd_cc = '0' and
trd1.trd_type = 'A' and

apr1.apr_docu = tra1.tra_drgn and
apr1.apr_part = tra1.tra_part and
apr1.apr_type = 'A'

order by
csd1.csd_orig + csd1.csd_subj + csd1.csd_type + csd1.csd_numb + csd1.csd_revi

I get a report with this ... but the way I need is a bit different ... I need your help asap ...please.

Here i dont see a link for attachment since u may not get the real problem ... that i am facing when the tables are populated with few thousand rows ... May i send you an attachemnt of few things ... how and where... on what id URGENT PLEASE."

jhermiz

3564 Posts

Posted - 2005-06-27 : 09:49:17
huh?


Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page
   

- Advertisement -