heartbeat
30th August 2018, 14:02
I want to filter the session show status = 0 only.

I try program script but It show error 302 (SQL syntac not correct).

before.program:
query.extend.where("twwsls100.status='0'")

Please recommend.

giggty
30th August 2018, 14:37
If status datatype is indeed string then use double quotes:

before.program:
query.extend.where("twwsls100.status = ""0""")

Otherwise just omit quotes whatsoever.

rahul ingale
30th August 2018, 14:39
Hello,

What is table name? if table name is wwsls100(Remove "t" in your case).
if status field is numeric field.
then you can query as follow.
before.program:
query.extend.where("wwsls100.status=0 ")

are you show your field name is status?check using ctrl+shift+7.

tmannais
31st August 2018, 04:49
If status datatype is indeed string then use double quotes:

before.program:
query.extend.where("twwsls100.status = ""0""")

Otherwise just omit quotes whatsoever.

There is a function that helps you deal with quotes especially for query like that. Check this out.

quoted.string()

heartbeat
31st August 2018, 06:30
Hello,

What is table name? if table name is wwsls100(Remove "t" in your case).
if status field is numeric field.
then you can query as follow.
before.program:
query.extend.where("wwsls100.status=0 ")

are you show your field name is status?check using ctrl+shift+7.

Thank you very much.

giggty
31st August 2018, 09:19
Yea, I know. But in this case it is a constant value in the query.extend string so why not just hardcode it :)

heartbeat
4th September 2018, 10:57
Yea, I know. But in this case it is a constant value in the query.extend string so why not just hardcode it :)

Please advise me for example.