I have two temp table name #table1 and #table
when I run the following update, I get an error
" Cannot use the column prefix 't'. This must match the object in the UPDATE clause '#test1'.
update #test
set t.name=tt.nam
from #test1 t, #test2 t
where t.last=tt.las
This in SQL 2000. Why would this happend
Thanks
Jasontry this
update t
set t.name=tt.name
from #test1 t, #test2 tt
where t.last=tt.last
>--Original Message--
>I have two temp table name #table1 and #table2
>when I run the following update, I get an error
>" Cannot use the column prefix 't'. This must match the
object in the UPDATE clause '#test1'. "
>update #test1
>set t.name=tt.name
>from #test1 t, #test2 tt
>where t.last=tt.last
>
>This in SQL 2000. Why would this happend.
>Thanks,
>Jason
>.
>|||Or, better still,
UPDATE
t
SET
t.name = tt.name
FROM
#test1 AS t
INNER JOIN #test2 AS tt ON
tt.last = t.last
James Hokes
> update t
> set t.name=tt.name
> from #test1 t, #test2 tt
> where t.last=tt.last
"Scott Dexter" <anonymous@.discussions.microsoft.com> wrote in message
news:033501c3c5ad$e9b73d20$a401280a@.phx.gbl...
> try this
> update t
> set t.name=tt.name
> from #test1 t, #test2 tt
> where t.last=tt.last
>
>
> >--Original Message--
> >I have two temp table name #table1 and #table2
> >
> >when I run the following update, I get an error
> >" Cannot use the column prefix 't'. This must match the
> object in the UPDATE clause '#test1'. "
> >
> >update #test1
> >set t.name=tt.name
> >from #test1 t, #test2 tt
> >where t.last=tt.last
> >
> >
> >This in SQL 2000. Why would this happend.
> >
> >Thanks,
> >Jason
> >
> >.
> >
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment