Forum Replies Created

Viewing 15 posts - 4,621 through 4,635 (of 5,678 total)

  • RE: Recursive? SOS Need HELP

    Sounds like standard org chart recursion.

    Have a gander on the intertubes for 'Recursive CTE'. That'll handle most of your question.

    If you'd like some tested code, please check out the...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    GilaMonster (12/9/2010)


    dso808 (12/9/2010)


    That's all that was returned. Interesting - what do you think?

    Read my last post.

    I do not recommend this approach. Take a look at the method on my...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Today's Random Word!

    Warm Beer.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Querying 8GB table is taking too long - need to just query last 3 months of data

    Yes, partitioning is actually your best bet here, but you have to partition on the date column in the table...

    ... which leads me back to a different issue. When...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Using Scope_Identity for insert

    Just drop it to a variable and use it from there:

    CREATE TABLE #tmp ( tID INT IDENTITY( 1, 1), tValue VARCHAR(10))

    Declare @LastID INT

    INSERT INTO #tmp (tValue) VALUES ( 'Oscar')

    SET @LastID...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Split delimited column values into multiple rows

    Aaron Prohaska (12/9/2010)


    OK, that did solve the problem though I'm now realizing there is more to this that I have to figure out.

    Can you please explain how this query works?...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Need some help with a large data volume optimization

    LutzM (12/9/2010)


    The only question that remains from my side regarding those two columns: Why do you have a SurrogateKey and a BusinessKey? If you'd have PortfolioCode only (as a natural...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    GilaMonster (12/9/2010)


    It's complaining because dso has used double quotes (") instead of two single quotes (') and quoted identifiers is likely on, meaning that "01/01/2010" is interpreted as a column...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Query not showing needed results

    Sorry, swung in, saw that the sample data wasn't consumable (do read that link, it explains why), meant to come back and forgot. Btw, the second set of sample...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    Gail as usual is more thorough than I am. 🙂

    Can you do me a flavor, and the one where it says 'date' isn't a column name, just commment out the...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Need some help with a large data volume optimization

    G'dang... that Lookup component is QUICK. It almost keeps up with the import itself. (175k rows/file, * 6 files, under 2 minutes)

    Great recommendation, that's one headache out of...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    dso808 (12/9/2010)


    Thanks Craig! That's taken care of now. But when I execute the stored procedure to test like so (just trying to get ALL records from the table):

    --...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    dso808 (12/9/2010)


    Hi Craig and thanks for the speedy response. The [ProbTicketDate] field is a DateTime field. An example of what's stored in the table - '1/4/2010 12:00:00 AM'....


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How to Make a Dynamic Stored Procedure Query

    dso808 (12/9/2010)


    OK, I guess this is what you meant by this part:

    "Note: you might have to do some conversion for the date fields if required nad >= nad <= condtion...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Getting Started in SQL Server

    Stefan Krzywicki (12/9/2010)


    What about someone who's been in the industry a long time and knows a wide variety of technologies to a decent depth if not "guru" level and a...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 15 posts - 4,621 through 4,635 (of 5,678 total)