Forum Replies Created

Viewing 15 posts - 5,461 through 5,475 (of 8,731 total)

  • RE: SELECT a String

    Answers in here:

    http://www.sqlservercentral.com/Forums/Topic1640410-392-1.aspx

    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 a String

    I'm leaving 3 possible options. Please don't cross post as it will only fragment the answers.

    SELECT String,

    STUFF( String, 1, CHARINDEX( ',', String), ''),

    ...

    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 on pivot query

    Read the following articles to know how to pivot data using cross tabs and how to make it dynamic.

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    http://www.sqlservercentral.com/articles/Crosstab/65048/

    Here's an incomplete example:

    SELECT zakatDescrp,

    SUM(CASE WHEN YEAR(paymentDte) =...

    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: issue with select statement in stored proceudre

    Read the article linked in my signature. You're not giving the complete picture and I'm certain that this isn't the first time you've been asked to do so.

    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: issue with select statement in stored proceudre

    Please post DDL, sample data and expected results based on that sample data.

    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: Change a selected value to null

    djj (12/1/2014)


    Could you not just have a "CASE WHEN Expct_Delv = '01/01/1753' THEN NULL ELSE Expct_Delv END"?

    Why not use NULLIF() instead of the explicit CASE?

    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: Check format of String

    This is one way of doing it.

    SELECT String,

    CASE WHEN String LIKE '[0-9][0-9][0-9][0-9]/[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]'

    THEN 'True' ELSE 'False' END

    FROM( VALUES

    ...

    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: issue with select statement in stored proceudre

    What's the issue? Where's the select statement? Who has the crystal ball?

    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?

    Steve Jones - SSC Editor (12/1/2014)


    Ed Wagner (11/30/2014)


    Koen Verbeeck (11/27/2014)


    It's time to allow for moderators (privileged forum users) to be able to delete spam.

    Most of the succesful forums/boards/whatever have this....

    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: SQL Query - Simple Question

    How about using the Quirky Update? This method has been mentioned as "unsupported" but that's just a special reason to understand and test correctly. Read the following article to fully...

    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: SQL Query - Simple Question

    Duplicate post. All answers in here: http://www.sqlservercentral.com/Forums/Topic1640241-392-1.aspx

    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: SQL Query - Simple Question

    Hi, could you post DDL and sample data to give you a complete solution?

    The common way before 2012+ versions is to have a self join using row_number() over(partition by customer...

    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: Thanksgiving 2014

    SQLRNNR (11/28/2014)


    Koen Verbeeck (11/28/2014)


    Luis Cazares (11/27/2014)


    Koen Verbeeck (11/27/2014)


    kaspencer (11/27/2014)


    When you have an Americo-centric question like this, you should provide an alternative, such as one based on St. Georges Day or...

    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: Function to Case Text within a Field

    I don't know much about SSRS (other than spell it), but this could give you an idea.

    =UCase(Left(Fields!Event_Type.Value)) & LCase(Right(Fields!Event_Type.Value, Len(Fields!Event_Type.Value) - 1))

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

    Quick thoughts:

    1. Change your splitter to the DelimitedSplit8K or DelimitedSplitN4K[/url]

    2. Read Gail's article about catch-all queries. http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/

    3. Instead of using (SELECT COUNT(*) FROM #TCut), use LEN(@Cut). Applies for every similar...

    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 - 5,461 through 5,475 (of 8,731 total)