NYCPHP Meetup

NYPHP.org

[nycphp-talk] I need to do a search criteria in Oracle SQL inside LONG datatype field...

soazine@pop.erols.com soazine at pop.mail.rcn.net
Thu Apr 17 13:35:15 EDT 2003


Could you show me an example of how to use TO_LOB or LOB within a SQL
statement? And is it possible to write this w/o having to write a stored
procedure or function?

A sketch of the SQL statement I want is below (note "templateBody" is the
renaming of t.BODY, the LONG column datatype):

SELECT t.ID, t.TITLE, tp.PATHNAME
FROM vigaudi.template t, vigaudi.template_path tp, vigaudi.vgn_ci ci 
WHERE t.ID = tp.ID 
AND TO_CHAR(t.ID) = ci.RECORDID 
AND ci.PROJECT IN ('/pr/64', '/pr/79', '/pr/7b', '/pr/7c', '/pr/7e',
'/pr/80', '/pr/81', '/pr/82', '/pr/83', '/pr/84', '/pr/85', '/pr/8c',
'/pr/90', '/pr/93', '/pr/97', '/pr/99', '/pr/9a', '/pr/9b', '/pr/9e',
'/pr/9f', '/pr/a0', '/pr/a3', '/pr/a4', '/pr/a5', '/pr/63') 
--AND templateBody like '%Constants %' OR templateBody like '%TypeConstants
%'

Phil


Original Message:
-----------------
From: Hans Zaunere zaunere at yahoo.com
Date: Thu, 17 Apr 2003 12:28:50 -0400
To: talk at nyphp.org
Subject: Re: [nycphp-talk] I need to do a search criteria in Oracle SQL
inside LONG datatype field...



--- "soazine at pop.erols.com" <soazine at pop.mail.rcn.net> wrote:
> Would anyone here have any idea how I would do this, knowing that I cannot
> have a LONG datatype field in a WHERE clause?

Use LOB and/or TO_LOB()

H




--- Unsubscribe at http://nyphp.org/list/ ---



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .






More information about the talk mailing list