Viewing 15 posts - 541 through 555 (of 1,183 total)
SELECT
km_ndc
,CASE WHEN SUM(extended_amount_corrected)
+ SUM(qty_corrected)
...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 23, 2008 at 8:34 am
Not really a better way to write that, but you could replace the AND's with + and test to see the performance difference.
SELECT
km_ndc
,CASE...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 23, 2008 at 8:14 am
My rulle of thumb is regardless of what "everyone says" is best to run both ways and compare the results. Then you'll know for sure. 😀
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 22, 2008 at 12:35 pm
Matt Miller (4/17/2008)
Try something like this...
select RIGHT('1234567890'+cast(cast(9999999999*rand(checksum(newid())) as bigint) as varchar(10)),10)
OK, that just blows the pants off mine. :hehe:
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 17, 2008 at 10:56 am
Something like this should mix up your numbers ... you may have to run it a couple of times to verify that you get all records.
WITH startingList
AS (SELECT
...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 17, 2008 at 10:43 am
User RETURN
ALTER PROCEDURE [Video].[addVideo]
@Title nvarchar(50),
@uri-2 nvarchar(200)
AS
BEGIN
...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 17, 2008 at 7:45 am
Not Arith Abort, but Numeric Round-Abort
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 16, 2008 at 12:43 pm
You have "Numeric Round-Abort" set to True on the 3054 DB. Change it to false and it will run without a hitch.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 16, 2008 at 11:41 am
That would explain it. It's because you add in another element to the Pivot without aggregating it. You'll need to remove that column from the results or comma delimeted list...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 9:53 am
LOL, I've been called worse.
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 9:38 am
Read up on NULL in BOL ...
Select Count (Distinct ConsultantID) from @t
Where DeactivationDate = '2007-09-04'
And ISNULL(StatusID, '') <> '72HOURRESIGNATION'
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 9:37 am
Really? IT works on my Adventure works DB just fine.
Are you using the EXACT code I posted?
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 9:11 am
I hate to be the bearor of bad news Andras, but your query produces a cartesean product. :ermm: Your query returns some 3000 rows, and mine is the original 64....
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 7:16 am
You essentially need to run the pivot two seperate times and join on the product name. This may not be the most efficient way of solving your problem, but this...
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 7:04 am
Jeff Moden (4/9/2008)
Heh... nice job there "Joel" 😛
Hey, who the heck is this Joel guy? :hehe:
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgApril 10, 2008 at 6:36 am
Viewing 15 posts - 541 through 555 (of 1,183 total)