I have a question about a query. :)
Here is my current query:
SELECT
a.Data1,
a.Data2,
a.data3,
b.info1,
b.info2,
b.info3,
c.stuff1,
c.stufff3,
(SELECT
SUM(e.stuff1) as AllStuff
FROM
OtherTable
WHERE
e.stuff2 = a.data1) as SuperStuff
FROM
((Table1.a inner join table2.b on Table1.Data1 =
Table2.Info1)
Inner Join table3.c on Table1.Data1 = Table3.stuff1)
WHERE
Data1 >= SomeNumber
AND data1 <= SomeOtherNumber
AND info2 IN ('a','b')
ORDER BY
Data1
OK, after all that, and in table1, table2, and table3, each query to it will
return 1 record for the a.data1 number I am looking up.
Now, I have another table, table4, which has 2 - 6 entries for each a.data1
number and I am trying to use 1 query instead of looping through this output
and doing like 600 little database hits to get the 2 - 6 records for each
a.data1 number in table4.
Does anyone know how I can return a dataset that looks like this???
Data1, data2, data3, info1, info2, info3, stuff1, stuff3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
Data1, data2, data3, info1, info2, info3, stuff1, stuff3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
Data1, data2, data3, info1, info2, info3, stuff1, stuff3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
table4.field1, table4.field2,
table4.field3
I am wracking my brain on this one!!! Thanks a lot!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm