Hi alex.
Your script really looks off the map in a few ways:
(a) create #table.. (what about columns?)
(b) insert into #table (what about values?)
(c) select ... from x,y,z (no join clauses - likely a major cartesian
product)
(d) select *... where t.a = d.a ... (there's no table / derived table
aliased as "d", although you do have a column aliased as "d")
Please post a better attempt at communicating your query so we've got at
least some chance of establishing what you're trying to achieve / what's
going wrong.
Regards,
Greg Linwood
SQL Server MVP
"al********@yahoo.com" <u1********@spawnkill.ip-mobilphone.net> wrote in
message news:l.*********************@[63.127.215.130]...
create #table
insert into #table
select A,b,c,d
from x,y,z
group by a,b,c,d
select *,(select max(d) from #table t
where t.a = d.a and t.b = d.b and
t.c like 'm%') as mx1
drop #table
go
when there is such data as t.c like 'm%',
it works OK but otherwise, i get error:
not supported,
details:
cannot obtain error message from server.
--
Sent by 3 from yahoo within field com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com