mysql odbc parameters
Posted by:
Ivan Lora
Date: February 05, 2021 08:51AM
Hi there
I am currently doing a report with SQL Reporting Services with Visual Studio 2019.
I have already created the ODBC and managed to connect to the Database, the problem is that I have a Query that runs perfectly on Microsoft's SQL Server, but when I try to run the same query with the settings in MySQL it doesn't work.
Query:
SELECT * FROM view_evaluacionmedica
WHERE IF(@IdSrs=-1,1,IdRegionSeg) = IF(@IdSrs=-1,1,@IdSrs)
AND IF(@IdProvincia=-1,1,IdProvinciaSegui) = IF(@IdProvincia=-1,1,@IdProvincia)
AND IF(@Zona=-1,1,ZonaSeguimiento) = IF(@Zona=-1,1,@Zona)
AND IF(@IdUNAP=-1,1,IdUNAPSeguimiento) = IF(@IdUNAP=-1,1,@IdUNAP)
/*AND FechaInsert BETWEEN @FechaInicial AND @FechaFinal */
ORDER BY FechaInsert DESC