Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to join two tables by using different date fields?

Hi,

I have two tables

one is sales and date table now i want to join two tables by using fiscal year filed

                      

Sales table              Date Table

Fiicsalyear              Fiicsalyear    

Fy01                      2001

Fy02                      2002

Fy03                      2003

i used   

'FY'&  mid(Fiscalyear,3,2) as Fiscal_Year for chaganging date table filed to joing with sales table

but it giving script execution faield error

please help me

if there any other date formats are needed

,

4 Replies
Not applicable
Author

It look like ok..

Check spelling of fields..

If you still facing problem then please paste your coding here for futher reference

Not applicable
Author

difference in spelling of

Fiicsalyear   and   mid(Fiscalyear,3,2)

try this code

SalesTable:

load Fiicsalyear as Fiscal_Year;

LOAD * INLINE [

    Fiicsalyear

    Fy01

    Fy02

    Fy03

];

DateTable:

load * ,'Fy'&  mid(Fiicsalyear,3,2) as Fiscal_Year inline [

Fiicsalyear

2001

2002

2003

];

Not applicable
Author

Spelling is not a iisue

the both table date formats are diifferent thats why the join condition is not working

Not applicable
Author

Spelling is not a iisue

the both table date formats are diifferent thats why the join condition is not working