A neat way to do what you want is to set up a table cross-referencing
State mnemonics like CA with California, and then use a lookup as
suggested by an earlier correspondent.
Finally raise a VIEW containing the complex SELECT statement so that you
can do your query with the simplest SQL. If you are constantly
referring to California, make a VIEW just for that query.
JS
-----Original Message-----
From: Firman Wandayandi [mailto:[EMAIL PROTECTED]
Sent: Sunday, 25 September, 2005 11:43 PM
To: sqlite-users@sqlite.org; [EMAIL PROTECTED]
Subject: Re: [sqlite] Data Manipulation ?
On 9/26/05, Richard Nagle <[EMAIL PROTECTED]> wrote:
Does SQLite support any direct built-in commands, that can
manipulate data?
ie.
suppose the boss wanted a report of cars honda in CA,
but he wants to see the California instead of CA,
so you need to convert all the state fields into full names,
how would this be done...
There's no built-in function for this cases, you need something like
replace(), see http://sqlite.org/lang_expr.html for the built-in
functions. You need the aggregate functions.
I use SQLite with PHP, so it's easy to create the aggregate functions.
Fields are as follows:
recid
qty
make
model
year
engine
color
state
price
Thanks -
Richard
Regards,
--
Firman Wandayandi
Never Dreamt Before (http://php.hm/~firman/)