Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 8,731 total)

  • RE: timeout issue

    I agree with Sue. You should do all this through T-SQL. If you prefer, you can use the GUI to build the code and use the bottom in the top...

    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: Split Function Usage for Multiple Multi-Select Parameters

    I've used the clustered PK, but I don't remember if there was an actual improvement or not. There might be, but with a small number of rows (as parameters usually...

    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: Renaming fields and combining them into one column

    CELKO (1/5/2017)


    You are right. Let us post a correction i just got in a hurry. My bad.

    CREATE TABLE Players

    (player_id CHAR(5) NOT NULL PRIMARY KEY,

    first_name VARCHAR(10) NOT NULL,

    last_name VARCHAR(10) NOT...

    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: Split Function Usage for Multiple Multi-Select Parameters

    My suggestion is that you insert parameter values into a table for each parameter.

    Basically, your stored procedures would have a format similar to this:

    CREATE PROCEDURE SomeReport (

    ...

    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: Select * return 24 while select count(1) return 3956892

    What happens when you run them both at the same time?

    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: How to code to find out different names with the same memberid?

    Use HAVING.

    GROUP BY memberid HAVING COUNT( DISTINCT membername) > 1

    or

    GROUP BY memberid HAVING MAX(membername) <> MIN(membername)

    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?

    Phil Parkin (1/5/2017)


    Does anyone have any idea why a thread I created yesterday

    http://www.sqlservercentral.com/Forums/FindPost1847804.aspx

    appears to have removed or marked as spam?

    Maybe you were selling kitchens? Or fake documents? :hehe:

    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: replace null with another column

    Rasmus Remmer Bielidt (1/5/2017)


    Both options have their uses for sure.

    I didn't see anybody making this point, but COALESCE() absolutely needs a non-null argument or it will throw an error where...

    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: replace null with another column

    drew.allen (1/4/2017)


    Brandie Tarvin (1/4/2017)


    I like CASE personally because it allows me to alter values being returned (or add new information) where as COALESCE just returns the original value.

    But you can...

    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: Non-alphanumeric Search Frustration

    Brandie Tarvin (1/4/2017)


    Luis Cazares (1/4/2017)


    Does this works?

    Tip: don't try to do everything in a single pattern. Sometimes is easier to use several patterns.

    NICE, Luis. And I can use a REVERSE(RTRIM(QuestionableColumn))...

    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: Non-alphanumeric Search Frustration

    Eric M Russell (1/4/2017)


    If the user entered codes are not relationally tied to any other table, then what are the ramifications of them being entered "wrong" ?

    I guess is like...

    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: Non-alphanumeric Search Frustration

    Thom A (1/4/2017)


    Eric M Russell (1/4/2017)


    As a side note, it would be great if all valid codes could be pre-loaded into a primary keyed master table, then data validation could...

    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 (1/4/2017)


    BrainDonor (1/4/2017)


    DBMS of the year, apparently - http://db-engines.com/en/blog_post/67

    At a 100,000 foot view, sounds more like a report on marketing success than anything else. 🙂

    Close, but not quite.

    Method...

    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: Non-alphanumeric Search Frustration

    Does this works?

    IF (SELECT OBJECT_ID('tempdb..#MyTemp')) IS NOT NULL

    DROP TABLE #MyTemp;

    CREATE TABLE #MyTemp (QuestionableColumn CHAR(20));

    INSERT INTO #MyTemp (QuestionableColumn)

    VALUES ('ABC1GKUCEEF7AR169582'), --Good value

    ('ABC2G1WG5E37D1157775'), --Good value

    ('BCD3GTU2TEC9FG119962'), --Good value

    ('- ...

    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: Renaming fields and combining them into one column

    drew.allen (1/3/2017)


    Luis Cazares (1/3/2017)


    Keeping Phil's simple formula:

    SELECT name = concat(First_Name, ' ', Last_Name),

    Sports = STUFF(iif(Football = 'Y', '; Football','') + iif(Soccer = 'Y', '; Soccer','') + etc, 1, 2, '')...

    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 - 1,681 through 1,695 (of 8,731 total)