Connect with Expertise | Find Experts, Get Answers, Share Insights

How do i define the structure of my DB

 
Join Date: Sep 2009
Posts: 48
#1: Feb 10 '10
HI

I need to transfer all the worksheet data to the DB .But the problem here ls as seen in the attached file every worksheet data is been transferred to the 1 table called as "outer2".All the data is going inproper order but the problem is with the column "Type"
For ex-if the Sheet1 renamed as "W1" data is been transferred to the table every record belonging to W1 should show the value as "W1".

For this updation of column "Type" ,i m using update query which updates the table,but here while updating it tries to update the whole table whereas i require specific columns to contain value as "W1" ,while others as "W2" & so on....

So do i need to 've a separate table for the "type" or how should i design/restructure the table so that Sheet1 i.e "W1" data will be linked to type "W1" & "W2" data linked to type "W2".

Plz guide me...
Attached Files
File Type: txt outer2.txt (727 Bytes, 13 views)

Delerna's Avatar
E
C
 
Join Date: Jan 2008
Location: Sydney
Posts: 1,062
#2: Feb 10 '10

re: How do i define the structure of my DB


Sorry I can hardly make head nor tail of your question.
The one thing I caught from it is your Update query is updating every record in the table but you only want it to update specific records in the table.

Expand|Select|Wrap|Line Numbers
  1. UPDATE TheTable 
  2. SET [Type]="TheValue" 
  3. WHERE ThisField =ThisValue
  4.       AND ThisOtherField=ThisOtherValu
  5.       .......etc... etc
  6.  
is the general sytax that updates specific records
The WHERE clause specifies the records to update
Reply