Walk the string

0

Please login or register to vote for this query.

(click on this box to dismiss)

Webmasters

Q&A for pro webmasters

declare @OISApplicationsId varchar(MAX)
set @OISApplicationsId = 'OISApiApp,OISWebApp'

declare @OISApplicationsName varchar(MAX)
set @OISApplicationsName = 'OIS API Template,OIS WEB Template'

declare @OISApplicationsDescriptions varchar(MAX)
set @OISApplicationsDescriptions = 'API Application for OIS Framework,WEB Application for OIS Framework'

declare @OISApplicationsType varchar(MAX)
set @OISApplicationsType = 'WEBAPI,WEBAPP'
							
declare @OISApplicationsUser varchar(MAX)
set @OISApplicationsUser = 'sagheer,sagheer'
							
declare @OISApplicationsUrl varchar(MAX)
set @OISApplicationsUrl = 'http://localhost:1856/,http://localhost:28300/'
							



while len(@OISApplicationsId) > 0
begin
                print left(@OISApplicationsId, charindex(',', @OISApplicationsId+',')-1) 
				print left(@OISApplicationsName, charindex(',', @OISApplicationsName+',')-1)
				print left(@OISApplicationsDescriptions, charindex(',', @OISApplicationsDescriptions+',')-1)
				print left(@OISApplicationsType, charindex(',', @OISApplicationsType+',')-1)
				print left(@OISApplicationsUrl, charindex(',', @OISApplicationsUrl+',')-1)
				print left(@OISApplicationsUser, charindex(',', @OISApplicationsUser+',')-1)

				
	set @OISApplicationsId = stuff(@OISApplicationsId, 1, charindex(',', @OISApplicationsId+','), '')
	set @OISApplicationsName = stuff(@OISApplicationsName, 1, charindex(',', @OISApplicationsName+','), '')
	set @OISApplicationsDescriptions = stuff(@OISApplicationsDescriptions, 1, charindex(',', @OISApplicationsDescriptions+','), '')
	set @OISApplicationsType = stuff(@OISApplicationsType, 1, charindex(',', @OISApplicationsType+','), '')
	set @OISApplicationsUrl = stuff(@OISApplicationsUrl, 1, charindex(',', @OISApplicationsUrl+','), '')
	set @OISApplicationsUser = stuff(@OISApplicationsUser, 1, charindex(',', @OISApplicationsUser+','), '')
				
end

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results