Forum Replies Created

Viewing 15 posts - 3,826 through 3,840 (of 8,731 total)

  • RE: Using SSIS ... Get only numbers from a column

    Set your source as a query instead of a table, then use this:

    SELECT ID,

    Value,

    CASE WHEN Value NOT LIKE '%[^0-9]%'...

    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: Sorted result Set

    Here's the original post. http://www.sqlservercentral.com/Forums/Topic1735322-391-1.aspx

    I've already posted a new possible 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: How to do a Pivot

    Sean Lange (11/13/2015)


    Ed Wagner (11/13/2015)


    Sean Lange (11/13/2015)


    Instead of a PIVOT I would recommend using a crosstab. The syntax is far less obtuse to me and it even has a slight...

    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: t-sql 2012 passing lot of values in a parameter

    Just to make it easier to get to the correct article for DelimitedSplit8K

    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: JOIN in date range slow

    RVO (11/13/2015)


    So you insist CROSS JOIN is a bottleneck.. I guess.

    I actually did a test.

    I removed JOIN ON (1=1).

    But the execution time did not change at all...

    No, I'm just saying...

    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: JOIN in date range slow

    It seems that you had some fun working on this query and you'll have more ahead. 😀

    I'd specify the cross join explicitly, just to let clear that I know what...

    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: complicated sorting parent and child records

    This might do the trick. I can't understand why would anyone want this order.

    WITH rCTE AS(

    SELECT [KeyProductControlDisplay],

    [KeyProductControlDisplayParent],

    ...

    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: Clarification on SARGable predicates

    An index scan is not a bad thing. You might have many nulls which would make the scan a better approach, maybe the column is not part of the index...

    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: Returning two characters from a column

    hoseam (11/13/2015)


    Hi

    I have a column that has values [1,2,3....10,11,13,14 ...]

    I want to return just two characters, e.g [01, 02, 03....10,11,12...]

    I concatenated a string before to

    '0'||CAST(m.d_depend as varchar(2)) as 'depend'

    ...

    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: Clarification on SARGable predicates

    Using IS NULL results in a SARGable predicate. Using ISNULL() results in a non-SARGable predicate. Maybe that's the confusion.

    To be fair, a predicate checking for IS NULL might result in...

    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?

    BL0B_EATER (11/13/2015)


    BrainDonor (11/13/2015)


    I would just like to say, that I've always admired the people that are willing to publish articles on this site.

    Now that I've faced the editor for 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: Using the Stuff Function

    Alan.B (11/12/2015)


    Luis Cazares (11/12/2015)


    Do you know what the stuff function does?

    https://msdn.microsoft.com/en-us/library/ms188043.aspx

    SELECT STUFF ( 'This is a lack of knowledge' , 11 , 7 , 'great' )

    Though STUFF is an insignificant...

    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: JOIN in date range slow

    You might be a victim of triangular joins. http://www.sqlservercentral.com/articles/T-SQL/61539/

    Can you post the information needed as explained in this article: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    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 time span into multiple records

    That's why it's important to test correctly.

    You're right about adding the minutes instead of subtracting them. The NULL value might be there because you're still using the <= comparison.

    I updated...

    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?

    Eirikur Eiriksson (11/12/2015)


    MUST Resist...temptation...bad...joke!!

    😎

    I'm not sure about the bad joke, but I couldn't resist posting. :pinch:

    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 - 3,826 through 3,840 (of 8,731 total)