×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using ODBC to determine colum

Using ODBC to determine colum

Using ODBC to determine colum

(OP)
Hey folks, at the moment I really don't think this is possible but decided to throw it on here to see if there were any ideas.

Essentially, I would like a way to grab any 1) arbitrary table (that I have permissions to) in DBMS that I have an ODBC connection too; 2) A column in that table and determine 3) If there are repeated values in that column.

What I *don't* want to do is check for column uniqueness by doing a query for the column and check manually if there are repeated values by either
1) looping through to check for duplicates ( O(n^2) time )
2) Sorting the column and comparing adjacent values ( like O (n^2 log n) I think)

What I would like an consistent, generic, ODBC-ish way to extract the meta data for the column to determine if it was declared as Unique in the DDL (I know there could also be unique columns not declared in the DDL but I hugely don't care about those) which would tell me in constant O(1) time if it's unique regardless of the DBMS I'm using (that is, in ODBC and not though DBMS-specific data dictionary queries). Actually, I would really like more meta data (e.g. check constraints that may have been DDL'd into the column/table) but I'd be happy for this.

I know about the INFORMATION_SCHEMA views in the ANSI Standard, but there are significant DBMS's that do not support (e.g. Oracle) so it's no good.

Again, I figure this is a dream, but who knows! Thanks!
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close