update problem

  • Thread starter Thread starter Stephen Martinelli
  • Start date Start date
S

Stephen Martinelli

Hello... Im cross posting this ...sorry but I'm stuck...

Im trying to update a access table called xUpdate with another table called
temp. Both table live in the same database. I want to update the field
xUpdate.status with a field in temp called temp.newStatus. I thought the
following would work
Update xUpdate set Status = newStatus " & _

"from xUpdate x inner join temp t" & _

"on x.lot = t prefix and x.numb =t.suffix"



It just doesnt work. Im using VB.net to call the sql statement. All the
connections stuff is ok...any ideas?

thank you in advance
 
Stephen,

I hate SQL, so I am not a fine source to help you however I saw something.

Update xUpdate set Status = newStatus from xUpdate x inner join temp ton
x.lot = t prefix and x.numb =t.suffix

I think that this statement will never work.

By the way, you are probably not crossposting however multiposting.

Multiposting is hated in every newsgroup in the world.
Crossposting when done in a reasonable way is very much appriciated in the
dotNet newsgroups.

Crossposting is sending "one" message to "multi" newsgroups at once.

I hope this helps,

Cor
 
Hi Stephen,

Your statement should probably look like:
"update xUpdate inner join temp on ... set Status = newStatus"
Also, you might check the corectness of the statement right in Access.
 
Thanks guys, I think you got me on the right track....

~Steve
Miha Markic said:
Hi Stephen,

Your statement should probably look like:
"update xUpdate inner join temp on ... set Status = newStatus"
Also, you might check the corectness of the statement right in Access.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

Stephen Martinelli said:
Hello... Im cross posting this ...sorry but I'm stuck...

Im trying to update a access table called xUpdate with another table
called temp. Both table live in the same database. I want to update the
field xUpdate.status with a field in temp called temp.newStatus. I
thought the following would work
Update xUpdate set Status = newStatus " & _

"from xUpdate x inner join temp t" & _

"on x.lot = t prefix and x.numb =t.suffix"



It just doesnt work. Im using VB.net to call the sql statement. All the
connections stuff is ok...any ideas?

thank you in advance
 
Back
Top