Question
reach.gr G · Jul 16, 2021

Some elements have no SQL table, how to access them?

Hi Experts,

SQL access,

In the component window, I see that some of the fields have no reference to SQL, for example: The active flag. 

how to know all the active elements, when getdate()>= DateTo or between time between From and To does not work in SQL, I see some existing code, with reference to CAST, please can you provide more details? Thanks a lot.

Product version: IRIS 2019.2
0
1 181
Discussion (1)1
Log in or sign up to continue

Hello,

It depends on the SQL Table you are considering.

Some SQL Table have a column Y/N indicating that the record is active or not. In addition to a DateFrom and DateTo.

if the component has a checkbox "active" the SQL can be

Select * from SQLUser.SQL_Table where ActiveColumn = 'Y' and (DateFrom <= CURRENT_DATE or DateFrom is null) and (DateTo >=CURRENT_DATE or DateTo is null)

But it depends on the Table you are considering.

Please can you detail your needs?

Regards,

Jacques