Change

  • Hi all,

    Could some one help me code this query which i got from access and want to have it as a stored procedure on SQL Server.

    Here is the code from the query:

    ActDate: Switch([timestart]<=#1:00:00 AM#,[Date]-1,True,[Date])

    What I did understand from this is >> if TimeStart is less than or equal to 1:00:00 AM the subtract 1 from Date, else Date, and return it AS ActDate.

    as a new SQL Server user, i found this really challenging for me, so that why i need your help !!

    I can't create this in views because it actually take parameters.

  • Duplicate post. No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic919053-145-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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