Forum Replies Created

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

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

    😎

  • RE: Bulk insert with SQLINT changes int vlaues

    terry999 (7/31/2014)


    Thanks

    Where do I put the -c I tried

    BULK INSERT tBCP FROM 'C:\temp\tbcp.csv'

    WITH (FORMATFILE='C:\temp\fmt.fmt', DATAFILETYPE='char')

    It doesn't work

    Ooops, my bad, I was thinking in bcp:-P

    Should be DATAFILETYPE = 'char'

    😎

  • RE: common Table(cte) in store procedure?

    Sivaganesh Tamilvendhan (7/31/2014)


    Hi,

    while writing store procedure in db

    most of Time i will Use common Table to write select quries

    for selecting more than seven table whether...

  • RE: Bulk insert with SQLINT changes int vlaues

    You might want to add -c (character format) as it looks like it is using native (-n) format.

    The 21 -> 50 49 -> 12594 is because it translates the character...

  • RE: Bulk insert with SQLINT changes int vlaues

    Quick question, does 7 get translated to 55? Looks like it is reading the character code values as the actual values, change it to SQLCHAR and then convert to int.

    😎

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