I am using a query to combine 9 queries for the detail to populate a printed form. I am sure that there must be a better way, but I am at a loss. To explain the whole process. The user fills in a form, with an ssn#, a name, an amount and a code number. The form is linked to a temporary table, as none of the data ever needs to be retained. The maximum amount of entries that can be on the final form is 9. The seperate queries look up the code and pass on the data.
The others queries are numbered with the entries being 2 thru 9. The idea of the final query is to pull it all togeather
This works fine as long as there is an entry in all fields. If any of them return no data, then the main query has no data. Is there a way to use isnull? Thanks is advance.
Alan
Senility at its finest
Code:
SELECT [TEMPProtest].[SSN1], [TEMPProtest].[Claimant1], [TEMPProtest].[Amount1], [T-codes].[Description] AS Description1
FROM TEMPProtest INNER JOIN [T-codes] ON [TEMPProtest].[TCODE1]=[T-codes].[T-code]
WITH OWNERACCESS OPTION;
Code:
SELECT a.SSN1, a.Claimant1, a.Amount1, a.Description1, b.SSN2, b.Claimant2, b.Amount2, b.Description2, c.SSN3, c.Claimant3, c.Amount3, c.Description3, d.SSN4, d.Claimant4, d.Amount4, d.Description4, e.SSN5, e.Claimant5, e.Amount5, e.Description5, f.SSN6, f.Claimant6, f.Amount6, f.Description6, g.SSN7, g.Claimant7, g.Amount7, g.Description7, h.SSN8, h.Claimant8, h.Amount8, h.Description8, i.SSN9, i.Claimant9, i.Amount9, i.Description9
FROM [Protest Detail Query1] AS a, [Protest Detail Query2] AS b, [Protest Detail Query3] AS c, [Protest Detail Query4] AS d, [Protest Detail Query5] AS e, [Protest Detail Query6] AS f, [Protest Detail Query7] AS g, [Protest Detail Query8] AS h, [Protest Detail Query9] AS i
WITH OWNERACCESS OPTION;
Alan
Senility at its finest