|
-
joins
im still having problems with this query. In desparation I went back to the sybase databse and used the visual query builder thats part of the Delphi IDE and constructed the query visually. The ANSI SQL that was generated below works OK in the visual query builder, but when I run it on the oracle database I get an error message telling me that DBO_TRANSHIST.PRG_PROG_NUM is an invalid identifier. If I remove that line I then get the same error message for Dbo_transhist.ait_key. Can anyone give me some pointers here, Im really struggling with this. Heres the ANSI SQL
SELECT Dbo_service_classes.channel_key
FROM service_classes Dbo_service_classes, channel Dbo_channel, transhist Dbo_transhist
LEFT OUTER JOIN txs_billings_dets Dbo_txs_billings_dets
ON (Dbo_service_classes.service_id = Dbo_txs_billings_dets.service_id) , ss_box Dbo_ss_box
LEFT OUTER JOIN aitprg Dbo_aitprg
ON (Dbo_transhist.ait_key = Dbo_aitprg.ait_key)
AND (Dbo_transhist.prg_prog_num = Dbo_aitprg.prg_prog_num)
LEFT OUTER JOIN prg Dbo_prg
ON (Dbo_aitprg.ctr_key = Dbo_prg.ctr_key)
AND (Dbo_aitprg.prg_prog_num = Dbo_prg.prg_prog_num)
WHERE (Dbo_service_classes.channel_key = Dbo_channel.channel_auk)
AND (Dbo_service_classes.channel_key = Dbo_transhist.transhist_channel_cli_key)
AND (Dbo_channel.channel_tx_cod = Dbo_transhist.transhist_tx_cod)
AND (Dbo_ss_box.transhist_key = Dbo_transhist.transhist_key)
AND ( (Dbo_service_classes.service_id = 1)
AND (Dbo_service_classes.schedule_class_id = 1)
AND (Dbo_ss_box.ss_box_visible_flg = 1)
AND (Dbo_transhist.transhist_sched_dtm = TO_DATE('25 JAN 2005')) )
many thanks.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|