Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)

  • RE: If ... select ...else then ??

    If i change the query to this

    declare @dow int

    declare @2SundaysAgo datetime

    declare @lastSaturday datetime

    select @dow = datepart(dw, getdate())

    select @2SundaysAgo = getdate() - (7 + (@dow - 1))

    select @lastSaturday = getdate() -...

  • RE: If ... select ...else then ??

    Sorry, my query is

    ****** Script for SelectTopNRows command from SSMS ******/

    declare @dow int

    declare @2SundaysAgo datetime

    declare @lastSaturday datetime

    select @dow = datepart(dw, getdate())

    select @2SundaysAgo = getdate() - (7 + (@dow - 1))

    select...

  • RE: If ... select ...else then ??

    Here are my full query and it did not get what i want

    /****** Script for SelectTopNRows command from SSMS ******/

    declare @dow int

    declare @2SundaysAgo datetime

    declare @lastSaturday datetime

    select @dow = datepart(dw,...

  • RE: If ... select ...else then ??

    I did not create database, only try to run cron script to get report, here is the sample of the out put

    42,2012-02-23 11:17:22.000,2012-02-23 12:28:34.850,setup,johnny,test

    42,2012-02-23 12:28:35.000,2012-02-23 12:29:12.150,active,jonny,test

    50,2012-02-23 12:30:12.000,2012-02-25 16:51:04.037,active,jonny,test

    3,2012-02-21 12:12:24.000,2012-02-21 13:42:52.793,active,timmy,test

    25,2012-02-21...

Viewing 4 posts - 16 through 19 (of 19 total)