I need some advice on if can avoid database tables and transactions. I'm reading a formatted text file into a memory-only datatable, called Input, without updating it to a database as I don't really want the overhead. I'd like to perform a SELECT query using my Input datatable and some lookup tables in a SQL db and INSERT the results into a new memory-only datatable called Output. Again, I just want my datatables Input and Output to be memory-only datatables that don't reside in a db.
But I don't know how to set up a query like that. Can anybody point me in the right direction or tell me that it's not worth it?
Here's what the query looks like using standard db tables and tableadapters. It's not exactly a simple query.
INSERT INTO Output
(RecType, CODE, AreaID, PARAMETER, MCC, Class, Style, Stock_Thickness_Gage, MCCAlt1, MCCAlt2, Comp1, Comp1Qty, Comp2, Comp2Qty, Comp3, Comp3Qty,
Comp4, Comp4Qty, Comp5, Comp5Qty, Category)
SELECT Codes.RECTYPE, Input.CODE, Codes.AREAID, Input.PARAMETER, tblMfgMtl.MCC, ['q-MCC List$'].Class, ['q-MCC List$'].Style, ['q-MCC List$'].Stock_Thickness_Gage,
tblMfgMtl.MCCAlt1, tblMfgMtl.MCCAlt2, tblMfgAssy.Comp1, tblMfgAssy.Comp1Qty, tblMfgAssy.Comp2, tblMfgAssy.Comp2Qty, tblMfgAssy.Comp3,
tblMfgAssy.Comp3Qty, tblMfgAssy.Comp4, tblMfgAssy.Comp4Qty, tblMfgAssy.Comp5, tblMfgAssy.Comp5Qty, ['q-MCC List$'].Category
FROM tblMfgAssy RIGHT OUTER JOIN
Codes INNER JOIN
Input ON Codes.CODE = Input.CODE ON tblMfgAssy.MfgAssyID = Codes.MfgAssy LEFT OUTER JOIN
['q-MCC List$'] INNER JOIN
tblMfgMtl ON ['q-MCC List$'].MCC = tblMfgMtl.MCC ON Codes.MfgMtl = tblMfgMtl.MfgMtlID
WHERE (NOT (Input.CODE LIKE ''))
But I don't know how to set up a query like that. Can anybody point me in the right direction or tell me that it's not worth it?
Here's what the query looks like using standard db tables and tableadapters. It's not exactly a simple query.
INSERT INTO Output
(RecType, CODE, AreaID, PARAMETER, MCC, Class, Style, Stock_Thickness_Gage, MCCAlt1, MCCAlt2, Comp1, Comp1Qty, Comp2, Comp2Qty, Comp3, Comp3Qty,
Comp4, Comp4Qty, Comp5, Comp5Qty, Category)
SELECT Codes.RECTYPE, Input.CODE, Codes.AREAID, Input.PARAMETER, tblMfgMtl.MCC, ['q-MCC List$'].Class, ['q-MCC List$'].Style, ['q-MCC List$'].Stock_Thickness_Gage,
tblMfgMtl.MCCAlt1, tblMfgMtl.MCCAlt2, tblMfgAssy.Comp1, tblMfgAssy.Comp1Qty, tblMfgAssy.Comp2, tblMfgAssy.Comp2Qty, tblMfgAssy.Comp3,
tblMfgAssy.Comp3Qty, tblMfgAssy.Comp4, tblMfgAssy.Comp4Qty, tblMfgAssy.Comp5, tblMfgAssy.Comp5Qty, ['q-MCC List$'].Category
FROM tblMfgAssy RIGHT OUTER JOIN
Codes INNER JOIN
Input ON Codes.CODE = Input.CODE ON tblMfgAssy.MfgAssyID = Codes.MfgAssy LEFT OUTER JOIN
['q-MCC List$'] INNER JOIN
tblMfgMtl ON ['q-MCC List$'].MCC = tblMfgMtl.MCC ON Codes.MfgMtl = tblMfgMtl.MfgMtlID
WHERE (NOT (Input.CODE LIKE ''))