Uploading values from excel to DB - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Uploading values from excel to DB

sreemanthsreemanth Posts: 2Member
Hi Members,

Help me with this logic..

I have an excel sheet as specified below i need to upload values from this sheet to DB ( sql 20008). G1 is net value,sometimes net value can also be Null

Code Label
G1 Nokia
1 Nokia N series
2 Nokia C series
3 Nokia E series
4 Nokia Base Model
G2 NULL
5 Sony Ericsson
G3 Samsung
6 Samsung Galaxy
7 Samsung Galaxy Tab
8 Samsung Windows
9 Samsung Base Model
G4 Null
10 BLACKBERRY
11 MOTOROLA
12 LG
13 APPLE
14 Intex
15 ASUS
16 ACER
17 HTC
18 SPICE
19 Other

My values must be displayed in table as shown below:

Net code Label
G1 0 Nokia
G1 1 NokiaNseries
G1 2 NokiaEseries
G2 0
5 sony Erricson
G3 6 Samsung
G3 7 Samsung Galaxy Tab
G3 8 Samsung Windows
G4 0
10 BLACKBERRY
11 MOTOROLA

The code column should not accept any duplicate numbers other than 0(zero).
Please help me in writing logic for this

Thanks,
Sreemanth

Sign In or Register to comment.