8 Replies Latest reply: Mar 13, 2012 10:46 AM by Celambarasan Adhimulam RSS

Generate qvd for unreleated tables

jacq .

Hello,

 


// ******************Dosing ***********

SUB Dosing(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

 

Max_Dosing:

LOAD  Dosing,MinDosing, MaxDosing, MinDosing as MinDosing1, MaxDosing as MaxDosing1;

LOAD

'$(Str)' as Dosing,

max($(Str)) as MaxDosing,

min($(Str)) as MinDosing

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

 

 

CALL Dosing('DoseCavityPZ');

CALL Dosing('DosePumpSpdS');

 

//***************MrFreeze************************

SUB MrFreeze(Str)

All_$(Str):

LOAD FieldValue('$(Str)', IterNo()) as $(Str)

AutoGenerate(1)

While not IsNull (FieldValue('$(Str)', IterNo()));

 

Max_MrFreeze:

LOAD  MrFreeze,MinMrFreeze, MaxMrFreeze, MinMrFreeze as MinMrFreeze1, MaxMrFreeze as MaxMrFreeze1;

LOAD

'$(Str)' as MrFreeze,

max($(Str)) as MaxMrFreeze,

min($(Str)) as MinMrFreeze

Resident All_$(Str);

DROP Table All_$(Str);

ENDSUB

 

 

CALL MrFreeze('MrFrzBlowTimeS');

CALL MrFreeze('MrFrzCavityPZ');

 

- I want to combine dosing and MrFreeze tables into one qvd file. No matter of relationship for both tables data. Instead of generating two different qvd files i want to generate single qvd file without losing data.

  • Generate qvd for unreleated tables
    Q L

    You can only store 1 table by QVD. You can either join your tables and the store it,or use CONCATENATE.

    • Generate qvd for unreleated tables
      jacq .

      Yes u r right. But to join the tables there should be atleast one common field in both tables. here i don't have it.

      • Generate qvd for unreleated tables
        Q L

        You can use concatenate then. But I don't think this is what you want... I don't recommend you mix to independent tables in 1 qvd, it has no sense and it's not a best practice. what's the problem of storing the 2 tables in 2 different qvd files??

        • Generate qvd for unreleated tables
          jacq .

          The Problem is i need to create 8 different qvd files as shown above two tables code. So i just want to reduce the qvd files.

          • Generate qvd for unreleated tables
            Q L

            I'm not sure what to tell you. This is no very logical,sorry.

          • Re: Generate qvd for unreleated tables
            Celambarasan Adhimulam

            Hi,

                 Try this method

             

            SUB Dosing(Str)

            All_$(Str):

            LOAD FieldValue('$(Str)', IterNo()) as $(Str)

            AutoGenerate(1)

            While not IsNull (FieldValue('$(Str)', IterNo()));

             

            Max_Dosing:

            LOAD  'Dosing' as TableName,Dosing as KeyValues,MinDosing as MinValue, MaxDosing as MaxValue, MinDosing as MinValue1, MaxDosing as MaxValue1;

            LOAD

            '$(Str)' as Dosing,

            max($(Str)) as MaxDosing,

            min($(Str)) as MinDosing

            Resident All_$(Str);

            DROP Table All_$(Str);

            ENDSUB

             

             

            CALL Dosing('DoseCavityPZ');

            CALL Dosing('DosePumpSpdS');

             

            //***************MrFreeze************************

            SUB MrFreeze(Str)

            All_$(Str):

            LOAD FieldValue('$(Str)', IterNo()) as $(Str)

            AutoGenerate(1)

            While not IsNull (FieldValue('$(Str)', IterNo()));

             

            Concatenate

            LOAD 'Freeze' as TableName,MrFreeze as KeyValues,MinMrFreeze as MinValue, MaxMrFreeze as MaxValue, MinMrFreeze as MinValue1, MaxMrFreeze as MaxValue1;

            LOAD

            '$(Str)' as MrFreeze,

            max($(Str)) as MaxMrFreeze,

            min($(Str)) as MinMrFreeze

            Resident All_$(Str);

            DROP Table All_$(Str);

            ENDSUB

             

             

            CALL MrFreeze('MrFrzBlowTimeS');

            CALL MrFreeze('MrFrzCavityPZ');

             

            Celambarasan