Forum Replies Created

Viewing 15 posts - 301 through 315 (of 441 total)

  • RE: Idenity column question /issue

    you want a sequential unique ID, use Row_Number():

    Select Row_Number() over(order by tbl.AutoIncID asc) as ID,

    tbl.value

    FROM tbl

    How's that?

  • RE: Huge not performant tabled valued Function

    Ohh I see, so I guess I'll build every function as an inline function now, seems to help a lot on performance, and I can finally see it in the...

  • RE: Huge not performant tabled valued Function

    Actually no, they are a lot different.

    I added them in the case statements, but as you can see

    level 4 match on productID or ProductCatalog

    Level 3 match on CategoryID or...

  • RE: Huge not performant tabled valued Function

    Ok, I changed the code to fit the requirements as per the matrix levels:

    IF EXISTS ( SELECT

    ...

  • RE: Query Doubts

    Yeah, just check the execution plan on every query you make, and it will say you have "no join predicates" between 2 tables. That's a cross join, and the execution...

  • RE: Huge not performant tabled valued Function

    Thanks GSquared for taking all that time for building something that you cannot even test.

    It compiles perfectly, but some minor changes (like duplicate column names), but that's not an issue.

    What...

  • RE: Huge not performant tabled valued Function

    GilaMonster (4/6/2009)


    GilaMonster (4/6/2009)


    J-F Bergeron (4/6/2009)


    Now, they are asking me to insert that "Price calcullation" within a query that will be used in the products screen. So when they will query...

  • RE: Huge not performant tabled valued Function

    Mark (4/6/2009)


    You also seem to be using a couple of scalar function, can you post the code for thse as well.

    Enterprise.dbo.fnGICMatrixFindActiveByVendor

    GICSPF.dbo.fnGICSPFMatrixFindActiveByVendor

    Sure Mark, here's the function, but this one should not...

  • RE: Huge not performant tabled valued Function

    I was somehow foreseeing this answer, and I do not blame you, it's just it implies so many tables, views and procedures that it will be really hard to post...

  • RE: How to write this SELECT better

    Thang.Nguyen10 (4/3/2009)


    Thanks Chris.

    As you suggested, I start running your script in Dev environment (where I am the only user) at 10:11am and now is 11:09am, the script is...

  • RE: passing multiple parameters to a stored proc

    Florian Reischl (4/2/2009)


    Hi J-F!

    As first: Maybe I'm currently don't get it, so sorry if I'm just now start writing nonsense :-), but...

    You are absolutely right, QUOTENAME is a nice feature...

  • RE: passing multiple parameters to a stored proc

    Florian Reischl (4/2/2009)


    Vijaya Kadiyala (4/2/2009)


    Maximum length of paramter is 128.

    it looks like you are passing dynamic WHERE condition and you are going to HIT boundary on the length. So why...

  • RE: How to insert 1000 rows in table

    100 rows is probably what you see in the preview screen, it will import all of them, it can be used to import a lot more than 1000 rows.

  • RE: Insert is taking hours to complete

    DECLARE @batch INT

    DECLARE @all INT

    DECLARE @current INT

    SELECT @batch...

  • RE: Insert is taking hours to complete

    dndaughtery (3/26/2009)


    Thanks for the code but I'm curious as to how it works. Will it not just keep importing the top 100 everytime? I don't see how it will go...

Viewing 15 posts - 301 through 315 (of 441 total)