Sub update()
Dim i, j As Long
Dim str As String
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim targetFile As Object
Dim myFilePath As String
Dim myFileText As String
myFilePath = "C:\org\sample_sql.txt"
Set targetFile = fso.CreateTextFile(myFilePath, True) ' this will overwrite any existing file
targetFile.WriteLine "-- ============================================= Sample Insert ============================================="
For j = 2 To 62
targetFile.WriteLine "INSERT INTO SAMPLE(SAMPLE_A, SAMPLE_B) VALUES('" & Sheets("sample_sheet").Cells(j, 1).Value & "', '" & Sheets("sample_sheet").Cells(j, 2).Value & "');"
Next j
targetFile.WriteLine "commit;"
targetFile.Close ' close the file
End Sub
'낙서장 > 낙서장' 카테고리의 다른 글
keytool (0) | 2022.12.22 |
---|---|
프레임워크 순위 (0) | 2022.08.23 |
이클립스에서 실행하지 않고 WAS(Tomcat)자체에서 실행하기 위한 환경설정 (0) | 2022.07.07 |
Window Power Shell -Tail 명령어로 로그 보기 (0) | 2022.02.09 |
tomcat https setting crt인증서 jks 변환과정~~ (0) | 2021.09.15 |