Jump to content

Sql Question Help


Recommended Posts

Posted

as of now it is like the below

TRUNC(ETL.END_DT)=TRUNC(SYSDATE)


would have to change

sysdate and include time 6:00 AM

how to do that

Posted

means do u need ? date @ ETL_END_DT @ 600PM or Sys date @ 600PM?

Posted

do one thing if [color=#282828][font=helvetica, arial, sans-serif]ETL_END_DT doesn't have time ... and u need this SQL to fetch only @ 600PM on that particular day then add [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]and condition[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]datepart(sysdate, time) = ''6:00" exactly don't remeber the syntax ...u can google for syntax... fetch time part in sysdate[/font][/color]

Posted

Thanks Cherlapalli_jailer ,

questions is like

daily it will check for trunc(end_dt)= trunc(sysdate) if there is record it will put a control file


now my mgr told me to have a condition saying it should satisfy sysdate and it should have 6 00 am after

how to do that

Posted

[quote name='massmaharaj' timestamp='1349121977' post='1302569116']
Thanks Cherlapalli_jailer ,

questions is like

daily it will check for trunc(end_dt)= trunc(sysdate) if there is record it will put a control file


now my mgr told me to have a condition saying it should satisfy sysdate and it should have 6 00 am after

how to do that
[/quote]


lot of ways to do

let us try it in a simple way without changing the existing one

Add

and condition

look google for syntax as i have to leave in 2 mins...i will log in after 2 Hrs



condition should be time part of sysdate > 0600

Posted

update the NLS parameters to DD-MON-RR HH.MI.SS format to show hour mins and seconds on the data format.

  • Like 1
Posted

[color=#282828][font=helvetica, arial, sans-serif]trunc(end_dt)= trunc(sysdate)[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]every day sysdate lo 6 o clock ki choodali [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]ela raayali [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]like [/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]ee roju [/font][/color]


[color=#282828][font=helvetica, arial, sans-serif]end_dt = 10/01/2012 06 00[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]repu [/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]end_dt =10/02/2012 600 [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]ala choodali daaniki emi sql [/font][/color]

Posted

[quote name='massmaharaj' timestamp='1349125623' post='1302569342']
[color=#282828][font=helvetica, arial, sans-serif]trunc(end_dt)= trunc(sysdate)[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]every day sysdate lo 6 o clock ki choodali [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]ela raayali [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]like [/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]ee roju [/font][/color]


[color=#282828][font=helvetica, arial, sans-serif]end_dt = 10/01/2012 06 00[/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]repu [/font][/color]
[color=#282828][font=helvetica, arial, sans-serif]end_dt =10/02/2012 600 [/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]ala choodali daaniki emi sql [/font][/color]
[/quote]

okasaari " SELECT to_char(SYSDATE, 'HH') FROM dual " chesi chudu @$MN @$MN

Posted

this should work:

select * from table where to_char(end_date,'hh24:mi:ss')='06:00:00' and to_char(sysdate,'hh24:mi:ss')='06:00:00'

Posted

mama work ayindhi

trunc(end_dt)=trunc(sysdate) and to_char(end_dt,'hh24')='06'

Thanks All

Especailly,


[b] [url="http://www.andhrafriends.com/user/30168-cherlapalli-jailer/"]cherlapalli_jailer[/url][/b]


[b] [url="http://www.andhrafriends.com/user/11491-arya/"]ARYA[/url][/b]


[b] [url="http://www.andhrafriends.com/user/13289-cheguevara/"]CheGuevara[/url][/b]



[b] [url="http://www.andhrafriends.com/user/15177-mtkr/"]mtkr[/url][/b]





[b] [url="http://www.andhrafriends.com/user/18800-corleone/"]CORLEONE[/url][/b]

Posted

[quote name='massmaharaj' timestamp='1349128956' post='1302569573']
Thanks you
[/quote]
&C$F

×
×
  • Create New...