Viewing 15 posts - 35,356 through 35,370 (of 59,102 total)
Here's one possible answer to the problem you requested. It does not, however, fix the fact that you're relating tables that have no relationship to each other...
--===== This just...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 8:46 pm
picant (1/17/2011)
Does anybody have a simple explanation what's wrong with such structure?
Yes... it produces data that doesn't actually exist in the real world. Instead, it produces randomized results from...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 8:23 pm
s_osborne2 (1/17/2011)
Change your select statement to have the following:
;
WITH cte
AS ( SELECT
...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 7:44 pm
CELKO (1/17/2011)
WHEN B.account_change_pcT > 0.1 THEN 'Win'
WHEN B.account_change_pct < -0.1 THEN 'Loss'
WHEN B.account_change_pct <= 0.1 THEN 'BreakEven'
WHEN B.account_change_pct >=...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 7:28 pm
Remove the single quote encapsulation from the table name. Use square brackets, instead.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 6:59 pm
picant (1/17/2011)
...Okay, any particular order? ... Also,
why is the Red Apple Sweet and the Green Apple Bitter? Why couldn't it be the other way around? ...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 6:55 pm
Everyone recommending a "shrink" on this thread is forgetting a very, very important thing to do after the shrink... you MUST rebuild your indexes after the shrink. Shrinking an...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 6:53 pm
LutzM (1/17/2011)
I'm expecting the sample section to be
[POL_COUNTRY_CD] [nvarchar](2) NULL,
[POL_LOCATION_CD] [nvarchar](5) NULL,
[POD_COUNTRY_CD] [nvarchar](2) NULL,
[POD_LOCATION_CD] [nvarchar](5) NULL,
At least that's what the sample data look like.
The new columns are [POL_LOCATION_CD] and [POD_LOCATION_CD]....
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 6:04 pm
pwalter83 (1/17/2011)
Thanks for your reply and sorry about not providing the updated tables and sample data. Please find the same here:
First one is the DHL_TRADE_ASSIGNMENT table-
-----------------------------------------------------------------
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 1:31 pm
Sachin Nandanwar (1/17/2011)
I realize the intentions are good here and thank you for that but there are a couple of problems with the code there. For one, it breaks several...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 1:22 pm
tskelley (1/17/2011)
rstarr-916208 (1/16/2011)
Ok, I consider myself duly chastised.By the way, what does SLA mean?
SLA is Service Level Agreement. Basically, a performance and quality agreement between the vendor/programmer and company...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 1:00 pm
Roy Ernest (1/17/2011)
Oh yea...!!!! My non technical article is going to be published this week. It will be on 20th - 21st of Jan. It is regarding Netmeeting.Thanks Steve.
Heh......
--Jeff Moden
Change is inevitable... Change for the better is not.
January 17, 2011 at 12:49 pm
Sachin Nandanwar (1/16/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
January 16, 2011 at 9:37 am
rstarr-916208 (12/8/2010)
--Jeff Moden
Change is inevitable... Change for the better is not.
January 16, 2011 at 9:12 am
venoym (12/8/2010)
I had a thought... this could be extended to account for Times in addition to dates... just move the calculation to the lowest significant field (from day...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 16, 2011 at 8:43 am
Viewing 15 posts - 35,356 through 35,370 (of 59,102 total)