Frage: habe eine Tabelle
mit folgenden Spalten
Setze mit Trigger after_submit die Variable subid
Die Felder DL 1 -4 haben nur 1 Wert, also DL1 = 'DL1' , DL2 = '', DL3 = '', DL4 = '', DLx = ''
oder
Die Felder DL 1 -4 haben nur 1 Wert, also DL1 = '' , DL2 = 'DL2', DL3 = '', DL4 = '', DLx = ''
oder
Die Felder DL 1 -4 haben nur 1 Wert, also DL1 = '' , DL2 = '', DL3 = '', DL4 = 'DL4', DLx = ''
usw.
Die Zielstellung war eine Variable zu setzen in Abhängigkeit der Inhalte
Code
- set @DLDetail = '';
- SET @DLDetail = 'eins' where (select count(*)from dl_anfrage where subid = @subid and DL1 != '') >'0';
- SET @DLdetail = 'zwei' where (select count(*)from dl_anfrage where subid = @subid and DL2 != '') > '0';
- SET @DLDetail = 'drei' where (select count(*)from dl_anfrage where subid = @subid and DL3 != '') > '0';
- usw.
- select @DLDetail ERROR
nächster Versuch:
was soll ich sagen ERROR,
Hat ein Wissender eine Lösung?