I'm new to SQL but it looks kinda like regular programming so I thought
tblFilters.SBBExh
could be created with
tblFilters.("S" & [whatever field holds BBExh])
sorta like a variable = concatenated values
I need data from one of 15 columns depending on the trading strategy so I can hard code 15 queries and just call the appropriate ones.
is there a container that can hold and execute multiple SQL statements? if so then I can at least group the 3 together that I need for each different strategy. I don't know where that would go in Access.
it would look like
Code:
INSERT INTO tblShortScores ( TradeNum, FilterNum, Rank, ScoreNum )SELECT [Forms]![frmOpenTrades]![TradeNum] AS TradeNum, tblFilters.FilterNum, tblFilters.SBBExh AS Rank, tblFilters.SBBExh AS Score
FROM tblFilters
WHERE (((tblFilters.SBBExh) Is Not Null));
INSERT INTO tblMediumScores ( TradeNum, FilterNum, Rank, ScoreNum )
SELECT [Forms]![frmOpenTrades]![TradeNum] AS TradeNum, tblFilters.FilterNum, tblFilters.MBBExh AS Rank, tblFilters.MBBExh AS Score
FROM tblFilters
WHERE (((tblFilters.MBBExh) Is Not Null));
INSERT INTO tblLongScores ( TradeNum, FilterNum, Rank, ScoreNum )
SELECT [Forms]![frmOpenTrades]![TradeNum] AS TradeNum, tblFilters.FilterNum, tblFilters.LBBExh AS Rank, tblFilters.LBBExh AS Score
FROM tblFilters
WHERE (((tblFilters.LBBExh) Is Not Null));
thanks for the help