Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | MsandlanaStarting Member
 
 
                                        33 Posts | 
                                            
                                            |  Posted - 2008-06-26 : 04:59:59 
 |  
                                            | Hi everyone I don't know if I'm going out of the line, my problen is that I have a store procedure to search store in SQL 2005 and I want to do the procedure in oracle which I have a little knowledge of oracleALTER Procedure [dbo].[SearchStore]--'pharmacy',18(		@varSearch				varchar(100),	@intProvinceId			int)AsDeclare @varSelectSql  varchar(1000)Declare @varSql		   varchar(3000)Begin	Set @varSelectSql= 'Select * from vwStore Where 1 = 1'	Set @varSql = ''If (@intProvinceId <> 0)Begin	Set @varSelectSql = @varSelectSql + ' And ProvinceId = '+ cast(@intProvinceId as varchar(10))EndIf (@varSearch <> '')Begin	Set @varSelectSql = @varSelectSql + ' And (Store Like ''%'		+ cast(@varSearch as varchar(50))+'%''' 	Set @varSelectSql = @varSelectSql + ' Or AddressLine1 Like ''%' + cast(@varSearch as varchar(50))+'%''' 	Set @varSelectSql = @varSelectSql + ' Or City like  ''%'		+ cast(@varSearch as varchar(50))+'%'''	Set @varSelectSql = @varSelectSql + ' or StoreType like  ''%'	+ cast(@varSearch as varchar(50))+'%'''+')'EndSet @varSql = @varSelectSql--Exec(@varSql)Print(@varSql)End |  |  
                                    | madhivananPremature Yak Congratulator
 
 
                                    22864 Posts | 
                                        
                                          |  Posted - 2008-06-26 : 09:39:21 
 |  
                                          | If you want to convert this to ORACLE code, post at Oracle forums such as www.orafaq.comMadhivananFailing to plan is Planning to fail |  
                                          |  |  |  
                                    | khtanIn (Som, Ni, Yak)
 
 
                                    17689 Posts | 
                                        
                                          |  Posted - 2008-06-26 : 10:12:40 
 |  
                                          | quote:You are not the only one herewhich I have a little knowledge of oracle
 
  KH[spoiler]Time is always against us[/spoiler]
 |  
                                          |  |  |  
                                |  |  |  |