Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL long problem

SQL long problem

From: <reyre2_at_my-dejanews.com>
Date: 1998/07/17
Message-ID: <6onom5$o7q$1@nnrp1.dejanews.com>#1/1

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

                *

ERROR at line 1:
ORA-00997: illegal use of LONG datatype

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 Fri Jul 17 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US