Hi,
I need to remove the first line from a do while loop. Below you can see the code and under that the results. The results are good except for the first row. Because i am pulling the data from a txt file i extract the initial SQL query that is embedded. What would be the best way to delete this row before inserting the uniqueid's in to a table.
Results:
SELECT firstname, idemail FROM wce_contact where uniqueid = 'lookupsql=select * from wce_contact WHERE (COMPANY LIKE '%wiredcontact%') ORDER BY Surname, COMPANY
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'aPV6aaHXSQ_a
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'gUX.ualWB3fc
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'q9q1ubo24u5gfc3h
'SELECT firstname, idemail FROM wce_contact where uniqueid = '000000000001
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'NQjMbh5ipKic
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'K7b9aaAMW)_a
'SELECT firstname, idemail FROM wce_contact where uniqueid = '7wp1r6h3e916l445
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'bBCpiahl3Dfc
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'v4R7carlltYa
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'lpi1uba3dm04w6dh
'
I need to remove the first line from a do while loop. Below you can see the code and under that the results. The results are good except for the first row. Because i am pulling the data from a txt file i extract the initial SQL query that is embedded. What would be the best way to delete this row before inserting the uniqueid's in to a table.
Code:
Set TextStream = file.OpenAsTextStream(ForReading, TristateUseDefault)
' Read the file line by line
Do While Not TextStream.AtEndOfStream
Line = TextStream.readline
' Do something with "Line"
Line = Line & vbCRLF
qry = "SELECT firstname, idemail FROM wce_contact where uniqueid = '"&Line&"'"
Response.write qry&"</br>"
Loop
Set TextStream = nothing
Results:
SELECT firstname, idemail FROM wce_contact where uniqueid = 'lookupsql=select * from wce_contact WHERE (COMPANY LIKE '%wiredcontact%') ORDER BY Surname, COMPANY
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'aPV6aaHXSQ_a
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'gUX.ualWB3fc
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'q9q1ubo24u5gfc3h
'SELECT firstname, idemail FROM wce_contact where uniqueid = '000000000001
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'NQjMbh5ipKic
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'K7b9aaAMW)_a
'SELECT firstname, idemail FROM wce_contact where uniqueid = '7wp1r6h3e916l445
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'bBCpiahl3Dfc
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'v4R7carlltYa
'SELECT firstname, idemail FROM wce_contact where uniqueid = 'lpi1uba3dm04w6dh
'