1 Reply Latest reply: Dec 23, 2012 4:53 AM by Moazam Shareef RSS

    Like Query

    Moazam Shareef
      Guyz What wrong with my query?

      Im using form 6i database 9i
      IF :CTRL.DIS_SRCH IS NULL THEN
           ALERT_MESSAGES('Enter some words to search database');
      ELSE
           SET_BLOCK_PROPERTY('COR_ITEM_DESCP', DEFAULT_WHERE, UPPER('ITEM_DESCP')LIKE UPPER('%'||:CTRL.DIS_SRCH||'%''');
           GO_BLOCK('COR_ITEM_DESCP');
           EXECUTE_QUERY;
           END IF;
      As my query working fine below.
      AMC>SELECT ITEM_ID,CATEGORY,ITEM_DESCP FROM COR_ITEM_DESCP WHERE upper(ITEM_DESCP) LIKE upper('%&ITEM_NAME%')
        2  /
      Enter value for item_name: CA
      old   1: SELECT ITEM_ID,CATEGORY,ITEM_DESCP FROM COR_ITEM_DESCP WHERE upper(ITEM_DESCP) LIKE upper('%&ITEM_NAME%')
      new   1: SELECT ITEM_ID,CATEGORY,ITEM_DESCP FROM COR_ITEM_DESCP WHERE upper(ITEM_DESCP) LIKE upper('%CA%')
      
        ITEM_ID CATEGORY                                                                                  
      --------- --------------------                                                                      
      ITEM_DESCP                                                                                          
      ----------------------------------------------------------------------------------------------------
        1010124 BANDAGES                                                                                  
      UNICAST COTTON 5 CM                                                                                 
                                                                                                          
        1010125 BANDAGES                                                                                  
      UNICAST COTTON 10 CM 3X4                                                                            
                                                                                                          
        1010126 BANDAGES                                                                                  
      CASTING TAPE (FIBER GLASS) 3 INCH                                                                   
                                                                                                          
        1010127 BANDAGES                                                                                  
      CASTING TAPE (FIBER GLASS) 4 INCH 4X4                                                               
                                                                                                          
        1010139 GLOVES                                                                                    
      SURGICAL GLOVES 7 CM                                                                                
                                                                                                          
        1010140 GLOVES                                                                                    
      SURGICAL GLOVES 7.5 CM                                                                              
                                                                                                          
        1010141 GLOVES                                                                                    
      
        ITEM_ID CATEGORY                                                                                  
      --------- --------------------                                                                      
      ITEM_DESCP                                                                                          
      ----------------------------------------------------------------------------------------------------
      SURGICAL GLOVES 8 CM                                                                                
                                                                                                          
        1010156 SYRINGES                                                                                  
      SCALP VEIN SET 22G                                                                                  
                                                                                                          
        1010157 SYRINGES                                                                                  
      SCALP VIEN SET 24G                                                                                  
                                                                                                          
        1010158 SYRINGES                                                                                  
      I.V CANNULA 22G                                                                                     
                                                                                                          
        1010159 SYRINGES                                                                                  
      I.V CANNULA 24G                                                                                     
                                                                                                          
        1010165                                                                                           
      THERMOSCAN COVER                                                                                    
                                                                                                          
        1010168                                                                                           
      SURGICAL BLADE 11                                                                                   
      
        ITEM_ID CATEGORY                                                                                  
      --------- --------------------                                                                      
      ITEM_DESCP                                                                                          
      ----------------------------------------------------------------------------------------------------
                                                                                                          
        1010169                                                                                           
      SUGRICAL BLADE 15                                                                                   
                                                                                                          
        1010176                                                                                           
      SUFUNE CATGUT - 2/0                                                                                 
                                                                                                          
        1010177                                                                                           
      SUFUNE CATGUT - 3/0                                                                                 
                                                                                                          
        1010193                                                                                           
      FOLEY CATHETER 12                                                                                   
                                                                                                          
        1010194                                                                                           
      FOLEY CATHETER 14                                                                                   
                                                                                                          
        1010195                                                                                           
      FOLEY CATHETER 16                                                                                   
                                                                                                          
      
        ITEM_ID CATEGORY                                                                                  
      --------- --------------------                                                                      
      ITEM_DESCP                                                                                          
      ----------------------------------------------------------------------------------------------------
        1010196                                                                                           
      FOLEY CATHETER 18                                                                                   
                                                                                                          
        1010197                                                                                           
      FOLEY CATHETER 20                                                                                   
                                                                                                          
        1010200                                                                                           
      SUCTON CATHETOR 10                                                                                  
                                                                                                          
        1010201                                                                                           
      SUCTON CATHETOR 12                                                                                  
                                                                                                          
        1010202                                                                                           
      SUCTON CATHETOR 14                                                                                  
                                                                                                          
        1010207 PRINTING STUFF                                                                            
      PATIENT CARD                                                                                        
                                                                                                          
        1010209 PRINTING STUFF                                                                            
      
        ITEM_ID CATEGORY                                                                                  
      --------- --------------------                                                                      
      ITEM_DESCP                                                                                          
      ----------------------------------------------------------------------------------------------------
      PRESCRIPTION CASH                                                                                   
                                                                                                          
        1010224 PRINTING STUFF                                                                            
      MEIDCAL REPORT BOOKS                                                                                
                                                                                                          
        1010237 PRINTING STUFF                                                                            
      CASH PAYMENT VOUCHER                                                                                
                                                                                                          
        1010238 PRINTING STUFF                                                                            
      CASH RECEIVED VOUCHER                                                                               
                                                                                                          
      
      29 rows selected.