Hi David,
Thanks for your input, yes.. it was a copy/paste problem. It's actually correct in the code. I need 2 queries because recordset returns multiple rows and i need to be able to loop through the rows and pull the second recordset of rows based on the first. It's the stranges thing ever, because the code has worked fine for a year and we moved it to SQL2005 this morning and now it doesn't work. No errors, just no returned rows.
Thanks.
Main Topics
Browse All Topics





by: DBoyesPosted on 2007-06-26 at 10:34:18ID: 19365984
Hey AJKConcepts,
I don't see a problem with the code, except a missing " here:
& recordSet("rateID") & ORDER BY a.rateTypeID" should read:
& recordSet("rateID") & " ORDER BY a.rateTypeID"
Could just be a copy/paste error in your posting but just wanted to make sure! Make sure there's a space between the double-quote, and the word "ORDER".
Another suggestion/question - any reason why you don't simply use one query, by joining the nested query to the table referred to in the first query? Such as:
SELECT a.netRate, a.markup, b.rateType, c.startAge, c.endAge
FROM Hotels_Room_Rate a
FULL JOIN AvailableRateTypes b
ON b.rateTypeID = a.rateTypeID
FULL JOIN Hotels_ChildGroups c
ON c.childGroupID = a.childGroupID
INNER JOIN Hotels_Room_Rates_Block hrrb
ON a.rateID = hrrb.rateID
ORDER BY hrrb.startDate, a.rateTypeID
Let me know if either help - just some random thoughts, probably not a real solution!
Regards,
David.