SiteMaze Posted February 18, 2008 Posted February 18, 2008 How do I save SQL results to a file? The SQL returns 1000s of records, do I have to loop through each of them and save line by line? Is there a simpler better method of doing it? Example: This SQL will retun 20,000 lines and I love to save this into a CSV file. $sql2 = ObjCreate("ADODB.Recordset") $sql2.cursorlocation = 3 $sql2.open ("Select * From Table_Members", $oConnectionObj) If Not $sql2.eof Then $t_ret = $sql2.Fields(0).Value & "," & $sql2.Fields(1).Value & "," & $sql2.Fields(2).Value & "," & $sql2.Fields(3).Value $ret = $ret & $t_ret & @CRLF EndIf $sql2.close Arsenal Football Fan Club in Singapore
SiteMaze Posted February 19, 2008 Author Posted February 19, 2008 ^bump. The traffic at this forum is so massive that new posts get burried in the 2nd page just after a few hours. Can someone help me? Arsenal Football Fan Club in Singapore
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now