Sql help

Results 1 to 3 of 3

Thread: Sql help

  1. #1
    zia Guest

    Default Sql help

    I have 2 tables in my database. I am using SQL 7.0<BR>I am using 1 column in table1 as primary key & the same column<BR>in table2 becomes a foreign key.<BR>Now in the table2 I have a column &#039;Category&#039; which flags each record and I want to add this column in table1 which at the present is not in table1.It would be no problem if I had a few<BR>records in my tables but I am having around 5000 records in both<BR>tables so I want to avoid filling in the extra column 5000 times.<BR>Is there a way I could just import/copy a column on to another table.Please help if u can or some related sites.Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Sql help

    use DTS via a JOINED query (select &#039;specify a query with which to transfer data&#039;) to create a new table with the right columns and data, then drop the old one.<BR><BR>j

  3. #3
    zia Guest

    Default RE: Sql help

    Thanks Atrax for replying.<BR>But since I am not too much familiar with SQL,what is a DTS<BR>you are talking about and how would I write a transfer query for that as you mentioned.Thanks again.

Posting Permissions

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