<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Input Formats</title><link>http://forums.iis.net/1141.aspx</link><description>Discussion of input formats such as ADS, BIN, COM, CSV, TSV, ETW, EVT, FS, HTTPERR, IIS, IISODBC, IISW3C, NCSA, NETMON, REG, TEXTWORD, TEXTLINE, URLSCAN, and W3C</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1906311.aspx</link><pubDate>Tue, 09 Jun 2009 10:38:03 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906311</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906311.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1906311</wfw:commentRss><description>&lt;p&gt;Hi Kanwal I am still unbale to get this working, please can you help me further.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is my data (the data is in CSV format, here is an example)&lt;/strong&gt;&lt;/p&gt;
&lt;table class="" style="WIDTH:192pt;BORDER-COLLAPSE:collapse;" cellspacing="0" cellpadding="0"&gt;



&lt;tr style="HEIGHT:12.75pt;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;BORDER-TOP:#ece9d8;BORDER-LEFT:#ece9d8;WIDTH:48pt;BORDER-BOTTOM:#ece9d8;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;"&gt;ComputerName&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;BORDER-TOP:#ece9d8;BORDER-LEFT:#ece9d8;WIDTH:48pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;,Date&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;BORDER-TOP:#ece9d8;BORDER-LEFT:#ece9d8;WIDTH:48pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;/td&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;BORDER-TOP:#ece9d8;BORDER-LEFT:#ece9d8;WIDTH:48pt;BORDER-BOTTOM:#ece9d8;BACKGROUND-COLOR:transparent;"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="HEIGHT:12.75pt;"&gt;
&lt;td class="" style="BORDER-RIGHT:#ece9d8;BORDER-TOP:#ece9d8;BORDER-LEFT:#ece9d8;BORDER-BOTTOM:#ece9d8;HEIGHT:12.75pt;BACKGROUND-COLOR:transparent;mso-ignore:colspan;" colspan="4"&gt;
&lt;p&gt;H650242,17/04/2007 10:34:32&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is my code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Set objShell = CreateObject(&amp;quot;WScript.Shell&amp;quot;)&lt;/p&gt;
&lt;p&gt;objShell.CurrentDirectory = &amp;quot;&lt;a&gt;\\h505050\C$\Program&lt;/a&gt; Files\Log Parser 2.2\&amp;quot;&lt;/p&gt;
&lt;p&gt;Set objLogParser = CreateObject(&amp;quot;MSUtil.LogQuery&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Set objinputFormat = CreateObject(&amp;quot;MSUtil.LogQuery.CSVInputFormat&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Set objOutputFormat = CreateObject(&amp;quot;MSUtil.LogQuery.ChartOutputFormat&amp;quot;)&lt;/p&gt;
&lt;p&gt;objOutputFormat.chartType = &amp;quot;BarStacked&amp;quot;&lt;/p&gt;
&lt;p&gt;objOutputFormat.chartTitle = &amp;quot;Creation Times taken from Active Directory&amp;quot;&lt;/p&gt;
&lt;p&gt;objOutputFormat.fileType = &amp;quot;gif&amp;quot; &amp;#39;GIF BMP&lt;/p&gt;
&lt;p&gt;objOutputFormat.groupSize = &amp;quot;800x600&amp;quot;&lt;/p&gt;
&lt;p&gt;objOutputFormat.Values = &amp;quot;OFF&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;strQuery =&amp;nbsp; &amp;quot;select&amp;nbsp; Year, Month, count(*) using Extract_Token(Date,1,&amp;#39;/&amp;#39;) as Month, Extract_Token(Date,2,&amp;#39;/&amp;#39;) as Year&amp;nbsp; into &amp;quot; &amp;amp; &amp;quot;&lt;a&gt;\\h505050\c$\wamp\www\helpdesk\assets\lp_output\interrogation\&lt;/a&gt;graph.gif&amp;quot; &amp;amp; &amp;quot; From &amp;#39;C:\wamp\www\helpdesk\pc_audits\creation\*.csv&amp;#39; group by Year,Month&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And on running this code here is the error&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Error:&amp;nbsp;Error executing query: Column Month is not an INTEGER nor a REAL [Type mismatch.]&lt;br /&gt;Code:&amp;nbsp;80020005&lt;br /&gt;Source: &amp;nbsp;CLogQueryClass&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And the exact line that is causing this error within the code is:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;u&gt;objLogParser.ExecuteBatch strQuery, objInputFormat, objOutputFormat&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Do you think you could take a look at this and correct what ever is making the error,as I really am lost, regards Mr Ghelani&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1906216.aspx</link><pubDate>Mon, 08 Jun 2009 17:40:15 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906216</guid><dc:creator>ksingla</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906216.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1906216</wfw:commentRss><description>&lt;p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;FONT-SIZE:10pt;"&gt;Hi,&lt;br /&gt;&lt;br /&gt;Regarding the error, it seems there is no comma between date and time. So you can merge the Date and Time fields into one in header.csv as datetime. Extract_Token method in logparser takes three parameters. First is the field, second index and third the token separator. Extract_Token(Date, 1, ‘/’) will thus take date field, break it at ‘/’ character and pick the element at index 1 (first one is 0). I used the Extract_Token method to get Month and Year from the date field. Once you have the Month and Year, you can just do a standard group by sql query to get what you wanted.&lt;br /&gt;&lt;br /&gt;Let me know if you still get the error with the query after fixing header.csv.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanwal&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1906189.aspx</link><pubDate>Mon, 08 Jun 2009 15:57:57 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906189</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906189.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1906189</wfw:commentRss><description>&lt;p&gt;Hi Kanwal also if you dont mind, could you please in very lay man terms explian to me and those who are new to LP what this query means&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;select Year,Month,count(*) using Extract_Token(Date,1,&amp;#39;/&amp;#39;) as Month, Extract_Token(Date,2,&amp;#39;/&amp;#39;) as Year&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;In specifi what does the Extract_Token(Date,1,&amp;#39;/&amp;#39;) as Month and Extract_Token(Date,2,&amp;#39;/&amp;#39;) as Year&amp;nbsp;&lt;/p&gt;
&lt;p&gt;mean thnak you very much kind regards Mr Ghelani&lt;/p&gt;</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1906185.aspx</link><pubDate>Mon, 08 Jun 2009 15:40:26 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906185</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906185.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1906185</wfw:commentRss><description>Dear Kanwal hope you are well. Have you had an opportunity to look at my last post. Please if its at all possible can you fix this error for me and provide me with the correct syntax, kind regards Mr Ghelani UK</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1905681.aspx</link><pubDate>Wed, 03 Jun 2009 18:15:42 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1905681</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1905681.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1905681</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry Kanwal please accept my apologies as there is a mistake in the post above. &lt;/p&gt;
&lt;p&gt;My data looks like this &lt;/p&gt;
&lt;p&gt;ComputerName,Date &lt;/p&gt;
&lt;p&gt;B002627,08/10/2004 21:03:27 &lt;/p&gt;
&lt;p&gt;But obviously without the space inbetween the fields and the actual data&lt;/p&gt;
&lt;p&gt;Regards Mr Ghelani&lt;/p&gt;</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1905677.aspx</link><pubDate>Wed, 03 Jun 2009 17:55:07 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1905677</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1905677.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1905677</wfw:commentRss><description>&lt;p&gt;Hi Kanwal hope you are well and thank you for your prompt reply. However on running your query I am getting an error. Let me show you. &lt;/p&gt;
&lt;p&gt;This is my data &lt;/p&gt;
&lt;p&gt;ComputerName,Date,Time &lt;/p&gt;
&lt;p&gt;B002627,08/10/2004,21:03:27 &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my query &lt;/p&gt;
&lt;p&gt;strQuery =&amp;nbsp; &amp;quot;select Year,Month,count(*) using Extract_Token(Date,1,&amp;#39;/&amp;#39;) as Month, Extract_Token(Date,2,&amp;#39;/&amp;#39;) as Year&amp;nbsp; into &amp;quot; &amp;amp; &amp;quot;&lt;a&gt;\\h505050\c$\wamp\www\helpdesk\assets\lp_output\interrogation\&lt;/a&gt;&amp;quot; &amp;amp; remote_host &amp;amp; &amp;quot;.gif&amp;quot; &amp;amp; &amp;quot; From &amp;#39;C:\wamp\www\helpdesk\pc_audits\creation\*.txt&amp;#39; group by Year,Month&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and this is the error LP is generating&lt;/p&gt;
&lt;p&gt;---------------------------&lt;br /&gt;Windows Script Host&lt;br /&gt;---------------------------&lt;br /&gt;Script:&amp;nbsp;C:\Documents and Settings\hg363.RBHNT\Desktop\interrogation.vbe&lt;br /&gt;Line:&amp;nbsp;183&lt;br /&gt;Char:&amp;nbsp;1&lt;br /&gt;Error:&amp;nbsp;Error executing query: Column Month is not an INTEGER nor a REAL [Type mismatch.]&lt;br /&gt;Code:&amp;nbsp;80020005&lt;br /&gt;Source: &amp;nbsp;CLogQueryClass&lt;/p&gt;
&lt;p&gt;---------------------------&lt;br /&gt;OK&amp;nbsp;&amp;nbsp; &lt;br /&gt;---------------------------&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Can you please tell me where it is going wrong regards Mr Ghelani&lt;/p&gt;</description></item><item><title>Re: Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1905674.aspx</link><pubDate>Wed, 03 Jun 2009 17:29:01 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1905674</guid><dc:creator>ksingla</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1905674.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1905674</wfw:commentRss><description>&lt;p&gt;Something like following will work.&lt;br /&gt;&lt;br /&gt;LogParser.exe &amp;quot;select Year,Month,count(*) using Extract_Token(Date,1,&amp;#39;/&amp;#39;) as Month, Extract_Token(Date,2,&amp;#39;/&amp;#39;) as Year from file*.csv group by Year,Month&amp;quot; -i:csv -headerrow:off -iheaderfile:header.csv&lt;br /&gt;&lt;br /&gt;header.csv contains only one line which serves as header as ComputerName, Date, Time. You will need this if your files doesn&amp;#39;t contain a header already.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanwal&lt;/p&gt;</description></item><item><title>Date \ Time &amp; Graph</title><link>http://forums.iis.net/thread/1905622.aspx</link><pubDate>Wed, 03 Jun 2009 13:18:28 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1905622</guid><dc:creator>hg363</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1905622.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1141&amp;PostID=1905622</wfw:commentRss><description>&lt;p&gt;Hi please can some on assist me with my problem.&lt;/p&gt;
&lt;p&gt;I have 3000 text files. Each text file has 3 bits of information Computer Name, Date, Time&lt;/p&gt;
&lt;p&gt;B00NOVA,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/07/2007, 12:45:24&lt;/p&gt;
&lt;p&gt;B00NOVA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is the name of a computer and the date and time is when this PC was added to the domain.&lt;/p&gt;
&lt;p&gt;How then can I write a query that wil go through all these text files and for example pull out all PC&amp;#39;s that were put on the domain in the year 2007 and the month 7 and then put this information into a graph.&lt;/p&gt;</description></item></channel></rss>