Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)

  • RE: query using results of another query.

    GilaMonster (4/5/2011)


    The IN clause perhaps? (SQL doesn't have arrays)

    Post the two queries and we may be able to help you better.

    Ok here is query 1. This query looks up...

  • RE: Help with a query

    I get your trying to teach me, I wish i had more time to dedicate to learning SQL more. But I think i figured it out anyway. Im...

  • RE: Help with a query

    ok im all sorted out now working just how i want it.

    I had another requirment come up last night however and try as I did I couldnt figure...

  • RE: Help with a query

    Lynn Pettis (2/8/2011)


    lance.kentwell (2/8/2011)


    I figured it out 🙂

    SELECT DATEDIFF(s, '1970-01-01 00:00:00', (SELECT DATEADD(s,0,DATEADD(mm, DATEDIFF(m,0,getdate())-1,0))))/86400

    SELECT DATEDIFF(s, '1970-01-01 00:00:00', (SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate()),0))))/86400

    I also added "/86400" on the end to convert the whole...

  • RE: Help with a query

    I figured it out 🙂

    SELECT DATEDIFF(s, '1970-01-01 00:00:00', (SELECT DATEADD(s,0,DATEADD(mm, DATEDIFF(m,0,getdate())-1,0))))/86400

    SELECT DATEDIFF(s, '1970-01-01 00:00:00', (SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate()),0))))/86400

    I also added "/86400" on the end to convert the whole tings to days...

  • RE: Help with a query

    ok, first I am using this query to get first day of the previous month:

    SELECT DATEADD(s,0,DATEADD(mm, DATEDIFF(m,0,getdate())-1,0))

    Then I take the result and convert it to epoch time suing this...

  • RE: Bit of a noob with some expereince needs help with duplication

    Actually using a staging table is an option. problem is im such a newbie all the ways you suggested to remove the duplicates etc are chinese to me. ...

  • RE: Bit of a noob with some expereince needs help with duplication

    Nope, not an option unfortunately, the service populating this file wont allow it.

Viewing 8 posts - 16 through 23 (of 23 total)