
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Adding Pseudo Column in the table
Hi All,
I am having the following sceario
Table A
YEAR,FLAG
2012,Y
2013,N
Table B
TAX,INFO
xx,yy
dd,mm
Table C
ID,Details
xx,abc
dd,jjj
From the above tables,even though I dont have any common key field between Table A & B I need to create a Pseudo column of Year in Table B,Then I need to make a relationship to the table C.
All I want to know ,here how to create a Pseudo Year field with the Table B based on Table A
-Jay


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
You need to decide where YEAR can be calculated from when loading your Table B data.
Then you can calculate your YEAR 'column' while loading the data.
It will be something like:
LOAD TAX, INFO, expression to calculate year AS YEAR;
Table B will then link with table A based on YEAR.
Good luck !
.png)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What kind of value are you expecting to be populated in the pseudo year column?
LOAD TAX,
INFO,
'9999' as year1 //dummy year
FROM
C:\XXXX.xlsx
(ooxml, no labels, table is xxx);
or
load * inline
[TAX,INFO, Year
xx,yy,
dd,mm,];

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Adding Pseudo Column in the table
Hi abeyphilip
Thank you for your quick response. I may need to have the year field same like below
LOAD TAX,
INFO,
'9999' as year1 //dummy year
FROM
C:\XXXX.xlsx
(ooxml, no labels, table is xxx);
But I should not Hard Code it. I need to have a variable with table B ,it should look in to Table A year field
-Jay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Richard,
Thanks for your response. It would be great if you brief more about expression to calculate year AS YEAR; in your solution. Do I need to have any lookups?
-Jai
