find out missing date Values

Posted by Senthilmcatyr under Sql Server on 8/31/2011 | Points: 10 | Views : 1197 | Status : [Member] | Replies : 2
Hi,
What is mean by "SELECT TRUNC(SYSDATE)+LEVEL AS adate FROM dual CONNECT BY LEVEL <=154 " ? I can't understand in this query.


Regards,
SenthilKumar.S




Responses

Posted by: Vuyiswamb on: 9/2/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
This does not look Microsoft SQL , it looks like a Oracle query. The Trunc looks like its truncating , i am not sure how its done.



Thank you for posting at Dotnetfunda
[Administrator]

Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 9/2/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,,

it's a oracle Query . . . TRUNC r use for Fetch Cuurent Date . .. if u want to Do this in Sql so Use Like Three Way . .


SELECT CURRENT_TIMESTAMP
GO
SELECT {fn NOW()}
GO
SELECT GETDATE()
GO


Best Regard's
Prabhakar

Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response