- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to do LONG datatype query?
Operating System - HP-UX
1753427
Members
4992
Online
108793
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2005 11:46 PM
тАО01-24-2005 11:46 PM
Re: How to do LONG datatype query?
Thanks for Meta Documents,
I'll reply the testing results asap.
Here is the db info:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
PL/SQL Release 8.1.7.4.0 - Production
CORE 8.1.7.0.0 Production
TNS for HPUX: Version 8.1.7.4.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
SQL>
SQL> set serveroutput on size 1000000;
SQL>
SQL> declare
2
3 mtext long;
4 mcount number := 0;
5
6 cursor c1 is select text from dba_views;
7
8 begin
9
10 for r1 in c1 loop
11
12 mtext := r1.text;
13
14 if mtext like '%GBM%' then
15 mcount := mcount + 1;
16 end if;
17
18 end loop;
19
20 dbms_output.put_line(mcount||' views exists');
21
22 end;
23 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 10
SQL>
I'll reply the testing results asap.
Here is the db info:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
PL/SQL Release 8.1.7.4.0 - Production
CORE 8.1.7.0.0 Production
TNS for HPUX: Version 8.1.7.4.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
SQL>
SQL> set serveroutput on size 1000000;
SQL>
SQL> declare
2
3 mtext long;
4 mcount number := 0;
5
6 cursor c1 is select text from dba_views;
7
8 begin
9
10 for r1 in c1 loop
11
12 mtext := r1.text;
13
14 if mtext like '%GBM%' then
15 mcount := mcount + 1;
16 end if;
17
18 end loop;
19
20 dbms_output.put_line(mcount||' views exists');
21
22 end;
23 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 10
SQL>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2005 12:33 AM
тАО01-25-2005 12:33 AM
Re: How to do LONG datatype query?
Hi Violin,
the "like" operator works on CHAR or VARCHAR2 not on LONG.
see my previous posts for bypassing the issue. I believe the solution to your question is there.
Regards
Jean-Luc
the "like" operator works on CHAR or VARCHAR2 not on LONG.
see my previous posts for bypassing the issue. I believe the solution to your question is there.
Regards
Jean-Luc
fiat lux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2005 12:58 AM
тАО01-25-2005 12:58 AM
Re: How to do LONG datatype query?
hi,
Yogeeraj's solutions works, but only upto longs of 32K. Above that boundary things get more complex.
If this is a one time report, then how about this for a work around:
set long 2000000000
spool /tmp/myviews.txt
select owner, view_name, text
from dba_views;
spool off
and use view/more/whatever to find the GBM's.
regards,
Thierry.
Yogeeraj's solutions works, but only upto longs of 32K. Above that boundary things get more complex.
If this is a one time report, then how about this for a work around:
set long 2000000000
spool /tmp/myviews.txt
select owner, view_name, text
from dba_views;
spool off
and use view/more/whatever to find the GBM's.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2005 01:04 AM
тАО01-25-2005 01:04 AM
Re: How to do LONG datatype query?
first set
set linesize 4000
set longchunksize 4000
to avoid line wrapping in the middle of your search text.
regards,
Thierry.
set linesize 4000
set longchunksize 4000
to avoid line wrapping in the middle of your search text.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP