tags:

views:

812

answers:

1

I'm trying to build a search page in ASP.NET that allows me to search for table names in oracle. When I place the sql in the sqldatasource control it doesn't recognize the parameter :Tablename. How do I need to rewrite this so that it works?

SELECT Owner, Table_name, Num_Rows, Tablespace_name
FROM all_tables
WHERE trim(upper(table_name)) LIKE trim(upper('%:TableName%'))
+5  A: 

Can you replace

'%:TableName%'

with

'%' || :TableName || '%'

?

Adam Paynter
Thanks, that worked!
FashionHouseJewelry.com