Forum Replies Created

Viewing 15 posts - 376 through 390 (of 542 total)

  • 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.

    5th and last...

  • 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.

    4th table: ...

  • 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.

    3rd table: MG_VSLVOY_SCHEDULE

    -----------------------------

    USE...

  • 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.

    2nd table: MG_VESSEL_VOYAGE

    -----------------------------

    USE...

  • 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.

    Would this explanation...

  • RE: Getting data within a time period

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


    Can you paste the whole where clause you have right now (need to see the parenthesis)

    It's still unclear to me atm. I'll read it back in a couple...

  • RE: Getting data within a time period

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


    So basically you want the date filter to only apply to that 1 port.

    All other ports show all rows no matter the dates?

    Actually no, the date filter along with...

  • RE: Getting data within a time period

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


    Of those 3 rows, which ones need to stay, which one needs to go.

    Actually that would depend, if the ARRIVAL_SCHEDULE_DT is within the 3 months time range when checked...

  • RE: Getting data within a time period

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


    Not clear in my mind.

    I need to see a few rows of data and required output.

    Okay I have some sample data below from a table-

    ---------------------------

    ARRIVAL_SCHEDULE_DT -...

  • RE: Getting data within a time period

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


    Trying to send the correct code again.

    SELECT

    *

    FROM

    dbo.Calendar

    WHERE

    dt >= DATEADD(D , 0 , DATEDIFF(D , 0 , GETDATE()))

    ...

  • RE: Getting data within a time period

    pwalter83 (8/3/2011)


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


    Aside for good manner and respect?

    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.

    Thanks for...

  • RE: Getting data within a time period

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


    Aside for good manner and respect?

    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.

    Thanks for your...

  • RE: Help with SQL query

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


    I think you missed a typo in your post

    AND MG_VSLVOY_SCHEDULE.ARRIVAL_SCHEDULE_DT >= dateadd(mm, -3, getdate())

    No more replies here please, continue the discussion here : http://www.sqlservercentral.com/Forums/Topic1153351-149-1.aspx

    okay you win Ninja, you...

  • RE: SQL code issue

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


    pwalter83 (8/3/2011)


    Welsh Corgi (8/3/2011)


    Do you know what DDL and sample data is?

    No actually my English is not good neither are my SQL skills...I do know what a stored procedure...

  • RE: SQL code issue

    Welsh Corgi (8/3/2011)


    Bon Voyage.

    You too

Viewing 15 posts - 376 through 390 (of 542 total)