Hi Everyone. Me again.
I have three tables in the SQLite3 database arranged as so:
Table1 Name :Stores
Field1: Item
Field2: Description
Field3: Bin
Field4: Notes
Table2 Name: Vocab
Field1: Material_Code
Field2: Basic_Text
Table3 Name: Corrections
Field1: Item
Field2: Notes
Field1 in all three table will be the unique ID and will be used as the common reference for an item across all three tables.
I would like to add Vocab.Basic_Text and Corrections.Notes to Stores.Notes where Stores.Item for the same Item
Pseudo cade:
UPDATE Stores SET Stores.Notes = Stores.Notes & ' ' & Corrections.Notes & ' ' & Vocab.Basic_Text where Stores.Item=Vocab.Material_Code = Corrections.Item
Input:-
Stores
Item Description Bin Notes
1690191 Belt A21
1690255 Roller C23
1695399 Lamp Q43
Vocab
Material_Code Basic_Text
1690191 5mm x 289mm Polycord
1690255 6mm x 300mm Flat
Corrections
Item Notes
1690255 Used in Leveller section
Output:-
Stores
Item Description Bin Notes
1690191 Belt A21 5mm x 289mm Polycord
1690255 Roller C23 Used in Leveller section 6mm x 300mm Flat
1695399 Lamp Q43
I have tried using joins and unions and concatenation but cannot get it right.
Does anyone have the knowledge to help me do this?
(sorry, the alignment of the columns does not show as I had intended)
Kintara
I have three tables in the SQLite3 database arranged as so:
Table1 Name :Stores
Field1: Item
Field2: Description
Field3: Bin
Field4: Notes
Table2 Name: Vocab
Field1: Material_Code
Field2: Basic_Text
Table3 Name: Corrections
Field1: Item
Field2: Notes
Field1 in all three table will be the unique ID and will be used as the common reference for an item across all three tables.
I would like to add Vocab.Basic_Text and Corrections.Notes to Stores.Notes where Stores.Item for the same Item
Pseudo cade:
UPDATE Stores SET Stores.Notes = Stores.Notes & ' ' & Corrections.Notes & ' ' & Vocab.Basic_Text where Stores.Item=Vocab.Material_Code = Corrections.Item
Input:-
Stores
Item Description Bin Notes
1690191 Belt A21
1690255 Roller C23
1695399 Lamp Q43
Vocab
Material_Code Basic_Text
1690191 5mm x 289mm Polycord
1690255 6mm x 300mm Flat
Corrections
Item Notes
1690255 Used in Leveller section
Output:-
Stores
Item Description Bin Notes
1690191 Belt A21 5mm x 289mm Polycord
1690255 Roller C23 Used in Leveller section 6mm x 300mm Flat
1695399 Lamp Q43
I have tried using joins and unions and concatenation but cannot get it right.
Does anyone have the knowledge to help me do this?
(sorry, the alignment of the columns does not show as I had intended)
Kintara