OTECTED]
Sent: 31 August 2007 08:54 AM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] How to generate Unique ID?
Assume I have a table
Create table T1 (id INTEGER PRIMARY KEY not null, puid UNIQUE
INTEGER not null, format INTEGER not null);
Now some values given below
Id puid
On Fri, 31 Aug 2007 12:28:49 +0530, "B V, Phanisekhar" <[EMAIL PROTECTED]>
wrote:
> Hi Gerhard,
>
> I am finding your code really tough to understand. Can you
> please provide some comments?
try:
from pysqlite2 import dbapi2 as sqlite
except ImportError:
import sqlite3
to generate Unique ID?
On Thu, 30 Aug 2007 13:06:38 +0100, "Simon Davies"
<[EMAIL PROTECTED]> wrote:
> On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
>> Simon,
>>Yeah you can term the problem like that. Can't I use the
>> function
reaching the max value 9000; I don't have a method to generate
puid that have been deleted.
Regards,
Phani
-Original Message-
From: John Stanton [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 9:00 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to generate
On Thu, 30 Aug 2007 13:06:38 +0100, "Simon Davies" <[EMAIL PROTECTED]> wrote:
> On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
>> Simon,
>>Yeah you can term the problem like that. Can't I use the
>> function which is assigning a unique id for INTEGER PRIMARY KEY column
I just need the answer for my original question.
Regards,
Phanisekhar
Maybe you "need" an answer, but others do not "need" to give it to you.
If you want others to do your thinking and reading for you, don't
demand, ask politely.
Why do you have a unique primary key as an integer to hold your other
unique integer? Why not just use the unique integer as a primary key?
If you want to have a limit on the maximum unique ID you can store your
next to allocate and next to replace keys in another table.
B V, Phanisekhar
Hi Phani,
On Thu, 30 Aug 2007 16:51:27 +0530, you wrote:
>Simon,
> Yeah you can term the problem like that. Can't I use the
>function which is assigning a unique id for INTEGER PRIMARY KEY column
>inside sql? If yes, how to use it?
>
>Regards,
>Phani
SQLite will do the job for you, it's
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>Yeah you can term the problem like that. Can't I use the
> function which is assigning a unique id for INTEGER PRIMARY KEY column
> inside sql? If yes, how to use it?
>
> Regards,
> Phani
>
Phani,
With the whole of the
, 2007 4:35 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to generate Unique ID?
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>
> > Without knowing your design, it looks like you wish to be able to
> > determine type from the id. This is cre
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Simon,
>
> > Without knowing your design, it looks like you wish to be able to
> > determine type from the id. This is creating a problem. Can you not
> > store the type separately from the id?
>
> Why is this creating a problem?
> No
he answer for my original question.
Regards,
Phanisekhar
-Original Message-
From: Simon Davies [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 4:13 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to generate Unique ID?
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTE
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote:
> Hi Simon,
>The problem is I have rowid which is the PRIMARY Key, and
> another column puid which should be unique. Now when I do vacuum rowid
> changes, but puid doesn't change and I don't want puid to change. Now it
> is
-Original Message-
From: Simon Davies [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 3:21 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to generate Unique ID?
Hi Phani,
What is the point of generating a unique integer separate from the
(unique) integer primary key
ge-
> From: B V, Phanisekhar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 30, 2007 2:11 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] How to generate Unique ID?
>
> Assume I have a table:
>
> Create table YYY (id Interger PRIMARY KEY, puid Unique integer)
&
of
deleted rows.
Regards,
Phani
-Original Message-
From: Sreedhar.a [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 2:22 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] How to generate Unique ID?
Phani,
Read the "auto increment" in Sqlite FAQ s it is the first one i
rg
Subject: [sqlite] How to generate Unique ID?
Assume I have a table:
Create table YYY (id Interger PRIMARY KEY, puid Unique integer)
Id is the primary key.
Puid is an unsque interger, whose values needs to be assigned by the user.
Currently my approach is get the maximum value of puid stored in
Assume I have a table:
Create table YYY (id Interger PRIMARY KEY, puid Unique integer)
Id is the primary key.
Puid is an unsque interger, whose values needs to be assigned by the
user.
Currently my approach is get the maximum value of puid stored in the
table; add 1 to it and uses this
18 matches
Mail list logo