I have a table with an INSERT/UPDATE/DELETE statement trigger. The
trigger's action is to insert jobs into a queue noting that the
table has changed.
A number of other tables have FK relationships with this table, and
they have their own statement triggers that fire on DELETE.
When I delete a
I have a query that need to be sorted in order of
price of store's product with unique store number.
Here is a sample data of storeproduct
table:
ItemSku , StoreNumber, Price
==
10001 , 7 , 30.00
10001 , 7 , 35.00 -- duplicate store number
10001 , 5 , 45.00
In the following query
SELECT Parent FROM Channels ORDER BY Parent ASC;
If I have a couple of (NULL)s in the field [Parent], they will be listed at
the bottom of the query result.
Is it because PostgreSQL considers (NULL) as the biggest value? If I run the
same query under MSSQL Server 2000, I
On Tue, 26 Oct 2004, Wei Weng wrote:
In the following query
SELECT Parent FROM Channels ORDER BY Parent ASC;
If I have a couple of (NULL)s in the field [Parent], they will be listed at
the bottom of the query result.
Is it because PostgreSQL considers (NULL) as the biggest value? If I run
On Tue, Oct 26, 2004 at 01:48:48PM -0700, Stephan Szabo wrote:
On Tue, 26 Oct 2004, Wei Weng wrote:
In the following query
SELECT Parent FROM Channels ORDER BY Parent ASC;
If I have a couple of (NULL)s in the field [Parent], they will be listed at
the bottom of the query result.
Oliver ,sorry, I didn't submit all complete fields as my example,
The reason I didn't use agregate function because I still need to select
another fields from storeproduct table and some outer joins.
What about if the data in storeproduct table shows like this:
ItemSku , StoreNumber , Price,
On Tue, 2004-10-26 at 17:43 -0400, Tom Lane wrote:
Oliver Elphick [EMAIL PROTECTED] writes:
On Tue, 2004-10-26 at 14:23 -0500, Yudie wrote:
Then I do this query to get unique store number and also the cheapest
price from each store:
SQL= Select distinct on (storenumber), itemsku,
Oliver Elphick [EMAIL PROTECTED] writes:
On Tue, 2004-10-26 at 14:23 -0500, Yudie wrote:
Then I do this query to get unique store number and also the cheapest
price from each store:
SQL= Select distinct on (storenumber), itemsku, storenumber,price
from storeproduct where itemsku='10001'