I can insert all rows of existing table into new table having same columns
using query :
Insert into NEWTABLE select * from OLDTABLE
But I want all rows of NEWTABLE sorted by field No,
So I used query
Insert into NEWTABLE select * from OLDTABLE order by no desc
But it is not giving me
you misinterpreted my problem,
I want to add all rows of old table into new table but with sorted order
I don't want to fire another query (select * from newtable order by desc no
) to give sorted rows, I want to insert all rows in sorted order into new
table.
-Original Message-
From:
You can't do that.
The 'Insert' may (I'm not sure..) insert the data into 'NEWTABLE' in the
you misinterpreted my problem,
I want to add all rows of old table into new table but with sorted order
I don't want to fire another query (select * from newtable order by desc no
) to give sorted
Stupid question, but how can i create an in-memory database with
SQLite.NET provider? When i use Data Source=:memory: i get an exception
that the specified file isn't found.
If you are using the ADOSQLiteDotNet provider from SourceForge, add New=True
to your connection string.
Stupid question, but how can i create an in-memory database with
SQLite.NET provider? When i use Data Source=:memory: i get an exception
that the specified file isn't found.
If you are using the ADOSQLiteDotNet provider from SourceForge, add
New=True
to your connection string.
To
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Peter Berkenbosch wrote:
Stupid question, but how can i create an in-memory database with
SQLite.NET provider? When i use Data Source=:memory: i get an exception
that the specified file isn't found.
Can anyone explain to me how it is done ?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brass Tilde wrote:
Stupid question, but how can i create an in-memory database with
SQLite.NET provider? When i use Data Source=:memory: i get an exception
that the specified file isn't found.
If you are using the ADOSQLiteDotNet provider from
On Thu, 2005-06-30 at 16:35 +0530, Ajay wrote:
So I used query
Insert into NEWTABLE select * from OLDTABLE order by no desc
But it is not giving me sorted output as new table?
Can you tell me where I am wrong ???
The ORDER BY clause on a SELECT used to insert into a table
has been
The solution is to always specify an order when you want to return data
in a particular order. SQL standard does not specify that rows come back
in a particular order unless you specify. Order is never assumed as to
enhance speed - especially for functions where order is irrelevant like
totaling
On Jun 30, 2005, at 7:21 AM, Ajay wrote:
Yaa that's what I wanted to do , So what do you think what could be the
solution for this ?
well, as others have suggested, there is no solution for it. Or, at
least no solution that you should bother with. The purpose of the
database is not to
Seems to be top of my head, Is there any simple and sweet solution ?
-Original Message-
From: Brad DerManouelian [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 30, 2005 6:36 PM
To: sqlite-users@sqlite.org; [EMAIL PROTECTED]
Subject: RE: [sqlite] Insert all rows from old table into
My apologies for being long-winded. Basically the answer is to not
insert in a particular order and do your order by when you recall the
data from NEWTABLE.
Insert the data:
Insert into NEWTABLE select * from OLDTABLE
Then to get the data back in the order you want:
select * from NEWTABLE order
Ok, it means that I can't do so !
-Original Message-
From: Brad DerManouelian [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 30, 2005 7:33 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Insert all rows from old table into new table but in
sorted order
My apologies for being
Some databases do actually allow you to maintain an insertion order.
They do this for performance reasons so that the high cost of sorting is
avoided - we have a few newspaper databases (30 million full text stories)
that have their primary key defined as the inverse story insertion date -
this
On Jun 30, 2005, at 9:47 AM, Steve O'Hara wrote:
Some databases do actually allow you to maintain an insertion order.
They do this for performance reasons so that the high cost of sorting
is
avoided - we have a few newspaper databases (30 million full text
stories)
that have their
At 12:52 30/06/2005, you wrote:
you misinterpreted my problem,
I want to add all rows of old table into new table but with sorted order
I don't want to fire another query (select * from newtable order by desc no
) to give sorted rows, I want to insert all rows in sorted order into new
table.
16 matches
Mail list logo