Forum Replies Created

Viewing 15 posts - 3,856 through 3,870 (of 4,085 total)

  • RE: Return Column Names of changed values between rows

    It's actually possible to do this without dynamic SQL and still have it be general enough that it will automatically handle changes to the table definitions.

    This hasn't been completely optimized,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: pivot query

    I finally had a chance to test this on a table with 18K records. Here are the results for producing a grand total:

    WITH ROLLUP

    Table 'Worktable'. Scan count 0, logical...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: pivot query

    sayedkhalid99 (9/22/2010)


    one thing more is it possible to add total also at the bottom for each months and quarters , i tried to use union didn't work , do...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: concatenating CASE stmt results

    Jeff Moden (9/20/2010)


    I don't like the short version at all because it "lies".

    That's very interesting, but, realistically, how often do people use nondeterministic functions like NEWID() in the comparison expression...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: concatenating CASE stmt results

    Luke L (9/20/2010)


    I've never liked the shortened version [...] because it makes certain things unclear. (I prefer the true boolean expression syntax).

    What situations do you find unclear? I...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to update multiple tables in one statement ?

    No. You can only update one table per UPDATE statement. You can simulate this using an INSTEAD OF trigger, but it's probably easier to just do this in...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need a quick refresher course/article on complex Sprocs

    That's a rather broad topic and probably beyond the scope of this forum unless you have a more specific question. You're better off searching for T-SQL tutorials.

    I will say...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Multiplying a group by... Can it be done?

    Well it's not pretty, but you can get the LOG10() of the numbers, sum them and then raise 10 to that power.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query concattenation problem

    And also the desired results. For example, if you want a single field with a delimited list of the parameters, you might want to use a subquery with a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Complicated one-reference Table-Can any please guide me

    The system view INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS will tell you which unique constraint is referenced by each foreign key constraint. The system view INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE will tell you which columns are used in...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: sp_executesql won't return the expected result. Any help please?

    Jason Tontz (9/16/2010)


    Thanks. That works perfectly. A little odd that the TOP statement is before the variable and not right before the column/ result list.

    I don't find it at all...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: easy sql data 2 excel?

    Derrick Smith (9/16/2010)


    r.rozeboom (9/16/2010)


    all good guys. you all mean well.

    But can i do this with t-sql?

    i think i forgot to say it has to be done on demand. not so...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: easy sql data 2 excel?

    ashish.kuriyal (9/16/2010)


    Why would you use DTS when you have SSIS available?

    because ssis is not available in sql server 2000. Please refer original post.

    He only said that the database was running...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: easy sql data 2 excel?

    ashish.kuriyal (9/16/2010)


    DTS may fulfill your requirememnt and then that DTS can be scheduled in job

    Why would you use DTS when you have SSIS available?

    Reporting Services may actually be the best...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: sp_executesql won't return the expected result. Any help please?

    Jason Tontz (9/15/2010)


    Because I get an error :

    Msg 156, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'TOP'.

    That's because you have your TOP clause in the middle of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,856 through 3,870 (of 4,085 total)