Forum Replies Created

Viewing 15 posts - 1,816 through 1,830 (of 10,144 total)

  • RE: Count issue/replace between!!!

    Luis Cazares (1/25/2016)


    Of course, there's a syntax error as you're following the FORMAT syntax instead of the CAST syntax.

    Worth a try:

    Dim SQLStringtempprd123 As String = "SELECT CAST([create_dtim] AS DATE), COUNT(*)...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    This is run with a string in VS 2012, the database table is a mdb (access):

    Dim SQLStringtempprd123 As String = "SELECT CAST([create_dtim],'dd-mm-yyyy'),COUNT(*) AS tot FROM Back_ickpt_prd1 WHERE CAST([create_dtim],'dd-mm-yyyy') between...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    ChrisM@Work (1/25/2016)


    jcachado (1/25/2016)


    Ok,

    The statment is:

    SELECT format([create_dtim],'dd-mm-yyyy'),COUNT(*) AS tot FROM Back_ickpt_prd1 WHERE format([create_dtim],'dd-mm-yyyy') GROUP BY format([create_dtim],'dd-mm-yyyy') order by format([create_dtim],'dd-mm-yyyy') desc

    Its run, but i think the DESC dont work...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    Ok,

    The statment is:

    SELECT format([create_dtim],'dd-mm-yyyy'),COUNT(*) AS tot FROM Back_ickpt_prd1 WHERE format([create_dtim],'dd-mm-yyyy') GROUP BY format([create_dtim],'dd-mm-yyyy') order by format([create_dtim],'dd-mm-yyyy') desc

    Its run, but i think the DESC dont work because is...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    My mistake , already run but not accept the CAST.

    Thks ,

    JC

    Did you get an error message? If so, posting it here would reduce the number of guesses we have...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    Hi again,

    Already work in this way:

    SELECT Format([create_dtim],'dd-mm-yyyy'),COUNT(*) AS tot FROM Back_ickpt_prd1 WHERE Format([create_dtim],'dd-mm-yyyy') GROUP BY Format([create_dtim],'dd-mm-yyyy' order by Format([create_dtim],'dd-mm-yyyy'

    But when i put ORDER BY dont run.

    What is the error?

    Thks...

  • RE: Count issue/replace between!!!

    jcachado (1/25/2016)


    Hi,

    I need help for this statement:

    SELECT whse_id as wh,count(*) as tot FROM Back_ickpt_prd1 where Format([create_dtim],'hh:nn:ss') between '21-01-2016 00:00:01' and '22-01-2016 00:00:01' group by whse_id

    This statement work and show :

    wh...

  • RE: Are the posted questions getting worse?

    Eirikur Eiriksson (1/23/2016)


    Ed Wagner (1/23/2016)


    Eirikur Eiriksson (1/23/2016)


    ChrisM@Work (1/22/2016)


    Ed Wagner (1/22/2016)


    Greg Edwards-268690 (1/21/2016)


    Eirikur Eiriksson (1/21/2016)


    Greg Edwards-268690 (1/21/2016)


    Steve Jones - SSC Editor (1/21/2016)


    Greg Edwards-268690 (1/21/2016)


    It seems he has an elephant on the...

  • RE: Are the posted questions getting worse?

    Ed Wagner (1/22/2016)


    Greg Edwards-268690 (1/21/2016)


    Eirikur Eiriksson (1/21/2016)


    Greg Edwards-268690 (1/21/2016)


    Steve Jones - SSC Editor (1/21/2016)


    Greg Edwards-268690 (1/21/2016)


    It seems he has an elephant on the menu, and a 6 quart pot to...

  • RE: Are the posted questions getting worse?

    SQLRNNR (1/19/2016)


    BL0B_EATER (1/19/2016)


    Anybody notice the new hair style?

    Jabba the Hat.

  • RE: Are the posted questions getting worse?

    rodjkidd (1/19/2016)


    Ed Wagner (1/19/2016)


    Grumpy DBA (1/19/2016)


    RIP Glenn Frey, co-founder of the Eagles. Only 67 years old, left this world much too soon.

    Did Ramsey play last night?

    Yeah, I heard about...

  • RE: Are the posted questions getting worse?

    rodjkidd (1/19/2016)


    BL0B_EATER (1/19/2016)


    ChrisM@Work (1/19/2016)


    BL0B_EATER (1/19/2016)


    So I just took a phone call and the chap on the other end says I am "average" at best and wont hit the ground running........

  • RE: Are the posted questions getting worse?

    BL0B_EATER (1/19/2016)


    So I just took a phone call and the chap on the other end says I am "average" at best and wont hit the ground running..... uhmmm how can...

  • RE: Joining Tables with Right Function

    Jeff Moden (1/18/2016)


    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)


    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)[hrCan we agree on "SARGable in one direction only" as it's often sufficient to permit tweaking a decent plan?

    With the battles I'm...

  • RE: Joining Tables with Right Function

    Jeff Moden (1/18/2016)


    ChrisM@Work (1/18/2016)


    Jeff Moden (1/18/2016)[hrCan we agree on "SARGable in one direction only" as it's often sufficient to permit tweaking a decent plan?

    With the battles I'm currently facing at...

Viewing 15 posts - 1,816 through 1,830 (of 10,144 total)