On Fri, 22 Sep 2017 10:54:21 +0100, John G
wrote:
>I know this is an older thread, but shouldn't that reference be on the ITEM
>table ? So ...
>
>CREATE TABLE ATTRIBUTES (
>ITEM_ID INTEGER REFERENCES ITEM(ID) ON DELETE CASCADE,
> KEY TEXT,
>VALUE TEXT,
>
I know this is an older thread, but shouldn't that reference be on the ITEM
table ? So ...
CREATE TABLE ATTRIBUTES (
ITEM_ID INTEGER REFERENCES ITEM(ID) ON DELETE CASCADE,
KEY TEXT,
VALUE TEXT,
PRIMARY KEY (ITEM_ID,KEY)
) WITHOUT ROWID;
John G
On 11 September 2017 at 13:11,
On Mon, 11 Sep 2017 14:05:25 +0200, Kees Nuyt
wrote:
> CREATE TABLE ATTRIBUTES (
> ITEM_ID INTEGER REFERENCES ATTRIBUTES(ID) ON DELETE CASCADE,
> KEY TEXT,
> VALUE TEXT,
> PRIMARY KEY (ITEM_ID,KEY)
> ) WITHOUT ROWID;
> CREATE INDEX attr_item_id ON ATTRIBUTES(ITEM_ID);
On Sun, 10 Sep 2017 20:35:16 -0700, Vikas Aditya
wrote:
> Hi All,
>
> I need some help in figuring our right query syntax for querying
> items from two tables. We have two tables. One of the table has
> list of items. And Second table has additional attributes.
Adding
Correction:
On 2017/09/11 6:43 AM, R Smith wrote:
SELECT I.ID, ISNULL(A.VALUE,'[No Value]')
FROM ITEM AS I
LEFT JOIN ATTRIBUTES AS A ON A.ITEM_ID = I.ID
WHERE A.key='abc' OR A.key IS NULL
ORDER BY A.VALUE;
There is of course no such thing as SORT BY in SQL, it's ORDER BY.
(Forgive me,
On 2017/09/11 5:35 AM, Vikas Aditya wrote:
Hi All,
I need some help in figuring our right query syntax for querying items from two
tables. We have two tables. One of the table has list of items. And Second
table has additional attributes.
CREATE TABLE ITEM (
ID INTEGER,
FIELD0 TEXT
FIELD1
Hi All,
I need some help in figuring our right query syntax for querying items from two
tables. We have two tables. One of the table has list of items. And Second
table has additional attributes.
CREATE TABLE ITEM (
ID INTEGER,
FIELD0 TEXT
FIELD1 TEXT,
FIELD3 TEXT,
FIELD4 TEXT
);
CREATE TABLE
Black, Michael (IS) wrote:
> sqlite> create table t(d date);
> sqlite> insert into t values('2011-12-31 09:00');
> sqlite> insert into t values('2011-12-31 12:15');
> sqlite> select d,substr(datetime(d,'-12 hours'),1,16) from t;
> 2011-12-31 09:00|2011-12-30 21:00
>
On 17/06/2011 12:10, looki wrote:
> First column holds the givin datetime from my table and the second column
> should show the datetime from first row but 12 hours before. for example:
>
> '2011-12-31 09:00' '2011-12-30 21:00'
> '2011-12-31 12:15' '2011-12-30 00:15'
> ...
>
> looks simple but
lack
Senior Scientist
NG Information Systems
Advanced Analytics Directorate
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of looki [looki1...@yahoo.com]
Sent: Friday, June 17, 2011 6:10 AM
To: sqlite-users@sqlite.org
Subject: EXT :[
Hi,
i have a table which holds dates like
'2011-12-31 09:00' and i now want to write a query which gives me 2 columns.
First column holds the givin datetime from my table and the second column
should show the datetime from first row but 12 hours before. for example:
'2011-12-31 09:00'
Jörgen Hägglund
wrote:
> Hi all!
> I have three tables, one containing IP addresses as integers, lets
> call
> it 'base'.
> A second table containing IP ranges and the country code the range
> belongs to. Lets call this 'IPtoCC' with the fields IPFrom and IPTo as
>
On Wed, Nov 11, 2009 at 09:36:41AM -0600, P Kishor scratched on the wall:
> 2009/11/11 Jörgen Hägglund :
> > Hi all!
> > I have three tables, one containing IP addresses as integers, lets call
> > it 'base'.
> > A second table containing IP ranges and the country code
2009/11/11 Jörgen Hägglund :
> Hi all!
> I have three tables, one containing IP addresses as integers, lets call
> it 'base'.
> A second table containing IP ranges and the country code the range
> belongs to. Lets call this 'IPtoCC' with the fields IPFrom and IPTo as
>
Hi all!
I have three tables, one containing IP addresses as integers, lets call
it 'base'.
A second table containing IP ranges and the country code the range
belongs to. Lets call this 'IPtoCC' with the fields IPFrom and IPTo as
integers and CC as text.
Then a third, 'Exclude', containing
Thanks
--- [EMAIL PROTECTED] wrote:
> "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> > Artem Yankovskiy
>
> > wrote:
> > > I know about DROP TABLE.
> > > I have not knew when compatibility DROP TABLE
> and
> > > SELECT...
> > >
> > > DROP TABLE (select name from sqlite_master
> where...)
> > >
"Jay Sprenkle" <[EMAIL PROTECTED]> wrote:
> On 2/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Igor is correct - you cannot do that now. But I have sometimes
> > wondered if it would be nice to add an exec() function to SQLite
> > that would recursively invoke its argument as an
On 2/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Igor is correct - you cannot do that now. But I have sometimes
wondered if it would be nice to add an exec() function to SQLite
that would recursively invoke its argument as an SQL script.
For example:
SELECT exec('DELETE FROM ' ||
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> Artem Yankovskiy
> wrote:
> > I know about DROP TABLE.
> > I have not knew when compatibility DROP TABLE and
> > SELECT...
> >
> > DROP TABLE (select name from sqlite_master where...)
> > did not work.
> > Can I build resembling query?
>
> No. You
Hello.
I like delete some of table.
For example:
I can run query:
select name from sqlite_master where name like
'prefix_%';
Can I delete found tables?
Using only sql.
It's real?
Best regards,
Artem Yankovskiy
Hi all,
I guess this isn't really all that complex, but I just can't think of
a query that does what I need.
Here's an example table:
CREATE TABLE t1 (fname TEXT, vers TEXT, chng INT, UNIQUE(fname,vers));
INSERT INTO t1 VALUES('file1', '1', 0);
INSERT INTO t1 VALUES('file1', '2', 1);
INSERT INTO
21 matches
Mail list logo