Wrox Programmer Forums
|
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 1st, 2005, 07:48 AM
Authorized User
 
Join Date: Sep 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Nitin_sharma Send a message via Yahoo to Nitin_sharma
Default Like Statement

Hi Guys,
I am new to oracle coding and I wrote this store procedure

PROCEDURE Get_Faq_Proc
       ( header_name in varchar2,
         out_faq_list OUT curTableList
       )
    IS
    BEGIN
         OPEN out_faq_list for
         select question , answer
         from faq_data
         where header_id = (select header_id from faq_header where title LIKE (''%' || header_name || '%'');

         end Get_Faq_proc;
And it comes up with an oracle error at like statement.
Any help would be appreciated.
Nitin


 
Old May 10th, 2005, 12:14 AM
Registered User
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have learnt oracle long ago but not used for quite a period.
But I feel - try using % where you have used 96.
some examples are given below
Using LIKE
The following SQL statement will return persons with first names that start with an 'O':

SELECT * FROM Persons
WHERE FirstName LIKE 'O%'

The following SQL statement will return persons with first names that end with an 'a':

SELECT * FROM Persons
WHERE FirstName LIKE '%a'

The following SQL statement will return persons with first names that contain the pattern 'la':

SELECT * FROM Persons
WHERE FirstName LIKE '%la%'

Ulhas Amrite


 
Old May 10th, 2005, 12:18 AM
Registered User
 
Join Date: Apr 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when I read my reply it shows 96 (nintysix) at places - In your code also it was same . try using percent sign.

Ulhas Amrite






Similar Threads
Thread Thread Starter Forum Replies Last Post
if/else statement mussa Beginning PHP 5 July 3rd, 2006 06:06 PM
What does the @ do in the following statement? kenn_rosie VB.NET 2002/2003 Basics 1 March 15th, 2006 12:20 PM
Like Statement Nitin_sharma Oracle 4 February 12th, 2005 01:46 PM
Like statement Nitin_sharma Classic ASP Databases 7 February 1st, 2005 11:12 AM
if statement markhardiman VS.NET 2002/2003 1 July 31st, 2003 06:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.