Forum Replies Created

Viewing 15 posts - 16 through 30 (of 124 total)

  • RE: Building a Tree Structure in an efficient and faster way.

    Hmmm... MLM. If that's true, are you using a "uni-level" payout system?

    Yes, absolutely... I saw your article Jeff.. My only question is if one account changes its parent...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Building a Tree Structure in an efficient and faster way.

    It sounds like this structure is for a company that uses network marketing for its sales force. The problem here is that I'm not sure quite what you...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Building a Tree Structure in an efficient and faster way.

    Steve,

    Thanks for that but my question was different. Let me explain it much better.

    I have an accounts table like below

    DECLARE @Accounts TABLE

    (

    AccountID INT,

    ParentAccountID INT,

    ServerModifiedDate DATETIME

    )

    ParentAccountID Can keep changing due to...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Building a Tree Structure in an efficient and faster way.

    sgmunson (6/24/2015)


    I hope you're not using this data structure as the basis for accounting data. There is way too much other maintenance that would get very tricky after...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Building a Tree Structure in an efficient and faster way.

    Yes actually. depending on the use case - building it using some form of "just in time" approach could be cleaner than storing and readjusting it all of the...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Building a Tree Structure in an efficient and faster way.

    Matt Miller (#4) (6/24/2015)


    well - I am not sure why you need to reload the entire table. The structure column can be built recursively, so pointing a given node...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Pivot, unpivot

    is it something you want to present in the form of a query or just for research purposes? Can you not use Excel if it's a one time quick thing...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Discussion About Date Fucntion

    I wouldn't because it will render any index useless.

    Out of the three options he had, I thought that would be okay to use.

    Do you really need the approval?

    I said that...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Discussion About Date Fucntion

    I don't think out of the three, datepart one wouldn't suffice your requirement. What if the expiry date is of a different month or year? but you are only considering...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Evaluation of duplicate aliases for multiple objects in a procedure

    Don't see anything wrong in the query unless there is an issue with my eyes expect that I don't see a FROM clause near the INSERT Command.

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: forming a dynamic query

    I believe you can write this query without using DYNAMIC SQL. but the only part that confuses me is @CID. You specified it as integer, and you are passing a...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Error in Loading CSV file

    Check this if the package fails for the second time in the loop :

    I think you haven't specified the file to be picked by expression by using the value from...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: Problem writing to user variable

    when you use break points, use the watch windows to view variables at run time.. you don't have to print them to view them..

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: group by clasue in mdx

    Is this what you are looking for? I didn't find any cube related information in your question, so I did this in straight SQL..

    DECLARE @Input TABLE

    (

    pn VARCHAR(10),

    prcode VARCHAR(10),

    dos DATE,

    Expected...

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • RE: use Of TSql in Xml and Run In Sql server

    If you are looking to increment the number automatically whenever you insert a new record, try Identity(1,1) on that column, so that it gets automatically incremented.

    Good Luck 🙂 .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

Viewing 15 posts - 16 through 30 (of 124 total)