Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    83

    Question Unanswered: Table Information

    I have two question
    1)Suppose I want to create a table of compositing three or more tables.Means I have a table table1(col1 int,col2 int),another table table2(col3 int,col4 datetime),another table table3(col5 int,col 6 int identity(1,1),col7 bit).Now I like to have a table of col1 to col7 from these three tables.How can I do this from QA from a single script without the way of creating the table from one base table and adding the columns from another table?
    2)How can I get a list of the satistics about the last 10 or 100 changes(addition,updation or deletion) for a particular table?

    Subhasish

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    CREATE VIEW myView AS SELECT?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Regarding your first question, there are two possibilities with two different solutions:
    A) If your tables have a foreign key or shared column on which they can be linked, the solution is to write a simple SELECT statement that links the tables.
    B) If your tables do not share any common key values, the solution is to scrap your database and redesign it so they do.

    Regarding your second question, you will need to record the events as they occur (using triggers for instance) either in a separate HISTORY table or in a field in your data table.

    blindman

  4. #4
    Join Date
    Oct 2003
    Posts
    83

    Unhappy ?

    Thanks.
    But I have not got any reply regarding my last (2nd) question

    Subhasish

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    "Regarding your second question, you will need to record the events as they occur (using triggers for instance) either in a separate HISTORY table or in a field in your data table."

    "blindman"

Posting Permissions

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