Need help for SQL [message #391967] |
Sun, 15 March 2009 08:37 |
salim_dba
Messages: 1 Registered: March 2009
|
Junior Member |
|
|
I have tables called a ,b
select * from a;
ID DATE
1 1-Mar-09
2 3-Mar-09
3 4-Mar-09
select * from b;
ID DATE_TIME
1 1-Mar-09 1:00PM
1 1-Mar-09 2:00PM
1 1-Mar-09 3:00PM
1 2-Mar-09 12:00AM
3 4-Mar-09 9:00PM
I want to query which will get me result below.
ID DATE_TIME DATE
1 1-Mar-09 1:00PM 1-Mar-09
1 1-Mar-09 2:00PM 1-Mar-09
1 1-Mar-09 3:00PM 1-Mar-09
1 2-Mar-09 12:00AM 1-Mar-09
3 4-Mar-09 9:00PM 4-Mar-09
Could some one please help me to get it .
Thanks in Advance
[EDITED by LF: applied [code] tags; removed superfluous blank lines]
[Updated on: Sun, 15 March 2009 13:30] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Need help for SQL [message #391990 is a reply to message #391989] |
Sun, 15 March 2009 13:57 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | (I didn't quite understand what TO_CHAR has to do with the issue).
|
How do you output a date in a specific format without TO_CHAR?
As OP didn't explain where is his problem, I choose that he does not know how to format a date/time.
Regards
Michel
[Updated on: Sun, 15 March 2009 13:58] Report message to a moderator
|
|
|
|
Re: Need help for SQL [message #392043 is a reply to message #392037] |
Mon, 16 March 2009 03:10 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote: | OP has to follow the Guide lines provided.
|
Wrong: it was not formatted and there is no question (just an output), no test case, no version with 4 decimals...
Quote: | How can you suggest to_char,
esspecially for this
|
How can you get this ouput without TO_CHAR. Show me.
Once again OP does not say if he is unable to find the join or to find how to output. You have your interpretation, I show there could be another one and there may be many other ones. Without a clear question, you can answer what you want.
Regards
Michel
|
|
|