MySQL Forums
Forum List  »  German

Funktion von MSSQL zu MYSQL
Posted by: a s
Date: September 25, 2014 02:30AM

Hallo,

kann mir jemand bei dem umsetzen der Syntax von MSSQL zu MYSQL helfen?


Anbei die Funktion in MSSQL Syntax:



if OBJECT_ID('concat_serial') is not null drop function concat_serial
go
create function concat_serial( @id int) returns varchar(100)
begin
declare @serialliste varchar(100)=''

select @serialliste = @serialliste +','+serial
from monitore
where id = @id

set @serialliste = STUFF(@serialliste ,1,1,'')
return @serialliste
end
go

der Select sieht dann so aus:


select distinct
ID,
dbo.concat_serial(ID)
from monitore




Viele Grüße

Options: ReplyQuote


Subject
Views
Written By
Posted
Funktion von MSSQL zu MYSQL
1239
a s
September 25, 2014 02:30AM
772
a s
September 25, 2014 02:33AM


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.