ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¤U«ü¥O¥hodbc§ì¸ê®Æ

[µo°Ý] ¤U«ü¥O¥hodbc§ì¸ê®Æ

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
½Ð°Ý¦³½Öª¾¹D­n¦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
ù

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD