RE: QUERY HELP!!!

RE: QUERY HELP!!!

 

  


Try:

Select to_char(start_week,'DAY') from table where...

You will get the day of the week, MONDAY, TUESDAY,... SUNDAY

Select to_char(start_week,'day') from table where...

Will give the same in lower case (i.e. sunday).

You can then compare in your pl/sql as required.

HTH
John.

-----Original Message-----
From: abishek
[mailto:oracledba-ezmlmshield-x89689919.[Email address protected]
Sent: 31 August 2006 07:48
To: LazyDBA Discussion
Subject: QUERY HELP!!!


Hi All,

I have a date column(START_WEEK)in my table.I need to check whether the
dates available in this column are all Sunday's and not any other day.If
it any other day apart from I have to follow some other logic.My
question is how can you check whether the column contains dates which
are Sunday in my PL/SQL block??

I should not use a cursor.Is it possible to check using oracle functions
combined with a 'SELECT clause' or any other way without the usage of a
cursor!!

Thanks,
Abishek





The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain proprietary, confidential or privileged information. If you are not
the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this
message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should
check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


-----------------------------------------
Information in this email including any attachments may be
privileged, confidential and is intended exclusively for the
addressee. The views expressed may not be official policy, but the
personal views of the originator. If you have received it in error,
please notify the sender by return e-mail and delete it from your
system. You should not reproduce, distribute, store, retransmit,
use or disclose its contents to anyone.

Please note we reserve the right to monitor all e-mail
communication through our internal and external networks.

SKY and the SKY marks are trade marks of British Sky Broadcasting
Group plc and are used under licence. British Sky Broadcasting
Limited (Registration No. 2906991), Sky Interactive Limited
(Registration No. 3554332), Sky-In-Home Service Limited
(Registration No. 2067075) and Sky Subscribers Services Limited
(Registration No. 2340150) are direct or indirect subsidiaries of
British Sky Broadcasting Group plc (Registration No. 2247735). All
of the companies mentioned in this paragraph are incorporated in
England and Wales and share the same registered office at Grant
Way, Isleworth, Middlesex TW7 5QD.


Oracle LazyDBA home page