php-db | 2001041
Date: 04/11/01
- Next message: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- Previous message: Steve Farmer: "Re: [PHP-DB] date_format for Oracle"
- In reply to: Randall Barber: "[PHP-DB] Only part of a field SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
RDB--
You should try...
SELECT * FROM table WHERE INSTR(field1, '999997') > 0
[selects everything from 'table' where field1 has that job number within it]
Or, if you just wanted to run a query that would update every entry to not
include that "Job ID =" you could...
UPDATE table field1=SUBSTRING(field1, 10)
[modifies every field1 in 'table' to everything in field1 from the tenth
character until the end]
Hope this helps. Let me know if you need anything else. :)
- Will
----- Original Message -----
From: "Randall Barber" <rdb55 <email protected>>
To: <php-db <email protected>>
Sent: Wednesday, April 11, 2001 4:43 PM
Subject: [PHP-DB] Only part of a field SQL
Our Xerox production printers export a log in ':' delimited format.
No big deal, except that each field has a tag like so:
Job ID = 999999
Job ID = 999998
Job ID = 999997
See what I mean?
I have simply imported the whole CSV file into Access and was now wondering
if I could do the following?
Pull everything out of the field AFTER the '=' sign.
SELECT FIELD1, FIELD3, FIELD10 FROM ImportTable WHERE FIELD1=' everything
after the = sign ' AND FIELD3=' same idea ' AND FIELD10=' same idea '
So when I execute the query all I get for Job IDs is:
999999
999998
999997
Is there a way to do this in the query? I am totally inexperienced.
Thanks in advance,
RDB
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- Previous message: Steve Farmer: "Re: [PHP-DB] date_format for Oracle"
- In reply to: Randall Barber: "[PHP-DB] Only part of a field SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

