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

[µo°Ý] ®É¶¡°ÝÃD½Ð±Ð

[µo°Ý] ®É¶¡°ÝÃD½Ð±Ð

DEAR  ALL ¤j¤j
1.¦p¹Ï¤@µ{¦¡
   1.1»Ý¨D§ì¨ú2018/10/22  08:00:00 PM-2018/10/23  08:00:00 AM¤§¶¡ªº¼Æ¾Ú,
   1.2¦ý¬O§ì¥X¨Óªº®É¶¡¤£·Ç½T???
   1.3 RANGE("B1")=2018/10/22  08:00:00 PM  RANGE("D1")=2018/10/23  08:00:00 AM
   1.4½Ð±Ð¦ó³B¦³°ÝÃD? ·Ð¤£§[½ç±Ð    THANKS*10000
      
¹Ï¤@
Sub VBA()
    Range("A3:F65536").ClearContents
    Dim cn As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    Dim strsql As String
    cn.Open "Provider=MSDAORA.1;Password=SDTHH;User ID=URCE01B;Data Source=QSRS05A"

    strsql = "SELECT TBDD7005.RECNO5,PN,LAYNM,PLOTER,NEDDP,TO_CHAR(FNTM,'YYYY/MM/DD HH:MM:SS AM/PM')" & Chr(13) & "" & Chr(10) _
           & "FROM TBDD7005,TBDD7006" & Chr(13) & "" & Chr(10) _
           & "Where TBDD7005.RECNO5=TBDD7006.RECNO5 AND TO_CHAR(FNTM,'YYYY/MM/DD HH:MM:SS AM/PM')>='" & Format(Range("B1"), "YYYY/MM/DD HH:MM:SS AM/PM") & "' AND TO_CHAR(FNTM,'YYYY/MM/DD HH:MM:SS AM/PM')<='" & Format(Range("D1"), "YYYY/MM/DD HH:MM:SS AM/PM") & "'"
'    [H1] = strsql
    rs.Open strsql, cn
    On Error Resume Next
    Range("A3").CopyFromRecordset rs
    rs.Close

    cn.Close
End Sub
ù

¦^´_ 1# rouber590324

¸Õ¸Õ¬Ý
  1. strsql = "SELECT TBDD7005.RECNO5,PN,LAYNM,PLOTER,NEDDP  FROM TBDD7005,TBDD7006  Where TBDD7005.RECNO5=TBDD7006.RECNO5 AND FNTM between " & CDbl(CDate(Range("B1"))) & " and " & CDbl(CDate(Range("D1")))
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

DEAR GBKEE ¤j¤j
·PÁ±z¤§¦^´_  100%²Å¦X»Ý¨D  THANKS*10000
ù

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD