How do I update a table that has an ID from a table that does not have an ID but has a PIDM?

  • 12 years ago
    I want to update a grade field in a table that has an ID field from a table that has a PIDM field. I thought I would do the following but it doesn't work. Bigtable is a table that contains both ID and PIDM. update newtable set newtable_grade = (select oldtable_grade from oldtable) where newtable_id - ((select bigtable_id from bigtable) where bigtable_pidm = (select oldtable_pidm))
  • 12 years ago
    Hey man, thanks for refreshing my knowledge, else I would forget it

    update WordList, (Select o from a) b Set langId = b.o

    I hope you suffice with this easily.
    regards, Matt

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”