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 0Posted Jul 29, 2004, 7:08 AM
viktorsPosted Jul 28, 2004, 7:17 PM
viktorsPosted Jul 28, 2004, 10:25 AM
"); } 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.
david 0Posted Jul 26, 2004, 11:28 AM
viktorsPosted Jul 26, 2004, 11:21 AM
david 0Posted Jul 23, 2004, 11:20 PM
viktorsPosted Jul 23, 2004, 6:38 PM
david 0Posted Jul 23, 2004, 5:49 PM