Viewing 15 posts - 54,031 through 54,045 (of 59,072 total)
Allen,
I'm not 100% sure because I don't have 2k5, but I don't believe that Ramesh's wonderfully easy to read code is going to do the trick for you because it...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2007 at 6:00 am
Jim,
Is this in reference to the table variable function you created that calls itself?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 10:06 pm
I don't know what Celko's "Packing Join" is, but I think you're gonna need another column like a date/time or and IDENTITY column even if you were to use a...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 9:35 pm
"REVERSE" is pretty expensive performance-wise... PARSENAME still does the trick even with the modified list...
CREATE TABLE dbo.Hits (RowNum INT IDENTITY(1,1) PRIMARY KEY, Site VARCHAR(100))
INSERT INTO dbo.Hits (Site)
SELECT 'abc.support.microsoft.com' UNION ALL
SELECT...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 9:27 pm
Problem with such calcs is that you have to recalculate them over and over. Recommend you take a look at Joe Celko's post on the "Nested Set Model" instead...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 9:21 pm
I believe you've hit the nail on the head... not sure even a "by value" would help on such a recursive call...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 9:05 pm
Outstanding! Congratulations, Brandie!
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:53 pm
I understand what you're trying to do... but I don't understand why. I realize you've made some simplified test data and I appreciate that. There are several answers...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:50 pm
I agree with Matt... with the data given, there is no way to relate the correct Discharge to any given Admit... SID certainly won't do it. You need a...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:46 pm
select a.* from customera a
join customerb b on (a.company+a.zipcode<>b.company+b.zipcode)
Ummmm... You might wanna go back and take a look at that code...
[font="Courier New"]--===== Setup a test table and populate with test data
 CREATE TABLE CustomersA (Company VARCHAR(5), ZipCode CHAR(5))
 INSERT INTO CustomersA 
        (Company,ZipCode)
 SELECT 'AAA', '11111' UNION ALL
 SELECT 'BBB', '22222' UNION ALL
 SELECT 'CCC', '33333' UNION ALL
 SELECT 'DDD', '44444' UNION ALL
 SELECT 'EEE', '55555'
--===== Setup identical test table and populate with identical data
     -- except for one row
 CREATE TABLE CustomersB (Company VARCHAR(5), ZipCode CHAR(5))
 INSERT INTO CustomersB
        (Company,ZipCode)
 SELECT Company,ZipCode
   FROM TableA
  WHERE Company <> 'CCC'
--===== PostIt's code
select a.* from customersa a
join customersb b on (a.company+a.zipcode<>b.company+b.zipcode)[/font]
Try this, instead...
[font="Courier New"]SELECT a.*
   FROM CustomersA a
   LEFT OUTER JOIN CustomersB b
     ON a.Company = b.Company
    AND a.ZipCode = b.ZipCode
  WHERE b.Company IS NULL[/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:36 pm
... and lock down the production database... Developers should not have SA privs in the production database and they should not be promoting their own code. Look what happens...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:08 pm
Maybe we need to buy in a CRM system?
Yep... then run it on two Cray's... one for the interface, one for the Data Warehouse 😛 Maybe get an...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 8:05 pm
Heh... yeah, coffee works for me, too. Don't feel bad... I tried the code and had to think about why it wasn't working 😛
Easiest way to do this is...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 7:39 am
Rude or unprofessional? Hell, you started it... first you wouldn't answer my simple question even though I gave you an answer that works... good forum etiquette dictates that you...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2007 at 6:07 am
And, yet, my simple question goes unanswered. I just want to know why whoever you're writing this for thinks they need it in such a dumb format. Don't...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 19, 2007 at 7:17 pm
Viewing 15 posts - 54,031 through 54,045 (of 59,072 total)