Hi,
I create a script to pick up those records with duplication of IMIPROPSERVNO field, see below test1.sql, which is working....
test1.sql
1.SELECT IMIPROPSERVNO, COUNT(*)
2.FROM INSTALL_MASTER#IMIPROPSERN
3: GROUP BY IMIPROPSERVNO
4: HAVING COUNT(*) > 1;
Now, I want a list of records in INSTALL_MASTER#IMIPROPSERN where the count > 1, ie those records with duplicated IMIPROPSERVNO.
I tried the following but did not work...how I can I fix the following ?
1: SELECT IMKEY, IMIPROPSERVNO INTO dup_propservno
2: FROM INSTALL_MASTER#IMIPROPSERN
3: GROUP BY IMIPROPSERVNO
4: HAVING COUNT(*) > 1;
When run,
SQL> @IMIPROPSERVNO.sql
SELECT IMKEY, IMIPROPSERVNO INTO dup_propservno
*
ERROR at line 1:
ORA-00905: missing keyword
p/s how can i include the count(*) into the select file?ie
(SELECT IMKEY, IMIPROPSERVNO, COUNT INTO dup_propservno)
Thanks
Pek