MySQL Forums
Forum List  »  MySQL Query Browser

distinct to exclude fields from same table?
Posted by: mkseidl
Date: August 17, 2005 10:17AM

strSQL = "SELECT DISTINCT t.Object_Nummer, t.Kundennum, t.PLZ, t.Ort, " & _
"t.Strasse, t.Hausnummer, t.Nachname, t.Vorname, " & _
"t.Vertragsart, t.Versorgung, t.aktive_WE, t.max_WE, " & _
"t.letzter_Wechse, t.Kuendigungsgr, t.Telefonie, t.FSA, " & _
"t.HSI, t.uep_zustand, t.Agentur, " & _
"FROM [Kopie von Objekt_Daten_Steger] AS t "

Here is my query. but the problem is, i need to exclude the first 2 columns Object_Nummer and Kundennum.

What more specific...

I need all these fields to be displayed... But, I need to take out redundant hausnummer(s) house numbers in english.

Some of these places are apartment buildings, and get listed 20-30+ times, but the object number and customer number will always be different.

All the data is in one table. I dont know enough about it to change it to a faster, smaller database, something I would have done had the time alotted been longer then a week. :(

Thanks for your help,


Edited 1 time(s). Last edit at 08/17/2005 10:18AM by mkseidl.

Options: ReplyQuote

Written By
distinct to exclude fields from same table?
August 17, 2005 10:17AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.