Seite 1 von 1

2 Felder zusammenfügen mit mysql

Verfasst: Sa, 25.06.2011 10:30
von Reginald
Hallo zusammen,

also diese Abfrage hier funktioniert

UPDATE staffs.staffs SET staffs.salutation = 'Dear ' oder
UPDATE staffs.staffs SET staffs.salutation = staffs.firstname

Aber das will ich - funktioniert aber nicht:

UPDATE staffs.staffs SET staffs.salutation = 'Dear ' & staffs.firstname
UPDATE staffs.staffs SET staffs.salutation = 'Dear ' + staffs.firstname
UPDATE staffs.staffs SET staffs.salutation = CONCAT ('Dear ', staffs.firstname)

Kann mir jemand helfen?

OOBase, mysql 5.1


Grüße
Reginald

Re: 2 Felder zusammenfügen mit mysql

Verfasst: Sa, 25.06.2011 11:11
von komma4
Reginald hat geschrieben:UPDATE staffs.staffs SET staffs.salutation = CONCAT ('Dear ', staffs.firstname)
Lass mal die domain weg,

Code: Alles auswählen

UPDATE staffs SET salutation = CONCAT ('Dear ', firstname)
Klappt hier (OOo 3.2.1, java connector, MySQL 5.1.46) - sowohl auf der Kommandozeile, als auch in OOo über Extras>SQL...