Re: [GENERAL] update query confusion

2004-10-13 Thread Ian Harding
Leave assembliesBatch out of the FROM and just put the condition in the WHERE. Something like UPDATE assembliesBatch FROM assemblies JOIN . WHERE assembliesBatch.AssemblyID = assemblies.assemblyID AND assembliesBatch.batchID = 5 Ian Harding Programmer/Analyst II Tacoma-Pierce County He

Re: [GENERAL] update query confusion

2004-10-12 Thread Tom Lane
Sim Zacks <[EMAIL PROTECTED]> writes: > This syntax works in MS SQL Server to update exactly as I > expected, with the difference that you have to use the > aliasname after the update keyword and postgresql does not > allow that. > If anyone can help, I would

Re: [GENERAL] update query confusion

2004-10-12 Thread Sim Zacks
Ok. I got it working by adding "and assembliesBatch.AssembliesBatchID=a.AssembliesBatchID" to the where clause. This seems a bit awkward sytactically. Is there a cleaner way of doing it? Thank You Sim Zacks IT Manager CompuLab 04-829-0145 - Office 04-832-5251 - Fax ___

[GENERAL] update query confusion

2004-10-12 Thread Sim Zacks
The following query updated all the rows in the AssembliesBatch table, not just where batchID=5. There are 2 rows in the AssembliesBatch table with batch ID of 5 and I wanted to update both of them with their price, based on the data in the from clause. One