Forum Replies Created

Viewing 15 posts - 6,076 through 6,090 (of 8,731 total)

  • RE: Are the posted questions getting worse?

    Sean Lange (7/25/2014)


    WOW!!! If you have ever wondered about the quality of responses at SO just checkout this response to a question about when it is appropriate to use NOLOCK.

    Most...

    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: When you convert int to varchar it returns *. Why?

    You can read on the CAST and CONVERT page on the "Truncating and Rounding Results" section.

    Int, smallint and tinyint will return * when the result length is too short to...

    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: Summer, Summer, Summertime

    We didn't have much plans for summer, we expected to visit south of Mexico on September but my wife broke her calf. Now she has to keep at rest. She's...

    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: Tuning a query that takes 60 minutes to run,

    In the meantime, I'd suggest you to change the coding style as 3-part and 4-part names in the column list are deprecated and will be removed on a future version...

    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 Sort and Merge join Question

    I'm not sure, but you could use a lookup transformation instead of the merge join. It's hard to know without much details on what you're doing.

    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 Pivot Question

    Alan.B (7/24/2014)


    Luis Cazares (2/11/2014)


    Have you tested again?

    Luis - I completely flaked out and missed this message. I am truly sorry and feel like a jerk. I fixed the my code...

    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 Sort and Merge join Question

    Are you uing T-SQL or SSIS?

    If using T-SQL, can you post your query? Are you using JOIN Hints? Why?

    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 Pivot?

    A cross tabs approach using Eirikur's sample data.

    WITH BASE_DATA AS

    (

    SELECT

    ItemId

    ,CustomerItemId

    ...

    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: Stairway to T-SQL: Beyond The Basics Level 9: Dynamic T-SQL Code

    To prevent SQL Injection when the names of objects or columns are entered by the user, I'd recommend as well QUOTENAME() function. Of course, that doesn't remove the good practice...

    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'm totally new. Need some guide on SQL 2012

    I wouldn't suggest those books for a total newbie. They expect a lot more experience. Additional, (s)he is seeking for the querying certification exam.

    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 this works?

    I hope that you're using that code for learning purposes only and not instead of REVERSE() 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: Replace a carriage return in SSIS

    Data9 (7/24/2014)


    Luis, But only some rows will have the pipe symbol followed by carriage return not all. please see my commnets below

    1|test|1234.45|testing|test123| ...

    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 am Confused about SQL Server performance

    One of the reasons that you're facing this is because SQL Server auto commits every transaction and Oracle doesn't. You need to manually commit any DML actions. If you 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: Trying to SUM row with Current Date to Row with "Last Month" Date

    There's no need for a recursive CTE. If that query gives the correct results you can use it to update your table.

    WITH CTE AS(

    SELECT MTB.*,

    ...

    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: condition to identify values that are +/- than 2 cents

    The reason of your problem is that you're dividing integers and that will return an integer when you want a float or decimal value.

    Check the following examples:

    SELECT 2/100 intDivision,

    ...

    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 - 6,076 through 6,090 (of 8,731 total)