Home > Back-end >  Use a table to update in FireBrid another table.
Use a table to update in FireBrid another table.

Time:09-28

Use a table to update in FireBrid another table,

(1) statement in the SQL Server:

The Update Fina_BookHead
The Set FProductName=T2 FName,
FProductSpec=T2 FSpec,
FProductUnit=T2. FUnit
The From (Select FCode, FName, FSpec FUnit From Mate_Material) As T2
Where FProductCode=T1. FCode
And FSendCode=@ BillCode

can update multiple columns,

(2) the statements in the FireBrid:

The Update Fina_BookHead T1
Set FProductName=(Select FName From Mate_Material T2 Where T1. FProductCode=T2. FCode),
FProductSpec=(Select FSpec From Mate_Material T2 Where T1. FProductCode=T2. FCode),
FProductUnit=(Select FUnit From Mate_Material T2 Where T1. FProductCode=T2. FCode)
Where FSendCode=: BillCode

can only update a column of a column,

problem: (2) the statement in whether like (1) the improvement? Or have a better writing? Please grant instruction! Thank you very much!
  • Related