Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Insert Query from Normalized table to Denormalized

Author  Topic 

amardesai13
Starting Member

4 Posts

Posted - 2005-02-11 : 16:43:14
Table Name : WLCustAct_Emp
Structure and data

CustLifeNo WLActCatId WLDayId WeekNo WLEmpTypeId
330374 FRI 1
330374 FRI 1 C
330374 M FRI 1
330374 M FRI 1
330374 M FRI 1 C
330374 FRI 1
330374 FRI 1
330374 FRI 1 C
330374 FRI 1
330374 D MON 1
330374 M MON 1
330374 M MON 1
330374 D MON 1 C
330374 MON 1
330374 MON 1 C
330374 MON 1
330374 M MON 1 C
330374 D MON 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SAT 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 SUN 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 THU 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 TUE 1
330374 M WED 1
330374 O WED 1
330374 O WED 1 C
330374 O WED 1
330374 WED 1
330374 WED 1 C
330374 WED 1
330374 M WED 1
330374 M WED 1 C

Table WLCust_Denormalized :

CustLifeNo,
WeekNo,
MON_Act_M,
MON_Act_O
MON_Act_D
MON_Emp_C
MON_Emp_F
MON_Emp_P

TUE_Act_M
TUE_Act_O
TUE_Act_D
TUE_Emp_C
TUE_Emp_F
TUE_Emp_P

WED_Act_M
WED_Act_O
WED_Act_D
WED_Emp_C
WED_Emp_F
WED_Emp_P

THU_Act_M
THU_Act_O
THU_Act_D
THU_Emp_C
THU_Emp_F
THU_Emp_P

FRI_Act_M
FRI_Act_O
FRI_Act_D
FRI_Emp_C
FRI_Emp_F
FRI_Emp_P

SAT_Act_M
SAT_Act_O
SAT_Act_D
SAT_Emp_C
SAT_Emp_F
SAT_Emp_P

SUN_Act_M
SUN_Act_O
SUN_Act_D
SUN_Emp_C
SUN_Emp_F
SUN_Emp_P

I want to insert recrods from In tblWLCust_Denormalized table from WLCustAct_Emp table

More in detail M,O,D Value belogs to Act, And C,F,P value Belongs to Emp.

After Insert query Table Denormalized (tblWLCust_Denormalized) will have only one record.
As i show it on the form that WLCustAct_Emp has 63 Records for just one cust_Life_Num.

Is Anybody can give me logic how to achieve this task, I have posted this question before but still i am stuck...

Anyhelp with little bit syntex would really appriciate..

Anybody has any question or confusion please don't hasitate to ask me, i will reply back same day...

Thanks
AD
then
Any help really appriciate...

Thx
AD
   

- Advertisement -