Viewing 15 posts - 916 through 930 (of 1,183 total)
Not really, it's just that sometimes you are too close to a problem to see it clearly.
______________________________________________________________________
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. SelburgSeptember 13, 2007 at 10:32 am
... AND Left(Zip, 5) IN ('98101','98104','98154')
🙂
______________________________________________________________________
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. SelburgSeptember 13, 2007 at 10:11 am
Actually I was refering to the execution plan diffs. ![]()
EDIT: Oh, and I agree with you on the previous...
______________________________________________________________________
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. SelburgSeptember 13, 2007 at 6:08 am
Just for **** and giggles, I created a function zeroIsMinimum to handle the negative numbers and see how this affected performance. I got some pretty unusual results. now this may...
______________________________________________________________________
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. SelburgSeptember 13, 2007 at 5:54 am
This should get you going. The challenge for you now is to understand HOW this works ![]()
DECLARE @table TABLE (someID INT IDENTITY(1,1),...
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 5:52 pm
This will work ....
UPDATE i
SET qty_on_hand =
CASE WHEN qty_on_hand - (SELECT COUNT(*) FROM @workTable w WHERE w.partno = i.inv_ID) < 0 THEN 0
...
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 10:42 am
Yeah, but I don't account for negative values .....
Gimmie a minute though .....
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 10:30 am
Sorry, I missed the part about making negative results equal 0.
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 10:15 am
Oh, and whatever you need in the WHERE clause.
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 9:57 am
UPDATE i
SET qty_on_hand = qty_on_hand - (SELECT COUNT(*) FROM @workTable w WHERE w.partno = i.inv_ID)
FROM @I_master i
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 9:56 am
No need to cross post..
Create an aspx page that either shows your message or redirects to the Default.aspx of reporting services depending on the time of day. Set that as...
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 8:25 am
Create an aspx page that either shows your message or redirects to the Default.aspx of reporting services depending on the time of day. Set that as your default page in...
______________________________________________________________________
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. SelburgSeptember 12, 2007 at 8:24 am
FYI to all, V posted more detail in PM. Below is the script that gave him the desired results...
/*
SQL to create the temp tables for my testing...
______________________________________________________________________
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. SelburgSeptember 11, 2007 at 8:27 am
Is there a Primary Key on this table? What is it? Please provide DDL.
______________________________________________________________________
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. SelburgSeptember 10, 2007 at 12:01 pm
Here's another way to skin the cat ....![]()
Your table is "dbo.challenge"
SELECT
colA
,SUM(colB)
FROM
(SELECT
a.colA
,colB...
______________________________________________________________________
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. SelburgSeptember 10, 2007 at 11:44 am
Viewing 15 posts - 916 through 930 (of 1,183 total)