Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL long help
What is wrong with this query?
Cannot union the LONG datatype fields, works for other values...
SQL> describe qw_text
Name Null? Type ------------------------------- -------- ---- QWKEY NOT NULL NUMBER(38) TABLENAME VARCHAR2(30) FIELDNAME VARCHAR2(30) TEXTKEY NUMBER(38) TEXT LONG
SQL> REM SQL that works
1 select t.qwkey
2 from calls c, qw_text t
3 where c.pkey = 13729
4 and c.problemtext = t.qwkey
5 and t.fieldname = 'problemtext'
6 union
7 select t.qwkey
8 from calls c, qw_text t
9 where c.pkey = 13729
10 and c.actiontext = t.qwkey
11* and t.fieldname = 'actiontext'
SQL> /
QWKEY
9226 9227
SQL> REM SQL that does not work
1 select t.qwkey, t.text as problem
2 from serv133.calls c, serv133.qw_text t
3 where c.pkey = 13729
4 and c.problemtext = t.qwkey
5 and t.fieldname = 'problemtext'
6 union
7 select t.qwkey , t.text as problem
8 from serv133.calls c, serv133.qw_text t
9 where c.pkey = 13729
10 and c.actiontext = t.qwkey
11* and t.fieldname = 'actiontext'
SQL> /
select t.qwkey, t.text as problem
*
tia
-r
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Thu Jul 16 1998 - 14:43:26 CDT
![]() |
![]() |