Use SQL Excel office software fast splicing

Use SQL Excel office software fast splicing

1. equal sign (=) later need to use the entire statement "" double quotes

2. Specific add padding data need to be placed inside an intermediate single quotation marks in double quotes & symbol address ( ' "&"')

3 separated by a semicolon, when such sql run in the actuator can automatically determine the end

1, insert statements

= "Insert into table (field 1, field 2, field 3) values ​​( '" & Excel a corresponding column, for example, (B3) & "', 'Excel a corresponding column', '' & Excel columns corresponding &" ');

B3: B: Excel corresponding column 3: starting from the third row

 

2, modify the statement

Such as: the batch part of the information required to update the table to the database (example: the name of the department table 1 is changed to 5) corresponding to an Excel as B2;

= "Update table set field name = '' & required value (5) &" 'where field name = "" & B2 & "';"

 

Guess you like

Origin www.cnblogs.com/zhaoh-630/p/10959065.html