Help - "Business Day" Problem



Greetings,
I have a requirement where an input date will be provided and I
have to
update a table with the date previous to input_date (input_date - 1)

All I have to make sure is input_date - 1 should not be 'SAT' or 'SUN'
and should not be
in our holiday table.

Something like

UPDATE TABLE1
SET final_date =(SELECT input_date - 1
FROM ...
WHERE TO_CHAR(TO_DATE ('input_date') - 1,'DY') NOT IN
('SAT','SUN')
AND NOT EXISTS (SELECT h_holiday from holiday where h_holiday =
input_date)

My question do we need the FROM clause in the subquery? If yes, what
to specify as this is just an
input date and not from any table.

Any help would be appreciated.

TIA

.



Relevant Pages

  • Re: Help needed with subqueries.
    ... TOP 100 percent is needed if the subquery contains an ORDER BY clause. ... It works if you specify an alias for the subquery. ...
    (microsoft.public.sqlserver.programming)
  • Re: Workday Function Question
    ... >I am creating a schedule to specify start and finish date of various tasks. ... > Some of the durtions of these tasks can be many months. ... > How can I have the function operate with more than one holiday. ...
    (microsoft.public.excel.worksheet.functions)
  • Workday Function Question
    ... I am creating a schedule to specify start and finish date of various tasks. ... Some of the durtions of these tasks can be many months. ... How can I have the function operate with more than one holiday. ...
    (microsoft.public.excel.worksheet.functions)