Forum Replies Created

Viewing 15 posts - 3,601 through 3,615 (of 8,731 total)

  • RE: Recursive with a check point

    I would try both approaches to see which perform better with your data.

    WITH

    cte_PartsOrder AS (

    SELECT

    o.orderid,

    o.part,

    node = 1,

    ...

    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: Left Join Vs Right Join

    Maybe this will give you a better perspective on how the different types of joins work.

    DECLARE @Table1 TABLE( MyID int);

    INSERT INTO @Table1 VALUES(1),(2),(3),(4)

    DECLARE @Table2 TABLE( MyID int);

    INSERT INTO @Table2 VALUES(4),(5),(6),(7)

    SELECT...

    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: Syntax error in recursive cte

    You can't create a dynamic pivot like that. You need to use dynamic SQL.

    In my case, I prefer to use cross tabs instead of pivots. These is because they...

    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: Today's Random Word!

    Ed Wagner (12/31/2015)


    DonlSimpson (12/31/2015)


    Grumpy DBA (12/31/2015)


    eccentricDBA (12/30/2015)


    DonlSimpson (12/30/2015)


    Carpe diem

    YOLO

    YODO

    Yoda

    Qui-Gon

    Obi-Wan

    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: Syntax error in recursive cte

    Tallboy (12/30/2015)


    Hi Luis,

    Thanks for your prompt reply.

    I know your code works as I have tested it out before. I know it creates a cte of dates but would you mind...

    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: OLE DB Destination wrote 0 rows

    Are you sure? It seems that there's no mapping happening in the destination. At least that's what the warnings indicate.

    Other than that, we'd need more details.

    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: Syntax error in recursive cte

    The following code should be removed for it to work.

    SELECT CONVERT(date,[dates]) AS Dates

    FROM DailyDates

    OPTION (maxrecursion 0)

    ),

    However, there's a major problem. You have a rCTE that counts which can become...

    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 do I avoid this error -come code modification help needed

    Maybe something like this. Without sample data, I'm not able to test.

    UPDATE v

    SET

    [CLAIM_ID] = Maxformnbr

    ,[PROV_NBR] = ProviderMerge

    ...

    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 do I avoid this error -come code modification help needed

    I didn't say your SP had an INSERT statement, I was just explaining Bill how the IGNORE_DUP_KEY option worked. As I mentioned, it only works for INSERT and not for...

    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 do I avoid this error -come code modification help needed

    SQLBill (12/30/2015)


    How did you set the PK to allow duplicates? The purpose of a PK is to not allow duplicates and the only way I'm aware of to allow...

    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 do I avoid this error -come code modification help needed

    You can use a NOT EXISTS, but without DDL and sample data, I won't guess the correct statement you need.

    You could also convert this into a MERGE statement if you're...

    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 a query, plz

    SQLisAwE5OmE (12/30/2015)


    Jeff Moden (12/29/2015)


    SQLisAwE5OmE (12/29/2015)


    Jeff, See the attachment for the create view script. Thanks.

    Thanks for that. That view is a bit of a "Rosetta Stone" for what the...

    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: Covert columns to rows

    kaza.rohan (12/30/2015)


    Can we write dynamically for sys.databases , is there any possibility ?

    But for other tables it is possible by using sys.columns and then we can unpivot it.

    but sys.databases 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: SQL express vs developer for MCSE:BI

    And if you get stuck on any subject, this forum is full of experts that can guide you. In fact, the entire SQL Server community is very helpful.

    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 express vs developer for MCSE:BI

    Developer edition is a complete enterprise edition (all the features).

    Regarding the other questions, I would say it depends. Some people like to do self study to be able to work...

    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 - 3,601 through 3,615 (of 8,731 total)