Viewing 15 posts - 136 through 150 (of 201 total)
select distinct
a1.UF, a1.Code OldCode, a1.Sym,
a2.UF NewUF, a2.Code NewCode, a2.Sym NewSym
from tblA a1
join tblB on tblB.UF = a1.UF
join tblA a2 on a2.UF = tblB.NewUF
Might work?
/T
October 8, 2010 at 5:50 am
Amit Pandey DeBugSQL (10/8/2010)
Sounds like a bug in the product to me.
I think this should have been...
October 8, 2010 at 3:41 am
Maybe this could work (with the right index)... though i doubt it. Should probably be worse then the count version. But your the one with the data to test 🙂
;WITH...
October 8, 2010 at 3:19 am
mail4sha (10/8/2010)
October 8, 2010 at 1:26 am
Have to agree with that. Design is horrible. However if thats not possible
--Some tables and data to test against.. since i dont have this
create table dispLookup (Code int, Disp varchar(256)...
October 7, 2010 at 3:33 am
Holy One (10/6/2010)
October 6, 2010 at 7:02 am
aurato (10/6/2010)
Is this just...an ad?
Pretty much yeah. Its "Hay look we think you should develop stuff this way instead... oh and btw we have a product to help you"
/T
October 6, 2010 at 6:39 am
Or without a recursive query
select t1.EmployeeID, t1.DataYear, t1.YearlyWage, Sum(t2.YearlyWage)
from @MyTable t1
join @MyTable t2 on t2.EmployeeID = t1.EmployeeID
...
October 5, 2010 at 1:18 am
Lynn Pettis (10/4/2010)
Craig Farrell (10/4/2010)
October 5, 2010 at 1:01 am
josh_thoma (10/4/2010)
October 4, 2010 at 11:55 pm
Hugo Kornelis (10/4/2010)
tommyh (10/4/2010)
select datalength(N'hi'), datalength('hi')
gives 2 different results....
October 4, 2010 at 5:55 am
Hugo Kornelis (10/4/2010)
da-zero (10/4/2010)
@nakul: no excuses about having no time to do the detailed reasoning 🙂 Post your...
October 4, 2010 at 5:19 am
Carlo Romagnano (10/1/2010)
tommyh.
Running the code under 2000 all i get is
(1 row(s) affected)
under 2005 and 2008 i get
Server: Msg 3609, Level 16, State 1, Line 1
The transaction ended in...
October 1, 2010 at 7:04 am
Hugo Kornelis (10/1/2010)
tommyh (10/1/2010)
October 1, 2010 at 1:39 am
Good question, didnt know it behaved that way.
Also good that Microsoft change the way that SQL handles this. In 2000 you wouldnt have a clue that your insert just...
October 1, 2010 at 12:14 am
Viewing 15 posts - 136 through 150 (of 201 total)