Estoy usando JSL para recuperar datos de una base de datos MySQL. Sin embargo, encontré un problema en el que las condiciones de filtrado en mi consulta SQL no distinguen entre mayúsculas y minúsculas de forma predeterminada. Esto significa que los resultados devueltos son los mismos independientemente del caso del valor del filtro.
Aquí están los dos scripts que producen los mismos resultados:
Guión 1:
New SQL Query(
Version( 130 ),
Connection(
"ODBC:DATABASE=my_database;DSN=my_dsn;PORT=3306;PWD=my_password;SERVER=localhost;UID=my_user;"
),
QueryName( "test_data" ),
Select(
Column( "Column1", "t1" ),
Column( "Column2", "t1" ),
Column( "Column3", "t1" )
),
From( Table( "test_data", Alias( "t1" ) ) ),
Where(
Not Or(
In List(
Column( "Column1", "t1" ),
{"A"},
UI( SelectListFilter( ListBox, Base( "Categorical" ) ) )
)
)
)
) << Run;
Guión 2:
New SQL Query(
Version( 130 ),
Connection(
"ODBC:DATABASE=my_database;DSN=my_dsn;PORT=3306;PWD=my_password;SERVER=localhost;UID=my_user;"
),
QueryName( "test_data" ),
Select(
Column( "Column1", "t1" ),
Column( "Column2", "t1" ),
Column( "Column3", "t1" )
),
From( Table( "test_data", Alias( "t1" ) ) ),
Where(
Not Or(
In List(
Column( "Column1", "t1" ),
{"a"},
UI( SelectListFilter( ListBox, Base( "Categorical" ) ) )
)
)
)
) << Run;
How can I modify the New SQL Query function in my JSL scripts to make the filtering conditions case-sensitive?
¡Gracias por su ayuda!
Alguien de JMP probablemente lo sepa mejor, pero ¿sabe cómo se ve la consulta SQL? Creo que puedes verlo convirtiéndolo a SQL personalizado.

Además, ¿cómo está configurada su base de datos? Si ejecuta su consulta en alguna otra aplicación, ¿obtiene los mismos resultados? No estoy familiarizado con MySQL, pero tal vez por defecto no distingan entre mayúsculas y minúsculas https://dev.mysql.com/doc/refman/8.4/en/case-sensitivity.html
La declaración SQL es similar a esta:
SELECT t1.`Column1`, t1.`Column2`, t1.`Column3`
FROM test_data t1
WHERE ( NOT ( ( ( t1.`Column1` IN ( 'A' ) ) ) ) ) ;
I know that adding the BINARY keyword in SQL can enforce case sensitivity, for example:
SELECT `Column1`, `Column2`, `Column3`
FROM `test_data` AS `t1`
WHERE BINARY `Column1` NOT IN ('A');And using the open Database function, I can execute SQL statements directly. However, I am particularly interested in whether the New SQL Query function in JSL can achieve the same case-sensitive effect.
¡Gracias por su asistencia!
Creo que es posible que tengas que agregar una expresión personalizada para manejar situaciones como esa.

o


Got it, that would be similar to referencing SQL statements in open Databasefunción. ¡Gracias!