;
> sqlite> select * from t1;
> 1
> 2
>
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of e-mail mgbg25171
> Sent: Wednesday, February 20, 2013 7:46 AM
> To: General Discussion of SQLite Datab
ail mgbg25171
Sent: Wednesday, February 20, 2013 7:46 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] got selected items ok but can't update using them
Igor, Michael
Thank you very much for your advice re how to use Update with compound
queries
I'm currently trying to c
On 2/20/2013 8:46 AM, e-mail mgbg25171 wrote:
but how do I fill a table in a :memory: db with the contents of another in
a real database?
http://sqlite.org/lang_attach.html
--
Igor Tandetnik
___
sqlite-users mailing list
sqlite-users@sqlite.org
http
here
> ID=(SELECT alias_id from alias_itms);
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of e-mail mgbg25171
> Sent: Wednesday, February 20, 2013 6:46 AM
> To: General Discussion of SQLite Database
...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of e-mail mgbg25171
Sent: Wednesday, February 20, 2013 6:46 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] got selected items ok but can't update using them
Thanks Simon...
Your's works a treat
Re your ques
On 2/20/2013 7:45 AM, e-mail mgbg25171 wrote:
Here's my query
UPDATE stmnts SET itm=n where ID=i
(
SELECT alias_id i,
(SELECT orig_itm FROM stmnts where ID = alias_id) o,
(SELECT itm FROM std_itms where ID = std_id) n
FROM
(SELECT std_id, alias_id FROM alias_itms)
)
This doesn't even remotely
On 2/20/2013 6:36 AM, e-mail mgbg25171 wrote:
SELECT i,o,n FROM
(
SELECT alias_id i,
(SELECT orig_itm FROM stmnts where ID = alias_id) o,
(SELECT itm FROM std_itms where ID = std_id) n
FROM
(SELECT std_id, alias_id FROM alias_itms)
)
This can be written simpler as
select alias_id i, orig_itm o
Thanks Simon...
Your's works a treat
Re your question about my error
Here's my query
UPDATE stmnts SET itm=n where ID=i
(
SELECT alias_id i,
(SELECT orig_itm FROM stmnts where ID = alias_id) o,
(SELECT itm FROM std_itms where ID = std_id) n
FROM
(SELECT std_id, alias_id FROM alias_itms)
)
and he
On 20 February 2013 11:36, e-mail mgbg25171 wrote:
> After a bit of a struggle I've got the fields I want but I'm failing to use
> them in an update operation.
> This
>
> SELECT i,o,n FROM
> (
> SELECT alias_id i,
> (SELECT orig_itm FROM stmnts where ID = alias_id) o,
> (SELECT itm FROM std_itms w
After a bit of a struggle I've got the fields I want but I'm failing to use
them in an update operation.
This
SELECT i,o,n FROM
(
SELECT alias_id i,
(SELECT orig_itm FROM stmnts where ID = alias_id) o,
(SELECT itm FROM std_itms where ID = std_id) n
FROM
(SELECT std_id, alias_id FROM alias_itms)
)
10 matches
Mail list logo