If I had to take a shot in the dark .... you probably don't want one big
text / char field for this.
If you do have a NEED for a single column that appears like this you might
want to check out computed columns (in SQL, I'm sure other RDBMS'es have
similar features). It will allow you to have columns in a table that are
computed based on an expression. So in your case myTable could have three
columns A, B, C ...columns A and B are just plain text values column C is
columns A & B concatenated. So in this respect you could have a table that
had a errorDate, ErrorNum, ErrorType, ErrorMessage fields of the appropriate
data types...if the data types were appropriate you could just add a date
filtering clause to the WHERE of your SQL like, WHERE errorDate =
'12/10/2000'.
>From your sample it looks like you might be trying to import a text file
into your RDBMS possibly output from your backup solution ? If your using
SQL Server check out the DTS (Data Transformation Services) wizard available
in SQL 7 & 2000 ...it could easily solve your problem of breaking the info
into columns. If not your RDBMS most likely provides some sort of bulk
import functionality , or you could write a CF page to process a text file
and do the appropriate inserts in the database.
Hope this helps.
-eric
------------------------------------------------
Common sense is genius dressed in its working clothes.
-- Ralph Waldo Emerson
Eric Barr
Zeff Design
(p) 212.714.6390
(f) 212.580.7181
-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 6:04 PM
To: CF-Talk
Subject: Searching
I have a text file that I imported into SQL. here is a sample of it:
20010107 132319 MSG Message Engine is Started.
20010107 134037 JOB Job Engine is Started.
20010107 134038 MSG Message Engine is Started.
20010107 134041 DB Database Engine is Started.
20010107 134042 TAPE NEW DEVICE 1, [DEC DLT2000 15/30 GB840B]
20010107 134042 TAPE Device added to group
20010107 134042 TAPE Tape Engine is Started.
20010107 134853 DB Database Engine is Stopped.
20010107 135214 JOB Job Engine is Started.
20010107 135215 MSG Message Engine is Started.
20010107 135219 DB Database Engine is Started.
20010107 135220 TAPE Tape Engine is Started.
20010107 140022 JOB Job Engine is Started.
20010107 140023 MSG Message Engine is Started.
20010107 140026 DB Database Engine is Started.
20010107 140027 TAPE Tape Engine is Started.
20010107 140918 JOB Job Engine is Started.
20010107 140918 MSG Message Engine is Started.
20010107 140920 DB Database Engine is Started.
20010107 140922 TAPE Tape Engine is Started.
When it is put into the database it is all in one column. I want to know
how can I search that column using cf and only return info that i want from
a certain date.
I tried
Select *
from log <!--table name-->
where arclog = '200102107'
It returns nothing. Would I be better off to use cffile and make it just
read the file where it is on the server?
Joshua Tipton
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists