Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Query on Long Datatype using LIKE Operator

Author  Topic 

a1jit
Starting Member

4 Posts

Posted - 2005-02-09 : 10:46:11
Hi Guys

I have a column in a table called test1 and its datatype is long..Im trying to query it using a like operator but it failed..Is there any suggestions or sample query on how can i query a long datatype column

this is the query is used but it displays an error

select * from test where dbms_lob.instr(test1,'#123%')>0;

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

select * from test where test1 like '#123%';

ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got LONG

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-02-09 : 10:52:49
emm you'r using oracle, this is a SQL server forum. but i think that you shouldn't use '#' in your like part.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

a1jit
Starting Member

4 Posts

Posted - 2005-02-09 : 10:57:32
actually '#' is part of the data..sample data in the field is

#122554869218945 and so on

Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-02-09 : 11:12:44
maybe you should try
http://www.dbforums.com/f4

Go with the flow & have fun! Else fight the flow
Go to Top of Page

a1jit
Starting Member

4 Posts

Posted - 2005-02-09 : 11:29:02
thankx for the link..

if anyone have done this before, or have any idea on how to do this, pls inform me..

thank you..
Go to Top of Page

a1jit
Starting Member

4 Posts

Posted - 2005-02-10 : 00:35:02
What's the differents between long,clob,blob datatype..
is there any site i can read to understand the differents and the usage of these datatypes
Go to Top of Page
   

- Advertisement -