Oracle data pull by SQL criteria?

  • I have an SQL table that captures two values during nightly processing - one for a daily minimum sequence number and a second for a daily maximum sequence number. I need to reference these numbers to pull data from Oracle - pulling all records from a specific table with sequence numbers between the two SQL values. I'm lost at how to incorporate the SQL values in the Oracle data pull. The gist of what I want to do is:

    select * from "FW_INT"."MFA_TRANSFER" where (SYSTEMID = '006') AND (TRANSSEQ > (select SysValue from server2.LTS.dbo.LTSValues where SysValueID = 'MaxSeqNum')) and (TRANSSEQ < (select SysValue from server2.LTS.dbo.LTSValues where SysValueID = 'MinSeqNum'))

    but I'm not having any luck getting the syntax worked out. I'm pretty new at working with Oracle, but have had great luck so far with straight data pulls... and can run this load manually by typing the daily min/max values in each time I need to run it. Automating it would be a wonderful thing! Any help would be greatly appreciated!

    Laura

  • Never mind... I gave up doing this in SQL and just wrote a vb app to do it - will just call that from the scheduler...

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply