on ‎2022 Aug 18 6:56 AM
a table has two columns one for English language and one for french language if user is English then it should show English description if user is french then it should show french description then for that what i have to do if i use Conditional Statement then how can I make comparison In every table. If this two field i.e. English & French column so I need to Make logic for that.
Anyone can help me then most welcome.
Regards
Saurabh
Request clarification before answering.
Hi
You may use the union based on the session variable as below:
Provided, the COL1 , COL2, COL3 of same type.
SELECT COL1, COL2, COL3
FROM TABLE
WHERE SESSION_CONTEXT('LOCALE_SAP') = 'EN'
UNION
SELECT COL1, COL2, COL3
FROM TABLE
WHERE SESSION_CONTEXT('LOCALE_SAP') <> 'EN'
Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You for your response but what I required I have a 5-6 table in which there are multiple field and in that table there is English description column and French description column also so we need to convert those column i.e. English to french. So, the challenge is How can we get that type of user either English or French user then we need to make comparison of that table and need to make change.
Regards,
Saurabh
Hi,
If you can use the LOCALE of the users, then a calculation view with "Text join" can be a good option. Since you have one column for each language, you should do an union of these 2 in 1 column with a fixed input for the language (E or F) in a 2nd column.
Regards,
Yann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.