Step 1: Open Your Excel File
Suppose your Excel has this structure:
EmpCodeName...(empty column for SQL)
L58882 | Mahmudul Hasan | |
L54459 | Emon | |
In the first row of the last column (say column D), enter this formula:
="UPDATE EMPLOYER SET Hold = 'N' WHERE EmpCode = '" & A2 & "';"
👉 Explanation:
- A2 = the cell where your EmpCode is located
- Adjust the column letter (A) depending on your Excel layout
Step 3: Apply to All Rows
After entering the formula in the first row:
- Hover over the bottom-right corner of the cell (you’ll see a + sign)
- Double-click the fill handle → Excel will auto-fill all rows
Step 4: Copy & Paste as Text (Optional)
If you need to use these queries elsewhere:
- Copy the last column
- Paste as Values (Right-click → Paste Special → Values)
- Save as .sql or .txt file if needed