You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
401 B
Transact-SQL
16 lines
401 B
Transact-SQL
/*
|
|
DROP FUNCTION dbo.F_Str;
|
|
go
|
|
create function F_Str(@Contractno varchar(50))
|
|
returns nvarchar(100)
|
|
as
|
|
begin
|
|
declare @S nvarchar(100)
|
|
select @S=isnull(@S,'')+name+' ' from import_cargo where Contractno=@Contractno
|
|
return @S
|
|
end
|
|
go */
|
|
|
|
|
|
Select distinct Contractno,name=dbo.F_Str(Contractno) from import_cargo
|
|
go |