Forum Replies Created

Viewing 15 posts - 3,301 through 3,315 (of 4,085 total)

  • RE: How to select values

    suresh0534 (3/4/2012)


    by using SET we can set only one value at a time for a variable...so i need to set multiple values for Location variable when user logined with that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How many ways are there to define a "statement_block"?

    fahey.jonathan (3/2/2012)


    IF Boolean_expression

    { sql_statement | statement_block }

    [ ELSE

    { sql_statement | statement_block } ]

    Is your point that "TRY...CATCH"...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How many ways are there to define a "statement_block"?

    Let me see if I can rephrase this so that it makes sense.

    DECLARE@MyIntINT = 1

    IF@MyInt = 1

    BEGIN

    PRINT'Begin: Int = 1'

    PRINT'Begin: It really does.'

    END

    ELSE

    PRINT'Begin: Int <> 1'

    This code is parsed as

    IF...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How many ways are there to define a "statement_block"?

    fahey.jonathan (3/1/2012)


    So, my questions are:

    1) Is there documentation on what can define a statement_block?

    2) Is "TRY...CATCH" intended to define a statement_block or is that an accident that may be removed...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Modify the argument sent to a process task

    If the process task is in an event handler, it can be fired multiple times independently.

    I haven't really used the event handlers, because I found that SSIS' built-in logging was...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need help replicating an algorithm in TSQL Table?

    This formula is jammed with functions—ROW() and INDIRECT()—that depend on the underlying structure of Excel that consists of a grid of cells with each cell having a specific location within...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Looping through table records and doing a replace

    TeraByteMe (2/29/2012)


    update #removepgp

    set originalfilename=REPLACE(originalfilename,'.pgp','')

    update #removepgp

    set originalfilename=REPLACE(originalfilename,'.dat.pgp','.txt')

    update #removepgp

    set originalfilename=REPLACE(originalfilename,'.dat.gpg','.txt')

    You need to be careful on the order here. The second update here will never match any records (barring something unusual like...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Weird DELETE statement or is legit?

    Just to clarify. INSERT has an optional INTO that is almost never specified, and DELETE has an optional FROM that is almost never specified. In both cases, the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Optimize Query with Highest Cost

    Your function is what is known as a "catch-all" query and these are known to have performance problems. Gail has a very good article about "Catch-all" queries[/url] and how...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Trigger or Insert issue: Not generating the correct data

    You still haven't fixed the FATAL FLAW that you were warned about in this thread http://www.sqlservercentral.com/Forums/FindPost1256724.aspx.

    Someone (SQL KIWI maybe) mentioned that one company had gone out of business, because they...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How do I return only entries with multiple categories in a junction table?

    CELKO (2/23/2012)


    Start using the ANSI/ISO row constructors

    Evil Kraig F (2/27/2012)


    Nah, I much prefer something that makes sense to the people I work with instead of forcing them to conform to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pivot/Unpivot

    Alexander G. (2/27/2012)


    Hoping to be more helpful and less snotty than others:

    I'm a firm believer in the old aphorism, "Give a man a fish and you feed him for a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pivot/Unpivot

    From the title it's obvious that you know you should be using the PIVOT/UNPIVOT to accomplish the task, but the text of your question indicates that you have no idea...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: pivot table summary

    PIVOT groups on every field from the inner query that is not the aggregated value or the pivoted column. That includes the TrnMonth. Try removing that from the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Adding a where clause in a trigger

    Your trigger is written under the assumption that there will only ever be one row inserted/updated at a time and you can't guarantee that will always be the case. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,301 through 3,315 (of 4,085 total)