2 Replies Latest reply: Feb 13, 2011 10:37 PM by Zuleinie Bt. Zainal Abidin RSS

    Load and Join table

      HI All,

      I would like to ask a question regarding joining 2 tables.

      here is my script :

      first tab:

      [GLPCT]:

       

      // EC-PCA: Totals Table

       

      Load

       

       

      [RRCTY]

       

      ,

      [RYEAR]

       

       

      ,

      [DRCRK]

       

      ,

      [RBUKRS]

       

       

      ,

      [RACCT]

       

       

      ,

      [RPMAX]

       

       

      ,

      [RASSC]

       

       

      ,

      [HSLVT]

       

      ,

      [HSL01]

       

       

      ,

      [HSL02]

       

       

      ,

      [HSL03]

       

       

      ,

      [HSL04]

       

       

      ,

      [HSL05]

       

       

      ,

      [HSL06]

       

       

      ,

      [HSL07]

       

      ,

      [HSL08]

       

       

      ,

      [HSL09]

       

       

      ,

      [HSL10]

       

       

      ,

      [HSL11]

       

       

      ,

      [HSL12]

       

       

      ,

      [HSL13]

       

       

      ,

      [HSL14]

       

       

      ,

      [HSL15]

       

       

      ,

      [HSL16]

       

       

      ;

      SQL

       

       

      from GLPCT WHERE RYEAR = 2011 AND RBUKRS = 6700

      ;

      Select RRCTY RYEAR DRCRK RBUKRS RACCT RPMAX HSLVT HSL01 HSL02 HSL03 HSL04 HSL05 HSL06 HSL07 HSL08 HSL09 HSL10 HSL11 HSL12 HSL13 HSL14 HSL15 HSL16 RASSC

       

      STORE

       

       

      GLPCT.QVD;

       

      my 2nd tab is :

      * FROM [GLPCT] INTO as [In company code currency_HSL16] as [In company code currency_HSL15] as [In company code currency_HSL14] as [In company code currency_HSL13] as [In company code currency_HSL12] as [In company code currency_HSL11] as [In company code currency_HSL10] as [In company code currency_HSL09] as [In company code currency_HSL08] as [In company code currency_HSL07] as [In company code currency_HSL06] as [In company code currency_HSL05] as [In company code currency_HSL04] as [In company code currency_HSL03] as [In company code currency_HSL02] as [In company code currency_HSL01] as [In company code currency_HSLVT] as [Trading Partner_RASSC] as [Period_RPMAX] as [Account Number_RACCT] as [Company Code_RBUKRS] as [Debit/Credit Ind._DRCRK] as [Fiscal Year_RYEAR] as [Record Type_RRCTY]

       

       

      [CSKU]:

      // Cost Element Texts

       

      Load

       

       

      [SPRAS]

       

       

      [KTOPL]

       

       

      [LTEXT]

       

       

      [KSTAR]

       

      as [Cost Element_KSTAR],

      [KTEXT]

       

      as [Name_KTEXT];

      SQL

       

       

      where SPRAS ='EN' and KTOPL ='FLDA'

      ;

      Select SPRAS KTEXT KTOPL LTEXT KSTAR from CSKU

      STORE

       

       

       

      * FROM [CSKU] INTO CSKU.QVD; as [Description_LTEXT], as [Chart of Accounts_KTOPL], as [Language Key_SPRAS],

       

       

      how do i join GLPCT and CSKU if my SQL syntax looks like this :

      CSKU INNER JOIN
      GLPCP ON CSKU.KSTAR = GLPCP.RACCT

      thanks....