• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "SQL Question - Querying the DB objects"

Collapse

  • BrilloPad
    replied
    Originally posted by Ruprect View Post
    lol, well, I could have said SQL Server...
    or, worse, acc*ss

    <spit>

    Leave a comment:


  • Ruprect
    replied
    Originally posted by TheFaQQer View Post
    Sorry, I thought you said it was a database....
    lol, well, I could have said SQL Server...

    Leave a comment:


  • Sir_Edward_Matheson
    replied
    Originally posted by TheFaQQer View Post
    Sorry, I thought you said it was a database....

    an RDBMS

    Leave a comment:


  • Bumfluff
    replied
    Off the top of my head its the syscolumns and sysobjects tables you need to join and query. The command sp_tables will list the tables you can view including system OR if your using Rapid SQL just use the 'Search DB option' under 'Tools'.

    Sybase is sh*t, current gig is Sybase 6 months and just got another 6 months but Im seriously considering looking else soley because 12 months Sybase in line of work and not Oracle will make getting a new contract very hard.
    Last edited by Bumfluff; 28 March 2008, 10:59.

    Leave a comment:


  • oracleslave
    replied
    Originally posted by TheFaQQer View Post
    Sorry, I thought you said it was a database....

    Leave a comment:


  • TheFaQQer
    replied
    Originally posted by Ruprect View Post
    Probably should have mentioned that! Sybase.
    Sorry, I thought you said it was a database....

    Leave a comment:


  • Ruprect
    replied
    Originally posted by BrilloPad View Post
    select o.name, c.id, c.name
    from syscolumns c, sysobjects o
    where c.id=o.id
    and c.name = "ISBN"
    That's the ticket. Thanks BP.

    Leave a comment:


  • Ruprect
    replied
    Probably should have mentioned that! Sybase.

    Leave a comment:


  • TheFaQQer
    replied
    Give us a clue - what kind of database are you working with??????

    Code:
    SELECT table_name
    FROM   dba_tab_columns
    WHERE  column_name = 'ISBN'
    will do it in Oracle for you.

    Leave a comment:


  • BrilloPad
    replied
    select o.name, c.id, c.name
    from syscolumns c, sysobjects o
    where c.id=o.id
    and c.name = "ISBN"

    Leave a comment:


  • Ruprect
    started a topic SQL Question - Querying the DB objects

    SQL Question - Querying the DB objects

    Did a quick google and came up with little so I thought I'd ask you lot seeing as you all love showing off your skills

    How can I find a table/view that contains a column that I know the name of?

    e.g. I know the name of a column is "ISBN", how can I find, using a query, the table "Book"?

    Know what I mean?

    If possible, I would like to be able to do this across the whole DBMS, not just one database within it.

    Over to you gurus
Working...
X