Question
· Jan 30, 2023

SQL Query Help in $ListGet

Hi All,

I want to run an SQL like below

Select ID,Rollno,Marks,Name,Section,Teacher from Marks left outer join Student on Marks.StudentID=Student.ID

Now, the Student.ID is having the encrypted value which is not matching with Marks.StudentID (as this is clear value).

I can get the clear value using encrypted value as follow

^StoreValue("EncryptStudentID",Student.ID)=$LB("123"). That 123 is the clear Student.ID which I need to match in SQL query (ON clause).

Now I Need to fetch the data from sql query matching both clear values. Something like this

 

Select ID,Rollno,Marks,Name,Section,Teacher from Marks left outer join Student on Marks.StudentID=$LISTGet("EncryptStudentID",Student.ID). But this is giving me error. Is this possible to match the data using sql query or do we need to write an utility only ?

Product version: Caché 2014.1
Discussion (2)2
Log in or sign up to continue

See the answers here.

In addition there are a few comments: