Get Value from a table Based on current Day

  • Hi All,

        I need to write a query which get me either one of the column(WKDAY or WKEND) based on the Following conditions.

    i. If Current day is between Mon - Friday, Need to pick value from WKDAY column from a Table.

    ii. If Current day is either saturday or sunday, need to pick value from WKEND column from a Table.

    Any help would be appreciated.

    Thanks in advance

    -Suresh

     

  • Select case when datepart(dw, GetDate()) < 6 then A.WKDAY else B.WKEND end as WEWD from ...

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply