Igor Tandetnik wrote:
>
> flakpit <[EMAIL PROTECTED]> wrote:
>> Is there a way of querying the database to list all duplicate entries
>> from a column in the same table?
>>
>> Something like "SELECT * FROM mytable WHERE last NOT UNIQUE"
>
> select * from mytable t1 where exists (
> select
I would like to clarify on this locking. So if I have one connection and
mulitiple statements then there is no locks in this cases regardless what are
the statement operations.
Thanks,
JP
- Original Message
From: Alex Katebi <[EMAIL PROTECTED]>
To: General Discussion of SQLite
select * from mytable
where last in (
select last from mytable group by last_name having count(*) > 1
)
Probably slow on a big table.
-Clark
- Original Message
From: flakpit <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Monday, April 28, 2008 8:33:36 AM
Subject: [sqlite]
Hello Igor,
sorry, i was too fast. The following does it:
create table mytable (a string, b string);
insert into mytable (a,b) values ('Joe', 'Smith');
insert into mytable (a,b) values ('Ann', 'Smith');
insert into mytable (a,b) values ('Fred', 'Miller');
select * from mytable where b in
(
flakpit wrote:
> Is there a way of querying the database to list all duplicate entries from a
> column in the same table?
>
> Something like "SELECT * FROM mytable WHERE last NOT UNIQUE"
>
> fred, johnson
> roger, johnson
>
>
An unoptimised 'off the top of my head' solution would be:
select *
flakpit <[EMAIL PROTECTED]> wrote:
> Is there a way of querying the database to list all duplicate entries
> from a column in the same table?
>
> Something like "SELECT * FROM mytable WHERE last NOT UNIQUE"
select * from mytable t1 where exists (
select * from mytable t2 where t1.last=t2.last
Hi,
let the table have two columns, "a" and "b". Then
select a, count(b)
from yourtable
group by a
having count(b) > 1
returns 'fred' and 'roger'.
Martin
flakpit wrote:
> Is there a way of querying the database to list all duplicate entries from a
> column in the same table?
>
> Something
Does this mean that if I have one connection and multiple statements
operating on a in-memory table within a single thread no statement will lock
out another? In other words locks will not be used?
On Sat, Apr 26, 2008 at 7:40 PM, Joanne Pham <[EMAIL PROTECTED]> wrote:
> Hi,
> One
Is there a way of querying the database to list all duplicate entries from a
column in the same table?
Something like "SELECT * FROM mytable WHERE last NOT UNIQUE"
fred, johnson
roger, johnson
--
View this message in context:
Joanne Pham wrote:
> So one connection is used by two multiple statements concurrently one for
> insertion and one for selection. Is that ok.
>
Yes, that's fine.
HTH
Dennis Cote
___
sqlite-users mailing list
sqlite-users@sqlite.org
I'm using sqlite 3.5.4 in windows app, built by MS VC 2005. It is opening the
database in up to 21 threads. Some of my users are reporting the error where
select query sometimes fails in worker thread with SQLITE_NOMEM. (When they
execute command again, it works, it seems like random error). I
11 matches
Mail list logo