Forum Replies Created

Viewing 15 posts - 3,871 through 3,885 (of 26,490 total)

  • RE: Need a little help

    jonathanm 4432 (5/5/2016)


    Msg 156, Level 15, State 1, Line 9

    Incorrect syntax near the keyword 'IF'.

    Msg 195, Level 15, State 10, Line 9

    'AVERAGE' is not a recognized built-in function name.

    Again, you...

  • RE: Need a little help

    For better assistance, please post the DDL (CREATE TABLE statement) for the table(s) involved, sample data (not production data) as INSERT INTO statements for the table(s) involved, expected results based...

  • RE: Need a little help

    jonathanm 4432 (5/5/2016)


    Not getting an error. I am trying to get the if equation to work correctly so that if the average of the sum of the 3 fields is...

  • RE: Need a little help

    jonathanm 4432 (5/5/2016)


    Ok, so I tried to then do an average but getting an error. Would you happen to know what is missing

    select a.[Sales Rep], a.CustomerName as [Customer Name], a.AcctNumber,...

  • RE: Why STUFF

    Jeff Moden (5/5/2016)


    edwardwill (5/4/2016)


    Ed Wagner (5/4/2016)


    It came from Wayne Sheffield's SQL Spackle article on string concatenation. The article is at http://www.sqlservercentral.com/articles/comma+separated+list/71700/. It's a great technique.

    It's broken so no,...

  • RE: Need a little help

    jonathanm 4432 (5/5/2016)


    Thank you very much for your help.

    I will have to look into that. I only do it to reference the tables using because many of the tables...

  • RE: Why STUFF

    TomThomson (5/4/2016)


    I looked at this before morning cofee or breakfast and decided that I couldn't be bothered to guess the answer before the code was fixed - came back at...

  • RE: Why STUFF

    Raghavendra Mudugal (5/4/2016)


    (EP)Z!!!

    No need of STUFF. (very old code)

    declare @t table (PersonID int, AreaCode varchar(10), Exchange varchar(10), Root

    varchar(10))

    declare @t1 table (PersonID int, phone varchar(2048))

    declare @pn varchar(2048), @Pid int

    insert @t

    select 10001,...

  • RE: Why STUFF

    Steve Jones - SSC Editor (5/4/2016)


    Rolling through airports today, but I'll award back points tomorrow.

    Actually, Steve, no one has been asking for their points back. :w00t:

  • RE: Why STUFF

    edwardwill (5/4/2016)


    Ed Wagner (5/4/2016)


    edwardwill (5/4/2016)


    Ed Wagner (5/4/2016)


    It came from Wayne Sheffield's SQL Spackle article on string concatenation. The article is at http://www.sqlservercentral.com/articles/comma+separated+list/71700/. It's a great technique.

    It's broken so...

  • RE: Why STUFF

    edwardwill (5/4/2016)


    Ed Wagner (5/4/2016)


    It came from Wayne Sheffield's SQL Spackle article on string concatenation. The article is at http://www.sqlservercentral.com/articles/comma+separated+list/71700/. It's a great technique.

    It's broken so no, it's not...

  • RE: Why STUFF

    edwardwill (5/4/2016)


    I'd no more ask this person to administer my database than I'd ask Donald Trump to run my country.

    Wow, you have your own country? Must be awesome!

  • RE: Why STUFF

    krachynski (5/4/2016)


    I can't see STUFF() in here and I'm not entirely sure where it would be used but I can make a decent guess about what the purpose is. I'd...

  • RE: Why STUFF

    Could say this is a "May the force be with you" type question.

  • RE: Why STUFF

    Do this so many times I didn't catch that the STUFF function was missing. Got it right without it there.

Viewing 15 posts - 3,871 through 3,885 (of 26,490 total)