dimanche 2 décembre 2018

Inserting data into Table From Multiple table

I Have a Question in mysql database. I want to inserting data into a table which it from multiple table. This is my query

INSERT INTO dapot_dummy ('site_id','rnc_id','wbts_id','ip3g','vlan','status_vlan') VALUES ('TIM001' from site where id_site = 'TIM001','RNC Timika-1' from rnc where rnc_name = 'RNC Timika-1','117','10.250.46.85','3339','Metro E' from status_vlan where status_vlan = 'Metro E')

which I refer in my previous question link

Here is the output

Static analysis:

4 errors were found during analysis.

A comma or a closing bracket was expected (near "from" at position 100) Unexpected token. (near "site" at position 105) This type of clause was previously parsed. (near "where" at position 159) Unrecognized statement type. (near "where" at position 159) Query SQL:

INSERT INTO dapot_dummy ('site_id','rnc_id','wbts_id','ip3g','vlan','status_vlan') VALUES ('TIM001' from site where id_site = 'TIM001','RNC Timika-1' from rnc where rnc_name = 'RNC Timika-1','117','10.250.46.85','3339','Metro E' from status_vlan where status_vlan = 'Metro E')

MySQL menyatakan: Dokumentasi

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''site_id','rnc_id','wbts_id','ip3g','vlan','status_vlan') VALUES ('TIM001' from ' at line 1

How to fix it? Please help




Aucun commentaire:

Enregistrer un commentaire