Forum Replies Created

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

  • RE: Compare delimited data - same data but in a different order

    So, you have a current solution but would like a better approach?

    You could try with EXCEPT or NOT EXISTS.

    Here are the examples.

    select PArtNumber,

    Item

    from #Table_Orig prev

    CROSS APPLY dbo.DelimitedSplit8K(VALUE, ' ')

    WHERE prev.FileVersion...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: could not understand what the error is

    From the first line, it seems that you don't have permissions to SELECT data from a table.

    It would help if you tell us what were you trying to do.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Compare delimited data - same data but in a different order

    To help you, we would need some consumable DDL, sample data and expected results based on the sample data provided as noted in the article linked on my signature.

    I know...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Using Dynamic SQL to build temp table...doesn't work?

    You could also avoid using dynamic SQL, even if it might reduce performance a bit.

    You could try this.

    DECLARE @ReportLevel AS VARCHAR(10);

    SELECT *

    INTO #TempLevels

    FROM tblLevels AS a

    INNER JOIN tblReports AS b...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: I need help Please :(

    Do you have some column to identify the night shift?

    Otherwise, you would have to code exactly for that employee and it will fail when another employee takes the night shift.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need help with Charindex function..

    Just another possible solution.

    SELECT *

    FROM DelimitedSplit8K(@test, ' ') x

    WHERE CHARINDEX( '@', x.Item) > 0

    For the code of DelimitedSplit8K please read the following article:

    http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: same issue

    Use the same solution 😉

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Jeff Moden (9/29/2013)


    I'm am totally afraid for this person...

    http://www.sqlservercentral.com/Forums/Topic1499747-391-1.aspx

    For this person or for his/her company?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Lynn Pettis (9/29/2013)


    I am officially a grandfather, again. Kassondra gave birth to her second son, Branson James on 9/28 @ 6:19 PM MDT!

    Congratulations Lynn. Best wishes for the newborn...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Display Multiple Fields in Case

    I don't understand completely your problem. Please read the article linked on my signature to guide you on your posts and get better help. If you give me DDL, some...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Display Multiple Fields in Case

    You can't. You need to repeat the CASE statement for every column needed or change the logic.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Sean Lange (9/27/2013)


    Luis Cazares (9/27/2013)


    Sean Lange (9/27/2013)


    Luis Cazares (9/27/2013)


    Today, I'm really pissed off with the database and network administrators. Because of the lack of good planning and best practices, instead...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Error converting data type nvarchar to numeric

    To add to what has been posted, you could read this article:

    Why doesn’t ISNUMERIC work correctly? (SQL Spackle)[/url]

    EDIT: There's a good solution but you might not like it. Use TRY_CAST()...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Find a character in string

    ScottPletcher (9/27/2013)


    Neither CAST nor CASE is actually necessary here:

    SIGN(CHARINDEX('@', <string_value>))

    +1 I've never used it before and had forgotten this function.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: query issue

    You need to add a MAX (or MIN) to your price columns and group by the others.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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