sqldevrequiretektips
Programmer
I want to run following query in command click event
VB 6.0 support only 25 physical lines lines joined with line-continuation...
so is there anybody can help me out...that how and where should i write this sql to execute...
any help would really appriciate..
INSERT INTO WLMod_Denormalized(CustLifeNo, WeekNo)
SELECT DISTINCT Cust_Life_Num, WeekNo FROM tbltblWLActCat_WLDay
--MONDAY
UPDATE WLMod_Denormalized
SET MON_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tbltblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET MON_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tbltblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='O'
UPDATE Test_Denormalized
SET MON_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='D'
--TUESDAY
UPDATE WLMod_Denormalized
SET TUE_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET TUE_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='O'
UPDATE Test_Denormalized
SET TUE_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='D'
--WEDNESDAY
UPDATE WLMod_Denormalized
SET WED_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET WED_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='O'
UPDATE Test_Denormalized
SET WED_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='D'
--THURSDAY
UPDATE WLMod_Denormalized
SET THU_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET THU_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='O'
UPDATE Test_Denormalized
SET THU_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='D'
--FRIDAY
UPDATE WLMod_Denormalized
SET FRI_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET FRI_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='O'
UPDATE WLMod_Denormalized
SET FRI_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='D'
--SATURDAY
UPDATE WLMod_Denormalized
SET SAT_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET SAT_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='O'
UPDATE Test_Denormalized
SET SAT_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='D'
--SUNDAY
UPDATE WLMod_Denormalized
SET SUN_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET SUN_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='O'
UPDATE Test_Denormalized
SET SUN_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='D'
VB 6.0 support only 25 physical lines lines joined with line-continuation...
so is there anybody can help me out...that how and where should i write this sql to execute...
any help would really appriciate..
INSERT INTO WLMod_Denormalized(CustLifeNo, WeekNo)
SELECT DISTINCT Cust_Life_Num, WeekNo FROM tbltblWLActCat_WLDay
--MONDAY
UPDATE WLMod_Denormalized
SET MON_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tbltblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET MON_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tbltblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='O'
UPDATE Test_Denormalized
SET MON_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='MON' AND WLActCatId='D'
--TUESDAY
UPDATE WLMod_Denormalized
SET TUE_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET TUE_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='O'
UPDATE Test_Denormalized
SET TUE_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='TUE' AND WLActCatId='D'
--WEDNESDAY
UPDATE WLMod_Denormalized
SET WED_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET WED_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='O'
UPDATE Test_Denormalized
SET WED_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='WED' AND WLActCatId='D'
--THURSDAY
UPDATE WLMod_Denormalized
SET THU_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET THU_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='O'
UPDATE Test_Denormalized
SET THU_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='THU' AND WLActCatId='D'
--FRIDAY
UPDATE WLMod_Denormalized
SET FRI_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET FRI_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='O'
UPDATE WLMod_Denormalized
SET FRI_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='FRI' AND WLActCatId='D'
--SATURDAY
UPDATE WLMod_Denormalized
SET SAT_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET SAT_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='O'
UPDATE Test_Denormalized
SET SAT_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SAT' AND WLActCatId='D'
--SUNDAY
UPDATE WLMod_Denormalized
SET SUN_Act_M='M'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='M'
UPDATE WLMod_Denormalized
SET SUN_Act_O='O'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='O'
UPDATE Test_Denormalized
SET SUN_Act_D='D'
FROM WLMod_Denormalized D INNER JOIN tblWLActCat_WLDay E
ON D.CustLifeNo=E.Cust_Life_Num AND D.WeekNo=E.WeekNo
WHERE WLDayID='SUN' AND WLActCatId='D'