Forum Replies Created

Viewing 15 posts - 8,176 through 8,190 (of 8,731 total)

  • RE: Query to update records - not working

    Your requirement is not clear. How do you determine which value should you enter?

    You should post DDL and sample data in a consumable format so we don't waste time on...

    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: Help explaining query results.

    Jason-299789 (1/29/2013)


    This URL may explain it better http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/

    I believe that this article explains better this situation

    http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/

    The article is really interesting and worth reading but the conclusion is this:

    "Most importantly, 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: T-SQL, SELECT 10TH AND 11TH HIGHEST SALARY EMPLOYEES FROM EMPLOYEE TABLE

    How about thinking you need the first 11 but you need to discard the first 9. How do you discard rows? EXCEPT, NOT IN, NOT EXISTS, OUTER JOIN?

    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 Help with a loop (I believe)

    SQL_Enthusiast (1/28/2013)


    You know what, never mind. I'll go somewhere else for my answer. Thanks

    Really bad attitude.

    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 Help with a loop (I believe)

    Something like this?

    CREATE TABLE CHG_ITEM(

    CHARGE_BATCH_ID int,

    CHARGE_ITEM_IDint,

    REVENUE_SITE_IDint)

    INSERT INTO CHG_ITEM(CHARGE_BATCH_ID, CHARGE_ITEM_ID, REVENUE_SITE_ID)

    VALUES

    (1, 15929, 1000),

    (1, 16930, 1000),

    (10, 17186, 2000),

    (10, 18187, 5000),

    (10, 22188,2000),

    (22,...

    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: Help with creating a string

    Assuming you have a Tally table you can try this:

    DECLARE @Start_year int, @End_Year int;

    SET @Start_Year = 2011 ;

    SET @End_Year = 2013;

    SELECT STUFF((

    SELECT '/' + RIGHT( CAST( N AS varchar(4)),...

    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: why do these queries perform differently

    Using your examples:

    ( 'Ab','BC',CD') are non-Unicode strings (char/varchar)

    (N'Ab',N'BC',N'CD') are Unicode strings (nchar/nvarchar)

    The datatypes are differents and the clearest example of it is that a char(1) uses 1byte and nchar(1) uses...

    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: why do these queries perform differently

    2 word: Implicit conversion

    SQL Server needs to do implicit conversions that may affect the query performance.

    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: Embedding Reports with no Windows related tools

    Daniel Bowlin (1/11/2013)


    Although if your lead developer is handcuffing you so strictly, I have to wonder why you are using any MS products like SSRS.

    That's the same question I ask...

    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: Len did not display right size

    Would it be a problem with leading spaces (instead of trailing spaces)? Maybe hard spaces or tabs.

    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: Pivot Query

    :O) (12/31/2012)


    If the point of PIVOT is to help turn row based values into column based values, how do I use it to produce the same results as the approach...

    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: Pivot Query

    I don't get it. What are your expected results?

    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 find column is having value or not

    Bhuvnesh (12/31/2012)


    Yes, i have also heard this so many times that RBAR gives the result in much optimal way btu BAD thing is i never got any chance to use...

    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 find column is having value or not

    As others have said, neither CURSORS or WHILE LOOPS are effective. Here's a better solution that might help with this problem. I'm just publishing this to avoid that others would...

    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 should I use Identity within my stored procedures?

    Now, that makes sense. 😉

    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 - 8,176 through 8,190 (of 8,731 total)