Viewing 15 posts - 3,856 through 3,870 (of 4,085 total)
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
September 22, 2010 at 11:54 am
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
September 22, 2010 at 10:27 am
sayedkhalid99 (9/22/2010)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 22, 2010 at 6:01 am
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
September 21, 2010 at 7:13 am
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
September 20, 2010 at 2:33 pm
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
September 20, 2010 at 6:36 am
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
September 18, 2010 at 10:42 am
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
September 17, 2010 at 7:55 pm
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
September 17, 2010 at 10:15 am
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
September 17, 2010 at 7:33 am
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
September 16, 2010 at 10:45 am
Derrick Smith (9/16/2010)
r.rozeboom (9/16/2010)
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
September 16, 2010 at 9:26 am
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
September 16, 2010 at 9:17 am
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
September 16, 2010 at 8:22 am
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
September 16, 2010 at 6:15 am
Viewing 15 posts - 3,856 through 3,870 (of 4,085 total)