MySQL Forums
Forum List  »  Connector/ODBC

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

Options: ReplyQuote


Subject
Written By
Posted
mysql odbc parameters
February 05, 2021 08:51AM
February 05, 2021 09:42AM
February 05, 2021 01:27PM
February 05, 2021 02:22PM
February 08, 2021 06:35AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.