Forum Replies Created

Viewing 15 posts - 5,296 through 5,310 (of 8,731 total)

  • RE: What is the prmary key then ?

    The primary key is usually the same as the clustered index but that's not a rule. They're both independent as the process to define them is different. The primary key...

    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: DAte Function

    MMartin1 (1/27/2015)


    Luis Cazares (1/27/2015)


    If it's a string column with underscores between each part of the date. This could be an option.

    SELECT columns_to_return

    FROM dbo.XYZ

    WHERE date_column > REPLACE(...

    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: DAte Function

    If it's a string column with underscores between each part of the date. This could be an option.

    SELECT columns_to_return

    FROM dbo.XYZ

    WHERE date_column > REPLACE( CONVERT( char(10), DATEADD(YY,...

    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: What is the prmary key then ?

    No, you're confusing primary keys with the PRIMARY filegroup.

    Primary Keys need to be unique. PK_AIMS_Preop index is the index that supports your PRIMARY KEY constraint that should be shown 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: What's the best way to accomplish?

    What I mean is that your ReportColumns column violates the first normal form that indicates:

    A relation is in first normal form if the domain of each attribute contains only...

    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: What's the best way to accomplish?

    What stops you from normalizing the ReportDefinition table?

    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: nvarchar(n<1000) vs nvarchar(1000)

    I'm not sure that it doesn't matter as I discovered when testing a function in this thread:

    http://www.sqlservercentral.com/Forums/FindPost1531822.aspx

    The best option that you have is to test both approaches. I'd do it...

    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: The PIVOT

    Carlo Romagnano (1/27/2015)


    Raghavendra Mudugal (1/27/2015)


    Carlo Romagnano (1/27/2015)


    Strange, but the version with PIVOT is a bit slower than that with GROUP BY. See execution plan!

    ...

    actually I was doing the same...

    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: Dont get the distinct date

    Why do you believe that you need to use DISTINCT? You already have a GROUP BY.

    Are you seeing the same date 3 times? If so, that's normal because you're "concatenating"...

    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: Mulesoft and SQL Server

    I've never used Mulesoft. After I read your post, I googled it and it seems interesting. However, I can't give a suggestion based on experience.

    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 (1/23/2015)


    Jack Corbett (1/23/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme...

    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: Which is Quicker ? - updating 90 million records

    I'll say that this would be slower because you're still using a single transaction and you're using several queries. This is a guess and I might be wrong.

    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: UNION vs. PIVOT for de-flattening SOME columns of a partially flat table

    I believe that you don't need PIVOT, you need UNPIVOT. And you might want to use UNION ALL instead of UNION.

    There's a third alternative which is explained in here by...

    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: Repeat contact cursor

    Could you post your sample data as insert statements? I tried to help you but I'm missing columns that you used in your query for which you didn't supply any...

    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: Where can I find the definistion of this table value function

    mw112009 (1/22/2015)


    I mean I know how to get that by going through the menu and drilling down , right click and select "SCRIPT...."

    That's not what I really want. ...

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