ChristianRiba
Neuer Benutzer
- Beiträge
- 1
Hallo liebe Nutzer von Datenbank Forum.com
Ich habe da ein kleines Problem! desshalb bin ich euerm Forum beigetreten damit ihr mir evtl. dabei Helfen könnt.
Folgende Situation:
Ich besitze in meiner Datenbank mehrere Tabellen. diese wähle ich nun über eine Select Anweisung aus und lese die Daten. Diese werden dann in Outlook im Kontakte Ordner als neue Kontakte gespeichert. Wenn ich jetzt was ändere, Dann bräuchte ich noch die "Update" funktion damit die geänderten Daten zurück geschrieben werden können. Oder liege ich da Falsch ??????
Ich setze als Anlage noch meine Select Anweisung hinten mit dran.
SELECT
dbo.DOSSIERSET.ROWID,
dbo.DOSSIERSET.PROJECTNO,
dbo.DOSSIERSET.CREATIONDATE,
dbo.ADDRESS.SALUTATION,
dbo.ADDRESS.NAME1,
dbo.ADDRESS.STREETPOBOX,
dbo.ADDRESS.POSTCODE,
dbo.ADDRESS.CITY,
dbo.CONTACT.TELEPHONENO,
dbo.CONTACT.MOBILETEL,
dbo.CONTACT.EMAIL,
dbo.CONTACT.FAXNO,
dbo.DOSSIERSET.PERSONNO,
dbo.DOSSIERSET.PERSONID,
dbo.CUSTOMER.NOTE,
dbo.DOSSIERSET.PROJECTDESCRIPTION,
dbo.DOSSIERSET.MODIFICATIONDATE,
dbo.DOSSIERSET.ORIGINATOREMPLOYEECODE,
dbo.DOSSIERSET$AVANTIM.NOTES,
dbo.ADDRESS.COUNTRY,
dbo.CONTACT.DEPARTMENT,
dbo.CONTACT.BIRTHDATE,
dbo.CONTACT.NAME,
dbo.CUSTOMER.INTERNALNUMBER,
dbo.ADDRESS.NAME2
FROM dbo.DOSSIERSET
INNER JOIN
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND
dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND
dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO
INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
WHERE (dbo.ADDRESS.PERSONID = 'k')
Wie müsste dazu die Update heißen?
Ich habe das schon mal probiert, aber bekomme da einen Fehler gemeldet, Falsche Syntax in der nähe des INNER Schlüsselswortes.
Update
dbo.DOSSIERSET INNER JOIN
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
set
dbo.DOSSIERSET.PROJECTNO = @PROJECTNO@,
dbo.DOSSIERSET.CREATIONDATE = @CREATIONDATE@,
dbo.ADDRESS.SALUTATION = @SALUTATION@,
dbo.ADDRESS.NAME1 = @NAME1@,
dbo.ADDRESS.STREETPOBOX = @STREETPOBOX@,
dbo.ADDRESS.POSTCODE = @POSTCODE@,
dbo.ADDRESS.CITY = @CITY@,
dbo.CONTACT.TELEPHONENO = @TELEPHONENO@,
dbo.CONTACT.MOBILETEL = @MOBILETEL@,
dbo.CONTACT.EMAIL = @EMAIL@,
dbo.CONTACT.FAXNO = @FAXNO@,
dbo.CUSTOMER.NOTE = @NOTE@,
dbo.DOSSIERSET.PROJECTDESCRIPTION = @PROJECTDESCRIPTION@,
dbo.DOSSIERSET$AVANTIM.NOTES = @NOTES@,
dbo.ADDRESS.COUNTRY = @COUNTRY@,
dbo.CONTACT.DEPARTMENT = @DEPARTMENT@,
dbo.CONTACT.BIRTHDATE = @BIRTHDATE@,
dbo.CUSTOMER.INTERNALNUMBER = @INTERNALNUMBER@,
PK steht für den Primärschlüssel
Where ROWID = @PK@ and
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO
INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
Vielen Dank euch! Ich hoffe mir kann hier geholfen werden.
mfg Chriss
Ich habe da ein kleines Problem! desshalb bin ich euerm Forum beigetreten damit ihr mir evtl. dabei Helfen könnt.
Folgende Situation:
Ich besitze in meiner Datenbank mehrere Tabellen. diese wähle ich nun über eine Select Anweisung aus und lese die Daten. Diese werden dann in Outlook im Kontakte Ordner als neue Kontakte gespeichert. Wenn ich jetzt was ändere, Dann bräuchte ich noch die "Update" funktion damit die geänderten Daten zurück geschrieben werden können. Oder liege ich da Falsch ??????
Ich setze als Anlage noch meine Select Anweisung hinten mit dran.
SELECT
dbo.DOSSIERSET.ROWID,
dbo.DOSSIERSET.PROJECTNO,
dbo.DOSSIERSET.CREATIONDATE,
dbo.ADDRESS.SALUTATION,
dbo.ADDRESS.NAME1,
dbo.ADDRESS.STREETPOBOX,
dbo.ADDRESS.POSTCODE,
dbo.ADDRESS.CITY,
dbo.CONTACT.TELEPHONENO,
dbo.CONTACT.MOBILETEL,
dbo.CONTACT.EMAIL,
dbo.CONTACT.FAXNO,
dbo.DOSSIERSET.PERSONNO,
dbo.DOSSIERSET.PERSONID,
dbo.CUSTOMER.NOTE,
dbo.DOSSIERSET.PROJECTDESCRIPTION,
dbo.DOSSIERSET.MODIFICATIONDATE,
dbo.DOSSIERSET.ORIGINATOREMPLOYEECODE,
dbo.DOSSIERSET$AVANTIM.NOTES,
dbo.ADDRESS.COUNTRY,
dbo.CONTACT.DEPARTMENT,
dbo.CONTACT.BIRTHDATE,
dbo.CONTACT.NAME,
dbo.CUSTOMER.INTERNALNUMBER,
dbo.ADDRESS.NAME2
FROM dbo.DOSSIERSET
INNER JOIN
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND
dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND
dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO
INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
WHERE (dbo.ADDRESS.PERSONID = 'k')
Wie müsste dazu die Update heißen?
Ich habe das schon mal probiert, aber bekomme da einen Fehler gemeldet, Falsche Syntax in der nähe des INNER Schlüsselswortes.
Update
dbo.DOSSIERSET INNER JOIN
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
set
dbo.DOSSIERSET.PROJECTNO = @PROJECTNO@,
dbo.DOSSIERSET.CREATIONDATE = @CREATIONDATE@,
dbo.ADDRESS.SALUTATION = @SALUTATION@,
dbo.ADDRESS.NAME1 = @NAME1@,
dbo.ADDRESS.STREETPOBOX = @STREETPOBOX@,
dbo.ADDRESS.POSTCODE = @POSTCODE@,
dbo.ADDRESS.CITY = @CITY@,
dbo.CONTACT.TELEPHONENO = @TELEPHONENO@,
dbo.CONTACT.MOBILETEL = @MOBILETEL@,
dbo.CONTACT.EMAIL = @EMAIL@,
dbo.CONTACT.FAXNO = @FAXNO@,
dbo.CUSTOMER.NOTE = @NOTE@,
dbo.DOSSIERSET.PROJECTDESCRIPTION = @PROJECTDESCRIPTION@,
dbo.DOSSIERSET$AVANTIM.NOTES = @NOTES@,
dbo.ADDRESS.COUNTRY = @COUNTRY@,
dbo.CONTACT.DEPARTMENT = @DEPARTMENT@,
dbo.CONTACT.BIRTHDATE = @BIRTHDATE@,
dbo.CUSTOMER.INTERNALNUMBER = @INTERNALNUMBER@,
PK steht für den Primärschlüssel
Where ROWID = @PK@ and
dbo.ADDRESS ON dbo.DOSSIERSET.PERSONNO = dbo.ADDRESS.PERSONNO AND dbo.DOSSIERSET.PERSONID = dbo.ADDRESS.PERSONID
INNER JOIN
dbo.CONTACT ON dbo.ADDRESS.PERSONNO = dbo.CONTACT.PERSONNO AND dbo.ADDRESS.PERSONID = dbo.CONTACT.PERSONID
INNER JOIN
dbo.CUSTOMER ON dbo.DOSSIERSET.PERSONNO = dbo.CUSTOMER.PERSONNO
INNER JOIN
dbo.DOSSIERSET$AVANTIM ON dbo.DOSSIERSET.PROJECTNO = dbo.DOSSIERSET$AVANTIM.PROJECTNO
Vielen Dank euch! Ich hoffe mir kann hier geholfen werden.
mfg Chriss