Forum Replies Created

Viewing 15 posts - 6,526 through 6,540 (of 8,731 total)

  • RE: Alternative to manual pivots

    You should find the approximate length of your rows that are being stored in @PIVOTSTR to prevent them of overflowing the length. A safe approximate could be 86 (number of...

    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: Outer Join performance

    It really looks like a CROSS TABS problem. Read the articles that Sean mentioned and remember that you can use MAX() for strings.

    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 set based method to insert missing records into table - right join doesn't work

    sqlmom (4/28/2014)


    I found my answer. Thank you, no more help is needed.

    Would you mind sharing it with the rest?

    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: Create view with exploding rows into multiple

    How do you define that you need 2 or 3 lines?

    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: Error in Drop Create stored procedure.

    That's the same link I posted. 111 is the code referenced as Japan's standard which is defined as yyyy/mm/dd. That's not exactly yyyy-mm-dd.

    Dutch language uses the format dmy, so that...

    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: Error in Drop Create stored procedure.

    How did you get the code 111 for CONVERT? That's completely wrong for YYYY-MM-DD. You could use code 120 or 121, however, that's an ISO stardard format so you shouldn't...

    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: Restriction on DML Statements in SSMS

    I haven't used it, so I'm not sure that it would work but Application Roles might help.

    http://technet.microsoft.com/en-us/library/ms190998.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: using lookup as alternative in SCD type 2 and adding date

    What do you mean when you say "add date"? you want to add the columns to an SSIS package? to a table? or do you want to add values 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: Get different in minutes between 2 Datetime

    Note that it won't return complete minutes (or any other period) and will count for the times the period changes.

    In the following example both calculations return 1 and that is...

    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: Error in Drop Create stored procedure.

    Just because I thought it would be fun to play around to give you an example, here's something I would propose you to try.

    Assuming that you have 2 permanent tables...

    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: Error in Drop Create stored procedure.

    If I understand correctly, you're loading a file into a table that gets recreated each time. You create the table with the columns from the file and add the other...

    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: In sysusers table - Onle column is isaliased - Can you please tell me what is it meaning

    Maybe a free reference would be better. 😉

    http://www.mssqltips.com/sqlservertip/1675/security-issues-when-using-aliased-users-in-sql-server/

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

    Maybe you could use something like this:

    SELECT TotalAmt

    FROM (

    SELECT TotalAmt

    ,CAST( ROW_NUMBER() OVER(ORDER BY TotalAmt) AS decimal(8,1)) rn

    ...

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

    Please post DDL and sample data in a consumable format.

    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 Saturday dress code recommendations

    Jeans should be ok, you need to be comfortable but avoid going on your pjs.

    You don't need to take a laptop, it's probable that you won't use it at all.

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