Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!postnews.google.com!j55g2000cwa.googlegroups.com!not-for-mail
From: "Alen Cappelletti" <cocker@libero.it>
Newsgroups: comp.databases.oracle.misc
Subject: INSTR problem into procedure
Date: 6 Jun 2006 06:10:38 -0700
Organization: http://groups.google.com
Lines: 62
Message-ID: <1149599438.178910.210290@j55g2000cwa.googlegroups.com>
NNTP-Posting-Host: 213.215.191.66
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1149599443 22720 127.0.0.1 (6 Jun 2006 13:10:43 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 6 Jun 2006 13:10:43 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.0 IMIW03ISA04
Complaints-To: groups-abuse@google.com
Injection-Info: j55g2000cwa.googlegroups.com; posting-host=213.215.191.66;
   posting-account=iyrv-hMAAAAWz4vNrYDdpm-wdmfUPytI9QVlJXAgfZgTLHTp5oWR3w
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:127772

In this procedure if there is the word "&ID=3D" into strQueryString
variable IN must be recall an external procedure.

I try to compile this code and always have an PLS error...:
PLS-00382 exprerssion is of wrong type at line 59
---------
IF INSTR(strQueryString,'&ID=3D') THEN
---------

I dont't understand the problem 'cause in my SQL software a simple
query with INSTR is perfectly on.
Thaks Alen
------------------
PROCEDURE HaiVisto(
		strCookieMD5 varchar2,
		strUrl varchar2,
		strQueryString varchar2,
		strTitoloPagina varchar2,
		intArea number,
		OBJ_CUR_HaiVisto OUT CUR_HaiVisto
		)
        AS
        BEGIN
        	OPEN OBJ_CUR_HaiVisto FOR
			SELECT
			*
			FROM
			(
			SELECT
				MAX(un.IDUTENTENAVIGAZIONE) ID,
				CASE TO_CHAR(NVL(MAX(un.QSTRING),1))
					WHEN '1' THEN MAX(un.URLPATH)
					ELSE MAX(un.URLPATH)||'?'||MAX(un.QSTRING)
				END QS,
				CASE SIGN(LENGTH(MAX(un.TITOLOPAGINA))-20)
					WHEN -1 THEN MAX(un.TITOLOPAGINA)
					WHEN 1 THEN SUBSTR(MAX(un.TITOLOPAGINA),1,17)||'...'
					ELSE MAX(un.TITOLOPAGINA)
				END Titolo,
				MAX(a.ICONA) Icona
			FROM UTENTI u
			JOIN UTENTIAPPOGGIONAVIGAZIONE uan ON (u.IDUTENTE =3D uan.IDUTENTE)
			JOIN UTENTINAVIGAZIONE un ON (u.IDUTENTE =3D un.IDUTENTE)
			JOIN AREE a USING (IDAREA)
			WHERE (u.STATO =3D 1 AND u.SOSPESO =3D 0)
			AND
TO_CHAR(CriptaMD5(uan.IDUTENTEAPPOGGIONAVIGAZIONE||uan.IDUTENTE||uan.WEBSES=
SIONID))
=3D strCookieMD5
			GROUP BY un.URLPATH,un.QSTRING
			ORDER BY ID DESC
			)
			WHERE rownum <=3D 10;

			--Se c'=E8 un ID....
        	IF INSTR(strQueryString,'&ID=3D') THEN

		UTENTENAVIGAZIONE(strCookieMD5,strUrl,strQueryString,strTitoloPagina,intA=
rea);
        	END IF;
 		END HaiVisto;

