In attached sheet the structure of my Table1.
I need with a Sql (VB6 and ADO) to remove duplicate based PROGRESS.
How to?
Note:
in old the actually data in new wath i need.
remove duplicate
-
- PlatinumLounger
- Posts: 4370
- Joined: 26 Apr 2010, 17:36
remove duplicate
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4370
- Joined: 26 Apr 2010, 17:36
Re: remove duplicate
If is necessary yes, sure!HansV wrote:Would it be OK to create a new table?
note:
original Table is named SERVIZIO
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: remove duplicate
Try
SELECT Max(SERVIZIO.DATA_MAIL) AS DATA_MAIL, SERVIZIO.PROGRESS, Max(SERVIZIO.DRICEZ) AS DRICEZ, Max(SERVIZIO.HRICEZ) AS HRICEZ, Max(SERVIZIO.OI) AS OI, Max(SERVIZIO.NOM) AS NOM, Max(SERVIZIO.SOLL) AS SOLL, Max(SERVIZIO.N) AS N, Max(SERVIZIO.CASO) AS CASO INTO SERVIZIO2 FROM SERVIZIO GROUP BY SERVIZIO.PROGRESS
This will create a new table named SERVIZIO2.
SELECT Max(SERVIZIO.DATA_MAIL) AS DATA_MAIL, SERVIZIO.PROGRESS, Max(SERVIZIO.DRICEZ) AS DRICEZ, Max(SERVIZIO.HRICEZ) AS HRICEZ, Max(SERVIZIO.OI) AS OI, Max(SERVIZIO.NOM) AS NOM, Max(SERVIZIO.SOLL) AS SOLL, Max(SERVIZIO.N) AS N, Max(SERVIZIO.CASO) AS CASO INTO SERVIZIO2 FROM SERVIZIO GROUP BY SERVIZIO.PROGRESS
This will create a new table named SERVIZIO2.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4370
- Joined: 26 Apr 2010, 17:36
Re: remove duplicate
sorry for delay, work perfect!HansV wrote:Try
SELECT Max(SERVIZIO.DATA_MAIL) AS DATA_MAIL, SERVIZIO.PROGRESS, Max(SERVIZIO.DRICEZ) AS DRICEZ, Max(SERVIZIO.HRICEZ) AS HRICEZ, Max(SERVIZIO.OI) AS OI, Max(SERVIZIO.NOM) AS NOM, Max(SERVIZIO.SOLL) AS SOLL, Max(SERVIZIO.N) AS N, Max(SERVIZIO.CASO) AS CASO INTO SERVIZIO2 FROM SERVIZIO GROUP BY SERVIZIO.PROGRESS
This will create a new table named SERVIZIO2.
note:
but wathch wath i see in body of email(for admin of longue)...(&#)
SELECT Max(SERVIZIO.DATA_MAIL) AS DATA_MAIL, SERVIZIO.PROGRESS, Max(SERVIZIO.DRICEZ) AS DRICEZ, Max(SERVIZIO.HRICEZ) AS HRICEZ, Max(SERVIZIO.OI) AS OI, Max(SERVIZIO.NOM) AS NOM, Max(SERVIZIO.SOLL) AS SOLL, Max(SERVIZIO.N) AS N, Max(SERVIZIO.CASO) AS CASO INTO SERVIZIO2 FROM SERVIZIO GROUP BY SERVIZIO.PROGRESS
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: remove duplicate
The email apparently converts the parentheses ( and ) to character codes. I don't think we can avoid that. So it's always best to visit the forum when you receive an e-mail notification.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4370
- Joined: 26 Apr 2010, 17:36
Re: remove duplicate
OK!HansV wrote:The email apparently converts the parentheses ( and ) to character codes. I don't think we can avoid that. So it's always best to visit the forum when you receive an e-mail notification.