Forum Replies Created

Viewing 15 posts - 361 through 375 (of 542 total)

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/10/2011)


    For the next time around, you can use this tool, it generates the insert statement for the sample data. Takes only 2-3 secs per table...

    http://www.ssmstoolspack.com/

    Thanks a ton Ninja...

  • RE: Getting data within a time period

    Roy Ernest (8/9/2011)


    pwalter, Please keep in mind that SQL Server is too vast to have knowledge in all areas. For instance, I am not a T-SQL guru. I have more...

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/9/2011)


    Remove the filter for >= Today.

    You'll need to add a filter for only "uncompleted" trips or something like that (however this is represented in your data). I can't...

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/9/2011)


    That's already what my query is doing, anything between now and the next 3 months.

    What dates are you missing in you new requirements?

    Sorry for the Mis-explanation, now the requirment...

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/3/2011)


    Not much.

    SELECT * FROM dbo.Calendar WHERE dt >= DATEADD(D, 0, DATEDIFF(D, 0, GETDATE())) AND dt < DATEADD(MM, 3, GETDATE())

    Again STOP cross posting.

    Hi Ninja,

    If you remember you helped me with...

  • RE: Getting data within a time period

    David Burrows (8/5/2011)


    pwalter83 (8/5/2011)


    I tried your query but its displaying data for ARRIVAL_SCHEDULE_DT 3 months prior to todays date now.

    My mistake I thought the date test was for BEZEE only

    WHERE...

  • RE: Getting data within a time period

    David Burrows (8/5/2011)


    OK understand the status for arrived but still not sure about the 'arrived first' bit.

    This will select all ports except 'BEZEE' which will only be selected if the...

  • RE: Getting data within a time period

    Welsh Corgi (8/4/2011)


    Paul,

    Did you ever resolve the issue with the script to insert data?

    I may have missed it but where is the sample output?

    Regards,

    WC

    Hi,

    No Welsh, I am still struggling with...

  • RE: Getting data within a time period

    David Burrows (8/4/2011)


    Now all that needs to be done is just include the condition that the above scenario will apply only if the ship reaches the port(PORT_CD) 'BEZEE' first.

    How do...

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/4/2011)


    Why?

    I am tired, mate and just cant seem to create inserts through the method suggested in the link you mentioned. this is really frustrating...i am done with the whole...

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/4/2011)


    Try again, that code works.

    okay thanks for your help, Ninja, I cant go any further than this.

  • RE: Getting data within a time period

    pwalter83 (8/4/2011)


    pwalter83 (8/4/2011)


    Ninja's_RGR'us (8/3/2011)


    Normally you'd join on the itinaty table where first port = 'port code'

    Still not too sure where you need help here.

    Can't see the tables, data nor code.

    Pls...

  • RE: Getting data within a time period

    pwalter83 (8/4/2011)


    Ninja's_RGR'us (8/3/2011)


    Normally you'd join on the itinaty table where first port = 'port code'

    Still not too sure where you need help here.

    Can't see the tables, data nor code.

    Pls also...

  • RE: Getting data within a time period

    Welsh Corgi (8/4/2011)


    Nice double post.

    Ya, interesting isn't it ? you like it don't you

  • RE: Getting data within a time period

    Ninja's_RGR'us (8/3/2011)


    Normally you'd join on the itinaty table where first port = 'port code'

    Still not too sure where you need help here.

    Can't see the tables, data nor code.

    Pls also find...

Viewing 15 posts - 361 through 375 (of 542 total)