Forum Replies Created

Viewing 15 posts - 7,651 through 7,665 (of 8,760 total)

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (7/31/2014)


    SQLRNNR (7/31/2014)


    Because you just had two pina coladas?

    That's completely misworded. It's "because you had just two pina coladas."

    ....in each transaction....:rolleyes:

    😎

  • RE: Adding unique int key using max

    tshad (7/31/2014)


    I am trying to add multiple records to my table (insert/select).

    INSERT INTO Users

    ( User_id ,

    ...

  • RE: Assigning a "Group ID" based on consecutive Values

    Straight forward running total and lag

    😎

    ;WITH BASE AS

    (

    SELECT [R], [D]

    FROM (

    VALUES

    (1,'A')

    ,(2,'B')

    ,(3,'B')

    ,(4,'A')

    ,(5,'B')

    ,(6,'B')

    ,(7,'A')

    ,(8,'A')

    ,(9,'A')) AS X([R],[D]))

    ,PRIME_GROUP AS

    (

    SELECT

    B.R

    ...

  • RE: CLR vs. c# Console App

    Snargables (7/31/2014)


    I need to write a process to get file size in kb and record count in a file. I was planning on writing a c# console app that takes...

  • RE: Are the posted questions getting worse?

    Jeff Moden (7/31/2014)


    swasheck (7/31/2014)


    To qualify my statement, I have no personal context for anything involving Jeff Moden and I'd welcome him. I've only perused SSC forums in the past and...

  • RE: Are the posted questions getting worse?

    SQLRNNR (7/31/2014)


    Eirikur Eiriksson (7/31/2014)


    SQLRNNR (7/31/2014)


    William J. Fellows (7/31/2014)


    To qualify my statement, Steve stares at my legs a lot. 😛

    Well, you have good looking legs.

    :exclamation:Unwanted details:sick:

    Task achieved!!

    Jason, you are a real...

  • RE: Today's Humor..

    GilaMonster (7/31/2014)


    Alvin Ramard (7/30/2014)


    WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:

    MS Access ones.

    That actually is correct advice, for an MS Access database (as in Access tables)...

  • RE: Are the posted questions getting worse?

    SQLRNNR (7/31/2014)


    William J. Fellows (7/31/2014)


    To qualify my statement, Steve stares at my legs a lot. 😛

    Well, you have good looking legs.

    :exclamation:Unwanted details:sick:

  • RE: Are the posted questions getting worse?

    William J. Fellows (7/31/2014)


    To qualify my statement, Steve stares at my legs a lot. 😛

    Think you got it wrong, he's not the tallest tree in the forest:-P

    😎

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (7/31/2014)


    Just dropped over to the Heap Consultancy and I see a comment from Bill in KC about me staring at him from the login banner...

  • RE: Missing Century in Date

    Quick fix for your update

    😎

    declare @mycutoff date = '01/01/2020';

    select [Date] = CONVERT(VARCHAR(10),CASE WHEN convert(datetime,'7/26/29',1) >= @mycutoff THEN DATEADD(YEAR,-100,convert(datetime,'7/26/29',1)) ELSE convert(datetime,'7/26/29',1) END,103)

    Result

    26/07/1929

  • RE: Missing Century in Date

    SQLSeTTeR (7/31/2014)


    Gents - the birthday is 1929 not 2029. I would prefer not to update the server because I don't now the impact.

    Sorry, didn't notice the century before, looks...

  • RE: Missing Century in Date

    Further on Michael's excellent advice, the CONVERT function takes the third optional parameter [style], controls the style of the input/output.

    😎

    select [Date] = CONVERT(VARCHAR(10),convert(date,'7/26/29',1),101)

    Results

    07/26/2029

    European

    select [Date] = CONVERT(VARCHAR(10),convert(date,'7/26/29',1),103)

    Result

    26/07/2029

  • RE: XML Query Help row with no data

    Phil Parkin (7/31/2014)


    Don't think this works if there is no underlying row selected.

    You are right Phil, works for columns but not rows;-)

    Here is a workaround

    😎

    declare @address table

    (

    AddressID int,

    AddressType...

  • RE: XML Query Help row with no data

    Use the ELEMENTS XSINIL after the FOR XML clause.

    😎

Viewing 15 posts - 7,651 through 7,665 (of 8,760 total)