Just import it space delimited.  The columns won't all make sense, but
it's fairly trivial to reassemble them or whatever.  Say you've got
this file (similar to yours):

ip [date:time zone] "method script protocol" status size

Import that space delimted and you'll get some trash, but then you can
run a query like this:

select ip, date_time || " " || zone as date_time, right(method,
length(method) - 1) as method, script, left(protocol, length(protocol)
- 1), status size
from your_table

which will give you a "clean" recordset.  That's probably not the best
way to approach it, but it should get you started.  You could even do
some trickery on the query string to split out URL variables and stuff
too, though that'd get nasty quick.

cheers,
barneyb

On 12/13/05, James Blaha <[EMAIL PROTECTED]> wrote:
> Barney,
>
> Do you know if there is an easy way to get the log to import into a SQL 
> Server table and have all the "variables" in the log go into a column in a 
> table (its not a fixed file)?
>
> Since the file is mostly "space" delimited the time variable throws a knot in 
> an easy to parse and table insert block of code.
>
> I'll check out the program you mentioned thanks for your time its greatly 
> appreciated!
>
> i.e. columns
>
> client_address
> userid
> request_time
> response_status
> size
>
> i.e log file.
> 33.4.55.666 - - [16/Nov/2005:19:00:00 -0500] "GET /css/web_defaultapp.css 
> HTTP/1.1" 200 30655
>
> -Jim
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226977
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to