1

Topic: Select field values of type LONG

I hope me will not swear for a stupid question....
Help gets rid of an error:
ORA-00932: inconsistent datatypes
At performance:

select ' alter table ' || s.table_name || ' add constraint ' || s.constraint_name ||
' check (' || s.search_condition || ');'
from (select table_name, constraint_name, constraint_type, search_condition
from DBA_CONSTRAINTS
where owner ='PARUS'
and constraint_type ='C ') s

P.S. ORACLE 8.1.7.0.0

2

Re: Select field values of type LONG

mbm;

declare
v_search_condition varchar2 (32767);
begin
for c in (select c.search_condition
from all_constraints c
where rownum = 1) loop
v_search_condition: = c.search_condition;
dbms_output.put_line (v_search_condition);
end loop;
end;

3

Re: Select field values of type LONG

ORA __ SQL wrote:

declare
v_search_condition varchar2 (32767);
begin
for c in (select c.search_condition
from all_constraints c
where rownum = 1) loop
v_search_condition: = c.search_condition;
dbms_output.put_line (v_search_condition);
end loop;
end;

4

Re: Select field values of type LONG

Thanks, ORA __ SQL for the help!
declare
v_search_condition varchar2 (32767);
begin
for c in (select c.search_condition
from all_constraints c
where rownum = 1) loop
v_search_condition: = c.search_condition;
dbms_output.put_line (v_search_condition);
end loop;
end;
[/code] [/quote] [/quote]

5

Re: Select field values of type LONG

Thanks, ORA __ SQL for the help!
But I somehow will not think as to interpose  in ....

6

Re: Select field values of type LONG

I apologize for "spam", but I can not find:
How to delete the incorrect message
Or
To edit....
And still fingers stand on Ctrl+Enter - for word wrapping, and here this combination publishes the new message.
Once again, I apologize!

7

Re: Select field values of type LONG

mbm;
It already PLSQL the unit, and  - sql

8

Re: Select field values of type LONG

mbm wrote:

Thanks, ORA __ SQL for the help!
But I somehow will not think as to interpose  in ....

In any way
To create f-tsiju
(To 12 storable)
And still
1)  can be more than 32767
2) in ancient versions dbms_output.put_line too can cut
.....
stax

9

Re: Select field values of type LONG

mbm;
Use search, for a bayan
http://www.sql.ru/forum/afsearch.aspx?s … &bid=3