Oracle Community

The social network for Oracle people

How would you define a variable in a Stored procedure when using the LIKE clause ie.

EXEX curt @value = '100'

select * from table where username like '%?????

username have values of (K100, J100, T100, etc )

Does not seems to work no matter how I try to put the variable in the LIKE clause.

Reply to This

Replies to This Discussion

How about this:

select * from table where username like '%' || variable_name || '%';

Reply to This

That's it. Thanks Awad

Reply to This

RSS

© 2010   Created by Eddie Awad on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service