Glowworm27
Programmer
I have a DTS package that imports several text files. This has been working fine, but we found out that if one of our lookup tables does not contain the rows needed for one of the inner joins that data never gets imported into the tables.
I want to be able to run a query and return some indicator can be True or False, or a recordset. It doesnt matter, just something that I can use to determine if the lookup table is complete or not. If the lookup table is missing rows, I want to fail the package.
If the lookup table is correct then process the package normaly.
Here is a query that will return rows if the lookup table is missing the rows.
running this query will tell me if I am missing stores in the lookup table "Stores" by returning records. It will return no records if the Stores table has all the storenumber records.
If I return any rows I want the package to fail. If No rows (records) are returned then the stores table is up to date, so I can process the files with the package.
Thanks
in advance
G
George Oakes
Check out this awsome .Net Resource!
I want to be able to run a query and return some indicator can be True or False, or a recordset. It doesnt matter, just something that I can use to determine if the lookup table is complete or not. If the lookup table is missing rows, I want to fail the package.
If the lookup table is correct then process the package normaly.
Here is a query that will return rows if the lookup table is missing the rows.
Code:
Select T.Storenumber from TmpInvoices T Where Storenumber Not in (Select S.Storenumber from Stores)
running this query will tell me if I am missing stores in the lookup table "Stores" by returning records. It will return no records if the Stores table has all the storenumber records.
If I return any rows I want the package to fail. If No rows (records) are returned then the stores table is up to date, so I can process the files with the package.
Thanks
in advance
G
George Oakes
Check out this awsome .Net Resource!