Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
declare @rm_name varchar( 80 ) /* size to suit */
, @client_key int /* or whatever you need */
select @client_key = min( client_key )
from temp_table
while ( @client_key is not null ) begin
select @rm_name = min ( rm_name )
from rm_table
while ( @rm_name is not null ) begin
/* if not first name, put in a comma-blank */
update temp_table
set rm_names = rm_names + ', '
where client_key = @client_key
and datalength( rm_names ) > 0
/* add the current name to list */
update temp_table
set rm_names = rm_names + @rm_name
where client_key = @client_key
/* now get the next name
select @rm_name = min( rm_name )
from rm_names
where client_key = @client_key
and rm_name > @rm_name
end /* while got a value in @rm_name
/* get the next client key */
select @client_key = min( client_key )
from temp_table
where client_key > @client_key
end /* while got a value in @client_key