« Previous Next »

Thread: Addational line + data

Last post 07-21-2009 1:28 PM by gpl. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-17-2009, 11:46 AM

    • hg363
    • Top 100 Contributor
    • Joined on 09-04-2007, 7:44 PM
    • Posts 54

    Addational line + data

    Hi please kindly advise. I am running this query

    Set objinputFormat = CreateObject("MSUtil.LogQuery.TEXTLINEInputFormat")Set objOutputFormat = CreateObject("MSUtil.LogQuery.TSVOutputFormat")objOutputFormat.fileMode = 0

    objOutputFormat.headers = "Auto"

    strQuery =  "select  top 1 text INTO '\\h505050\C$\wamp\www\helpdesk\nw_audits\" & remote_host & ".txt'" &  " from '\\h505050\C$\wamp\www\helpdesk\pc_audits\telent_mac_list\*.txt'  where text like '%" & mac_add & "%'"

    And it works fine, expect that for some reason, ach time I run the query I get this

    Text
    212,00:17:a4:4e:41:6a,---,1/9,Level 1 Parkwood House @ HH, 192.168.215.149

    The word Text appears + the line of data I actually want. Can some one please tell me how to stop the 1st line TEXT appearing in the output, thank you Regards hg363 UK

     

  • 07-21-2009, 1:28 PM In reply to

    • gpl
    • Not Ranked
    • Joined on 07-21-2009, 1:25 PM
    • Posts 3

    Re: Addational line + data

    Im sure that you have realised the problem, but if not .... 

    The extra line that you see is your column header :

    select  top 1 text

    To prevent this, change the following line to this value to prevent headers being written - ever

    objOutputFormat.headers = "OFF"

    Graham

Page 1 of 1 (2 items)
Microsoft Communities