sql - Output recordset in VBA using condition -
i having trouble here.
i have csv database 25 million lines 4 columns: field (from 1 5), datehour (in format yyyyddmmhhmmssxxx , year, day, month, hour, minute, second , miliseconds), bound (south or north) , category (from 1 10).
i using following code
public sub querytextfile() dim recordset adodb.recordset dim connectionstring string connectionstring = "provider=microsoft.jet.oledb.4.0;data source=" & thisworkbook.path & ";" & _ "extended properties=text;" const sql string = "select * dados.csv categoria=3;" set recordset = new adodb.recordset call recordset.open(sql, connectionstring, cursortypeenum.adopenforwardonly, locktypeenum.adlockreadonly, commandtypeenum.adcmdtext) call sheet1.range("a1").copyfromrecordset(recordset) recordset.close set recordset = nothing end sub problem i, example, want registers february (month 02) , field 3. how that?
thank guys!
select * dados.csv categoria = 3 , field = 3 , datehour '######02*'
Comments
Post a Comment