Ruby/ODBC, Oracle 9.2, table(pattern) function

  • Thread starter Martin D. McLauchlan
  • Start date
M

Martin D. McLauchlan

THIS IS NOT AN ATTACHMENT
I want to restrict the result set returned from the tables([pattern])
function of the ODBC:Database class. What types of a "pattern" does this
funcion accept?

When I connect as scott/tiger and then use the tables function without any
pattern I get 1932 rows in the result set. Only 4 rows are from the scott
schema. The bulk of the other rows are of these types: "SYSTEM "VIEW",
"SYNONYM", and "SYSTEM TABLE". The owner of these objects include "SYS" and
"SYSTEM.

The Microsoft ODBC documentation specifies the function prototype for a
SQLTables function. The documentation indicates that a "String search
pattern for schema names", "String search pattern for table names" and a
"List of table types to match" (in the form of a "value list argument") are
provided for in the prototype. Some examples show the "table name" argument
with a pattern of NULL, "%", "Orders", "Accounts Payable", "\"Accounts
Payable\"". These patterns are in the sixth argument of the prototype.

I've used a number of different patterns with no success - the result set
size is zero. Therefore, I could use some help in identifying how to
specify a pattern. More specifically, how do I indicate that the pattern
applies to the SchemaName, TableName, or TableType argument? Also, is the
pattern a regular expression pattern or some other type of pattern enclosed
in a string? It looks like the pattern uses the SQL wildcards of % and _.

Thanks in advance for any insights into this topic!

Regards,

Marty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top