- ©«¤l
- 561
- ¥DÃD
- 160
- ºëµØ
- 0
- ¿n¤À
- 725
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-7
|
DEAR ALL ¤j¤j
1.ì»Ý¨D¬°©óEXCEL Àx¦s®æSHEET1.RANGE("A1")¿é¤J L05 ¦Û°Ê§ì¨ú¹ïÀ³¤¤¤å Æp¤Õ ¿é¤J L20 ¦Û°Ê§ì¨ú¹ïÀ³¤¤¤å À£¦X....
2.¦p¹Ï¤@ ¸ê°T³¡ªù´£¨Ñ¤@«ü¥O¨Ñ§Ú§ì¨ú.
3.¦p¹Ï¤G¬°§Ú¥®É§ì¨úODBC¤§µ{¦¡½X
½Ð°Ý¦³½Öª¾¹Dn¦p¦ó§ì¨ú.·Ð¤£§[½ç±Ð. THANKS*10000
¹Ï¤@¸ê°T³¡ªù¦^À³
Sorry¡IEXCEL ¤£¼ô¡A¤£ª¾¹D¦p¦ó±Ò°Ê
¬Ý§A¥±`«ç»ò¤U«ü¥O¥hodbc§ì¸ê®Æªº ?
קï«e select cnm from t2cept06 where mpid=¡¦L05¡¦;
קï«á SELECT URCE01P.f_get_t2cept06('L05') FROM DUAL;
¹Ï¤G¬°§Ú¥®É§ì¨úODBC¤§µ{¦¡½X
Sub Macro1()
Sheet1.Select
Sheet1.[a1:BB65536].ClearContents
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DRIVER={Microsoft ODBC for Oracle};UID=URCE01B;;SERVER=JSRS05A;", _
Destination:=Range("A1"))
.CommandText = Array( _
"SELECT TBDD2026.PCBKIND, TBDD2026.BULAY, TBDD2026.MPID, TBDD2026.IT, TBDD2026.CHKNUM, TBDD2026.COND, TBDD2026.SEQ, TBDD2026.RELEASE, TBDD2026.SCRAPDATE, TBDD2026.SCRAPNM, TBDD2026.SCRAPDESC" & Chr(13) & "" & Chr(10) & "FROM URCE" _
, "01P.TBDD2026 TBDD2026")
.Name = "¨Ó¦Û TONHMT02 ªº¬d¸ß"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
End Sub |
|