Update column in a table
hi i have a situation where-in i want to update a column in the database
with one of the fields from the excel sheet.
My excel sheet looks something like this :
Excel file :
ID Name Desc
Colourful-Books
1 red hot
2 blue cool
3 black Dark
Non-Colourful
1 white pale
2 white1 serene
3 white2 calm
after importing the excel file the sql table Book looks like this:
ID BOOKNAME DESCRIPTION TYPE
1 Colourful-Books NULL
2 red hot
3 blue cool
4 black dark
5 NULL NULL
6 Non-Colourful NULL
7 white pale
8 white1 serene
9 white2 calm
what i want to do is update the type column of the table Book:
ID BOOKNAME DESCRIPTION TYPE
1 Colourful-Books NULL NULL
2 red hot Colourful-Books
3 blue cool Colourful-Books
4 black dark Colourful-Books
5 NULL NULL NULL
6 Non-Colourful NULL NULL
7 white pale Non-Colourful
8 white1 serene Non-Colourful
9 white2 calm Non-Colourful
can someone please give me some suggestions.
thanks..
(sorry tried formatting the data in a table format..wasnt successful.... :( )

david 0Rank #8,108 · 228 reputationPosted Jul 23, 2004, 1:49 PM EDT
viktors53 reputationPosted Jul 23, 2004, 2:38 PM EDT
david 0Rank #8,108 · 228 reputationPosted Jul 23, 2004, 7:20 PM EDT
viktors53 reputationPosted Jul 26, 2004, 7:21 AM EDT
david 0Rank #8,108 · 228 reputationPosted Jul 26, 2004, 7:28 AM EDT
viktors53 reputationPosted Jul 28, 2004, 6:25 AM EDT
"); } catch (Exception ex) { Response.Write(ex.ToString()); } finally { cmdinsert.Connection.Close(); } Now, what i dont understand is how do i update the column booktype depending on the type that it is. for eg. red,hot,blue,black need to be updated to colourful and white needs to be updated to non-colorful. i am new to .NET and not able to proceed here. and thanx for ur help.
viktors53 reputationPosted Jul 28, 2004, 3:17 PM EDT
david 0Rank #8,108 · 228 reputationPosted Jul 29, 2004, 3:08 AM EDT