Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    The Netherlands, Geleen
    Posts
    8

    Question Unanswered: Listing Db values

    Hi, I want to make a logfile where i store all tables, collnames and values of a specified database. Which statement can I use in SQLserver or Oracle? I already found the following statements:

    Oracle:
    select * from all_tables
    select * from user_tables

    SQLserver:
    select * from sysobjects where type'='U'

    So getting the tablenames isn't the problem. The question is how the get the matching columns with their type and value.

    Tnx.
    Last edited by kixer; 03-12-04 at 07:37.

  2. #2
    Join Date
    Mar 2004
    Posts
    80

    Re: Listing Db values

    try this one
    select sysobjects.name as Table_Name,syscolumns.name as Column_Name,systypes.name as Data_Type from sysobjects
    join syscolumns on sysobjects.id=syscolumns.id
    join systypes on syscolumns.xtype=systypes.xtype and systypes.status=typestat
    where sysobjects.type='u'



    Originally posted by kixer
    Hi, I want to make a logfile where i store all tables, collnames and values of a specified database. Which statement can I use in SQLserver or Oracle? I already found the following statements:

    Oracle:
    select * from all_tables
    select * from user_tables

    SQLserver:
    select * from sysobjects where type'='U'

    So getting the tablenames isn't the problem. The question is how the get the matching columns with their type and value.

    Tnx.

  3. #3
    Join Date
    Feb 2004
    Location
    The Netherlands, Geleen
    Posts
    8
    Thanx! Now I know the objectnames. All I have to do now is to make a nice treeview with the generated values, so i can log some sort of a dictionary.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •