Forum Replies Created

Viewing 15 posts - 1,501 through 1,515 (of 2,007 total)

  • RE: help please!! need to transpose date rows to columns dynamically

    Hello and welcome to SSC!

    It seems that your DDL script seems to have become detached from your post, or perhaps you were unaware of the benefits of providing one.

    When...

  • RE: Problems calculating rates according to dates and times

    Charlottecb (9/27/2011)


    Thanks for your help.

    No problem, glad you're satisfied!

    I see you're obviously too busy to provide DDL and sample data as per this article[/url]. It's a shame, because I'm sure...

  • RE: Extracting date from text string

    pjsweat (9/27/2011)


    I am trying to pull out the date '08/10/2011 from the below

    text column into a seperate field -

    'Your item was delivered at 12:59 PM on 08/10/2011 in MARTINEZ,CA...

  • RE: Need date: Today - 2 years..

    calvo (9/27/2011)


    Cadavre (9/27/2011)


    calvo (9/27/2011)


    Have you checked that link? There's all the date conversions and date manipulations you'll ever need there.

    DATEADD(YEAR,-2,cast(CURRENT_TIMESTAMP as DATE))

    Just to prove that I do listen when I'm...

  • RE: Need date: Today - 2 years..

    calvo (9/27/2011)


    Have you checked that link? There's all the date conversions and date manipulations you'll ever need there.

    DATEADD(YEAR,-2,cast(CURRENT_TIMESTAMP as DATE))

    Just to prove that I do listen when I'm taught something...

  • RE: Need date: Today - 2 years..

    Express12 (9/27/2011)


    thank you.. now, how might I modify the above solution:

    SELECT DATEADD(YEAR,-2,CURRENT_TIMESTAMP)

    to render a TIME = all 0's

    SELECT DATEADD(dd, DATEDIFF(dd,0,DATEADD(YEAR,-2,GETDATE())), 0)

    --Equivalent

    SELECT DATEADD(dd, DATEDIFF(dd,0,GETDATE()) -730, 0)

    But it's really no better than...

  • RE: Need date: Today - 2 years..

    Express12 (9/27/2011)


    This statement renders 2 years ago today:

    SELECT DATEADD(dd, DATEDIFF(dd,0,GETDATE()) -730, 0)

    How can I modify the above statement to use the YEAR instead of dd -- to obtain same result?

    (eg......

  • RE: grouping issue (I think?)

    p.stevens76 (9/27/2011)


    If there is anything else you require please let me know.

    many Thanks in adavance

    I'll try again, obviously I wasn't clear.

    Thankyou for your very helpful DDL script! But unfortunately,...

  • RE: COPY ALL THE ROW'S VALUE ONLY FROM EXISTING COLUMN (NVARCHAR) TO ANOTHER EXISTING COLUMN (NTEXT) IN SQL 2005

    grahamrd (9/26/2011)


    Thank you Cadavre,

    Your query is work very good and it's did what i want thank you very much:kiss:

    I went to many forums spent about ten days but I can...

  • RE: Problems calculating rates according to dates and times

    Charlottecb (9/27/2011)


    Hi All,

    I'm having a problem constructing a SQL Server 2008 stored procedure and any help would be gratefully received...

    A bit of background info...

    I have a list of contractors doing...

  • RE: grouping issue (I think?)

    OK, I know we've had this discussion before 😉

    If you post readily consumable data and DDL scripts, then people will fall over themselves attempting to help. If you post a...

  • RE: grouping issue (I think?)

    If you can supply us with suitable test data, I'm sure this can be solved in a nice set-based approach.

    All I've done below is reformatted your code a little, to...

  • RE: Select top row and second top row from DIM table

    duggal.priyanka06 (9/26/2011)


    I have a dim table (publish.dim_strategy). The strategies here get expired. I want to select the top row from the expired strategies.i.e. the one marked with 2011-08-05 04:10:16.000 in...

  • RE: COPY ALL THE ROW'S VALUE ONLY FROM EXISTING COLUMN (NVARCHAR) TO ANOTHER EXISTING COLUMN (NTEXT) IN SQL 2005

    grahamrd (9/24/2011)


    Hi Mr. Jones,

    Thank You very much for quick reply.

    Yes I have change EXTENDEDDESCRIPTION (NVARCHAR(MAX) USING SQL Server Management Studio

    Now I need to copy all the value from DESCRIPTION(nvarchar) column...

  • RE: Allocate Payments to Transactions.

    Good morning and welcome to SSC!

    It seems that your DDL script seems to have become detached from your post, or perhaps you were unaware of the benefits of providing...

Viewing 15 posts - 1,501 through 1,515 (of 2,007 total)