- ©«¤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.¦p¹Ï¤@µ{¦¡·|¨q¥X©óÀx¦s®æB4©¹¤U.
2.Y§Ú¼g§ï ¨q¥X©óÀx¦s®æB4©¹¥k.¸Ó¦p¦óקï??
3.·Ð¤£§[½ç±Ð THANKS*10000
¹Ï¤@
Sub aa()
Range("B4:D65536").ClearContents
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strsql As String
Z = 4
Do Until Range("A" & Z) = ""
cn.Open "Provider=MSDAORA.1;Password=BATCH;User ID=URCE01B;Data Source=QSRS05A"
strsql = "SELECT TBDD2002.PN" & Chr(13) & "" & Chr(10) _
& "FROM TBDD2002,TBDD2040" & Chr(13) & "" & Chr(10) _
& "Where TBDD2002.PN=TBDD2040.PN AND SUBSTR('" & Range("A" & Z) & "',1,6)=SUBSTR(TBDD2002.PN,1,6) and NVL(FORMALPN,'A') IN 'FS'"
rs.Open strsql, cn
Range("B" & Z).CopyFromRecordset rs
rs.Close
cn.Close
Z = Z + 1
Loop
End Sub |
|