Hi Gurus
I have following data in table emp
empcode empname SAL
a001 X 2000
b001 Y 4000
c001 A 5000
d001 C 8000
If sal is >=5000 there will be another columns grade and print A else B
The outout would be like
empcode empname SALGrade
a001
i have a query that returns 2 rows with one column being id and the other
being date-time stamp.
i want to select the row with the latest timestamp among those two
records.they have difference id values
SELECT ID,LastModDate
FROM Tab
ID LastModDate
-- ---
2 1/20/2003 2:
I have a table with records like this
CID S TO_CHAR(DATECREATED, MESSAGE PID
- - --
2 N 01-feb-1974 19:45:45 service change1*
3 N 01-feb-1974 19:45:45 service change
Title: RE: SQL QUERY HELP
> -Original Message-
> From: Seema Singh [mailto:[EMAIL PROTECTED]]
>
> I have following data in table emp
> empcode empname SAL
> a001 X 2000
> b001 Y 4000
> c001 A 5000
> d001 C
Try this.
select empcode, empname, sal,
decode(to_char(trunc((nvl(sal,0)+1)/5001)),'0','A','B') NewCol
from emp
/
- Original Message -
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, April 05, 2001 1:40 PM
> Hi Gurus
> I have following data in tabl
Add "group by ID;" as in:
SELECT ID,MAX(LastModDate) FROM Tab
group by ID;
> -Original Message-
> From: Basavaraja, Ravindra [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 28, 2003 8:15 PM
> To: Multiple recipients of list ORACLE-L
> Subject: SQL Query He
cc:
[EMAIL PROTECTED] Subject: SQ
5 PM
> To: Multiple recipients of list ORACLE-L
> Subject: SQL Query Help
>
>
> i have a query that returns 2 rows with one column being id
> and the other
> being date-time stamp.
>
> i want to select the row with the latest timestamp among those two
> reco
IL PROTECTED]
Sent by: cc:
[EMAIL PROTECTED] Subject: SQ
roup by ID;
-Original Message-
From: Basavaraja, Ravindra [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 8:15 PM
To: Multiple recipients of list ORACLE-L
Subject: SQL Query Help
i have a query that returns 2 rows with one column being id
and the other
being date-time stamp.
i want to sele
Sent by: Subject: Re: SQL Query Help
select from A)
where
and datecreated = (select min(datecreated)
from b where b.cid = a.cid and b.pid = a.pid)
At 08:14 PM 6/13/2003 -0800, you wrote:
I have a table with records like this
CID S TO_CHAR(DATECREATED, MESSAGE PID
- - ---
12 matches
Mail list logo