Re: Queries Help

2003-01-30 Thread oraora oraora
Hi Ranganath, the query for ur first question is update testtab t1 set t1.code = ( select t2.type from testtab t2 where t1.rowid = t2.rowid ) , t1.type= ( select t2.code from testtab t2 where t1.rowid = t2.rowid ) ...will let u know if i can get a query for ur second question. Regards, Prem

RE: Queries Help - Solved

2003-01-30 Thread Krishnaswamy, Ranganath
Message- From: Krishnaswamy, Ranganath Sent: Thursday, January 30, 2003 10:39 AM To: Multiple recipients of list ORACLE-L Subject: Queries Help Hi List, I need the queries for the following requirements. Can anybody help me please? 1. A table has two columns Code and Type

RE: Queries Help

2003-01-30 Thread Naveen Nahata
Simpler SQL select * from testab; CODE TYPE -- -- 5 1 6 2 SQL UPDATE testab SET code = type, type = code; 2 rows updated. SQL select * from testab; CODE TYPE -- -- 1 5 2

RE: Queries Help

2003-01-30 Thread Naveen Nahata
Solution to second query: SQL SELECT * FROM emp; EMPID MGRID SALARY NAME -- -- -- -- 1 1000 A 2 1500 B 3 1 1500 C SQL SELECT * 2 FROM emp e1 3 WHERE mgrid IS NOT NULL

Queries Help

2003-01-29 Thread Krishnaswamy, Ranganath
Hi List, I need the queries for the following requirements. Can anybody help me please? 1. A table has two columns Code and Type. Form a query to swap the values of these columns. 2. A table contains empid, salary, mgr_id. Form a query to select the employees who have the salary more than