Re: [sqlite] Index keywords

2009-02-09 Thread Vance E. Neff
Thanks Puneet, Yes, it does seem to work. I just finished testing that. I'm determining the new index value for an autoincrement primary key to that I can refer to it via other tables. Vance P Kishor wrote: >On Mon, Feb 9, 2009 at 9:44 AM, Vance E. Neff wrote: > > >>Can I do the >> >>selec

Re: [sqlite] Index keywords

2009-02-09 Thread P Kishor
On Mon, Feb 9, 2009 at 9:44 AM, Vance E. Neff wrote: > Can I do the > > select last_insert_rowid(); > > to determine the new index value > After the COMMIT command? Yes, but I am not sure what you mean by the "new index value"... keep in mind, the last_insert_rowid() returns, well, the last inser

Re: [sqlite] Index keywords

2009-02-09 Thread Vance E. Neff
Can I do the select last_insert_rowid(); to determine the new index value After the COMMIT command? Vance Igor Tandetnik wrote: >Vance E. Neff wrote: > > >>Just to be straight, I would use the Query: >>SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX >> >> > >No, you would ju

Re: [sqlite] Index keywords

2009-01-30 Thread Igor Tandetnik
Vance E. Neff wrote: > Just to be straight, I would use the Query: > SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX No, you would just do select last_insert_rowid(); Or you could call sqlite3_last_insert_rowid() API directly. Last inserted ROWID is the property of a connection, not o

Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
Thank you Igor! Just to be straight, I would use the Query: SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX Vance Igor Tandetnik wrote: >"Vance E. Neff" wrote >in message news:4982fd7c.2090...@intouchmi.com > > >>When I INSERT a new row with INTEGER PRIMARY KEY AUTOINCREMENT >>speci

Re: [sqlite] Index keywords

2009-01-30 Thread Igor Tandetnik
"Vance E. Neff" wrote in message news:4982fd7c.2090...@intouchmi.com > When I INSERT a new row with INTEGER PRIMARY KEY AUTOINCREMENT > specified for the key column, how do I find out what the new value > for that column (the new key value) as that may be the only unique > column value in the tabl

Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
W Systems Engineer III, Tyco Electronics, 434.455.6453 > >-Original Message- >From: sqlite-users-boun...@sqlite.org >[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Daniel Watrous >Sent: Thursday, January 29, 2009 1:10 PM >To: General Discussion of SQLite Database >Subject

Re: [sqlite] Index keywords

2009-01-30 Thread Wilson, Ron P
om: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Daniel Watrous Sent: Thursday, January 29, 2009 1:10 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Index keywords oops, sorry, here's the link: http://www.sqlite.org/lang.html On Thu,

Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
ot;Vance E. Neff" >An: "General Discussion of SQLite Database" >Gesendet: Donnerstag, 29. Januar 2009 15.38 Uhr (GMT+0100) Europe/Berlin >Betreff: [sqlite] Index keywords > >Hi, > >I've searched and can not find where the keywords like PRIMARY, UNIQUE,

Re: [sqlite] Index keywords

2009-01-30 Thread Frank Juestel
+0100) Europe/Berlin Betreff: [sqlite] Index keywords Hi, I've searched and can not find where the keywords like PRIMARY, UNIQUE, etc. in the Documentation. Please point me to the correct section. Also, if I use autoincrement, how do I retrieve the new index value for use in other tables? A

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
It might help if you explained what you're trying to do. Are you new to SQL and want a good tutorial? On Thu, Jan 29, 2009 at 11:28 AM, Vance E. Neff wrote: > Thanks Daniel, > > Not really, I'm guessing I'll have to find documentation on SQL in order > to find detailed information on field and i

Re: [sqlite] Index keywords

2009-01-29 Thread Griggs, Donald
Hi Vance, Could you maybe give one or two examples on exactly what you need that you're not finding on the website? As far as syntax, it's pretty much all linked from: http://www.sqlite.org/lang.html E.g. for automatically incrementing primary key, see: http://www.sqlite.org/lang_createt

Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Thanks Daniel, Not really, I'm guessing I'll have to find documentation on SQL in order to find detailed information on field and index field descriptors or modifiers, such as INTEGER, PRIMARY, KEY, AUTOINCREMENT, etc. Any recommendations? Vance Daniel Watrous wrote: >oops, sorry, here's the

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
oops, sorry, here's the link: http://www.sqlite.org/lang.html On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous wrote: > Could this be what you're looking for? > > On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff wrote: >> I have seen that list of keywords, but I'm looking for a description of >>

Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
Could this be what you're looking for? On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff wrote: > I have seen that list of keywords, but I'm looking for a description of > what they mean. In particular those associated with index definitions. > > Vance > > D. Richard Hipp wrote: > >>On Jan 29, 200

Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
I have seen that list of keywords, but I'm looking for a description of what they mean. In particular those associated with index definitions. Vance D. Richard Hipp wrote: >On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote: > > > >>Hi, >> >>I've searched and can not find where the keywords li

Re: [sqlite] Index keywords

2009-01-29 Thread D. Richard Hipp
On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote: > Hi, > > I've searched and can not find where the keywords like PRIMARY, > UNIQUE, > etc. in the Documentation. Please point me to the correct section. > Also, if I use autoincrement, how do I retrieve the new index value > for > use in othe

[sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Hi, I've searched and can not find where the keywords like PRIMARY, UNIQUE, etc. in the Documentation. Please point me to the correct section. Also, if I use autoincrement, how do I retrieve the new index value for use in other tables? Again a doc. pointer would be good. Thanks! Vance __