Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> pl/sql select statement

pl/sql select statement

From: <ddf777_at_my-deja.com>
Date: 2000/05/11
Message-ID: <8feo8t$c0m$1@nnrp1.deja.com>#1/1

Hi,

I am trying to do a select statement to retrieve a bunch of data. The query that I currently have looks like this.

SELECT MAX(eff_date), t.prod_id, trmn_id

	FROM trmn_price_notif t, price_order
	WHERE prod_price_change != 0
	AND prod_price_change IS NOT NULL
	AND trmn_id in ('1','3')
	AND price_order.prod_id = t.prod_id
	GROUP BY trmn_id, t.prod_id, sort_order
	ORDER BY trmn_id, sort_order;

I do not need to GROUP BY sort_order however to be able to but sort_order in the ORDER BY I needed to put it there. It doesn't hurt anything but it is not important either.

However, I need to select many more fields than these three. Does anyone know a good way to do this while keeping this a single select statement?

Thanks,
Kirsten

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu May 11 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US