How do i define the structure of my DB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalskedar
    New Member
    • Sep 2009
    • 66

    How do i define the structure of my DB

    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".Al l 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
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    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.

    [code=sql]
    UPDATE TheTable
    SET [Type]="TheValue"
    WHERE ThisField =ThisValue
    AND ThisOtherField= ThisOtherValu
    .......etc... etc
    [/code]
    is the general sytax that updates specific records
    The WHERE clause specifies the records to update

    Comment

    Working...