Discussion Locked

PL-SQL WHERE CLAUSE

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I know MS Access SQL, PL-SQL syntax has me stumped. This one should be simple, but...

I want to add a Where JOB_DESC does not begin with "...", we have sub-classes of job desriptions all starting with 3 periods & I want to only grab the top level jobs, no "..." at the front.

sourceType=SQL source='SELECT JOB_NAME, JOB_DESC
FROM JOB ORDER BY JOB_NAME'

In Access I could have used
1. Left(Job_Desc,3)<>"..."
2. Job_Desc not like "..." & "*"
etc; etc.

How do I accomplish thisin PL-SQL?
Other facts: J2EE environment, Oracle 8 database.

Thanks!

5 replies

by bojidar alexandrov

Don't you know how to deal with strings??

sourceType=SQL source='SELECT JOB_NAME, JOB_DESC
FROM JOB ORDER BY JOB_NAME WHERE Job_Desc not like ''...%'''

Bojidar Alexandrov

by sheryl v

Yes I do, this is in an application that has a form builder and normal string operations are not working. I ended up creating a psuedo-boolean field that grabbed the 1st 3 charachtors & was true if they were ... false otherwise and used that field for the where clause.

If it were that simple I wouldn't have posted it. Thanks for reply, inspite of the insult, anyway.

This discussion is closed to new replies.