Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the data attached below:
i have to create two fields old rating and current rating in a straight table.
How to write a code using that data. Please help me out.
Regards
Srujana
On what basis you want to define old and new rating?
on Cob date and CDS value
Hi Srujana
You can use Left Join to get new ratings [Based on COBDate + Ratings + Country] by keeping attached Excel sheet on right side & main table on left. (Excel can be used as Master to map with Original Data)
Hope this will be helpful for you to resolve your issue.
--
Regards,
Prashant P Baste
As per data it seems you need to consider COB_DATE & Country will give you a Rating value & it has to replace with new rating. Please correct me if I am wrong...
yes, u r correct.
i didn't know how to use left join to get the new ratings. could you please explain me clearly.
Regards
Srujana
You can try like -
MainData:
Load Fieldname1,
Fieldname2,
COB_DATE,
RATING,
COUNTRY,
FieldnameN
FROM yourtransactiontablename;
Left Join (MainData)
LOAD COB_DATE,
RATING,
[Rating Value] as NewRatingValue,
COUNTRY
FROM
Downloads\Book1.xlsx (ooxml, embedded labels, table is Sheet1);
Just make sure that FieldNames on the basis of which join is going to happen should be same in main table & in excel-sheet. If not same you can alias them with same name (Ex. Load countryname as COUNTRY from Maintable)
Hope this will be helpful for you.
--
Regards,
Prashant P Baste
Please see the attached.
This is what you are looking for?
Thank you so much kush. Really it helped me a lot.
Regards
Srujana