|
Posted by Hugo Kornelis on 07/07/06 21:21
On 7 Jul 2006 11:04:59 -0700, kamin@yankeegroup.com wrote:
>For the output, for each row in tyg_aging_service_matrix, I want to
>return all the records for tyg_aging_due_dates
>
>So in my example, there should be 10 rows returned. Their will be 8
>created_date fields that are null when it's done. This is what i'm
>trying to do.
Hi Kamin,
I don't know why you expect 10 rows, since the sample data for
tyg_aging_due_dates has jjust 6 rows. Maybe you meant to add four more?
Anmyway, I tried the query yoou had in your first post, and I got an
error because you attempt to order by a non-existing column named PS.
After removing the ORDER BY clause, I got six rows. Two with a valid
date in created_date; the remaining four had NULLS:
created_date object_type due_date
----------------------- --------------- -----------------------
NULL yg_report 2006-07-10 00:00:00
2006-07-01 00:00:00.000 yg_report 2006-08-14 00:00:00
NULL yg_report 2006-09-11 00:00:00
NULL yg_decisionnote 2006-07-24 00:00:00
NULL yg_decisionnote 2006-08-28 00:00:00
2006-07-01 00:00:00.000 yg_decisionnote 2006-09-25 00:00:00
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|