SELECT aDATE, DATEcol, VALUEcol
FROM aTABLE,
 (SELECT TO_DATE('09/01/2005', 'mm/dd/yyyy') aDATE FROM DUAL UNION
 SELECT TO_DATE('09/02/2005', 'mm/dd/yyyy') aDATE FROM DUAL UNION
 SELECT TO_DATE('09/03/2005', 'mm/dd/yyyy') aDATE FROM DUAL UNION
 SELECT TO_DATE('09/04/2005', 'mm/dd/yyyy') aDATE  FROM DUAL UNION
 SELECT TO_DATE('09/05/2005', 'mm/dd/yyyy') aDATE  FROM DUAL)
WHERE aDATE = DATEcol (+)
ORDER BY aDATE



On 11/3/05, Ian Skinner wrote:
> Say one has a table something like this (much simpler then the table I am 
> working with, but should suffice for an example).
>
> aTABLE
> DATEcol VALUEcol
> ------- --------
> 9/1/05  Red
> 9/3/05  Blue
> 9/5/05  Green
>
> I would like to create a result set that looks like this.
>
> aResult
> aDATE  DATEcol VALUEcol
> ------ ------- --------
> 9/1/05 9/1/05  Red
> 9/2/05 NULL    NULL
> 9/3/05 9/3/05  Blue
> 9/4/05 NULL    NULL
> 9/5/05 9/5/05  Green
>
> I imagine that I would create some kind of inline select or from table, but I 
> can't visulize how I would do this.  Is it possible?
>
> The date range will be dynamic so I don't really want to create some table 
> that has all possible dates for all of time, it would be a bit large I 
> believe.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223101
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to