Hello all,
I am using sql dependency to get notifications from sql server, also using signalR for sending notifications to all active clients.
I have already achieved the results as expected but now I need to use a complex select query instead of a simple statement.
What I have tried:
Here is query I used
SELECT a,b,c,d FROM DBO.TABLEA
But now I need to use something like this
SELECT MAX(a) Price, b,c
FROM DBO.TABLEA EAB
INNER JOIN DBO.TABLEB ECM ON EAB.ID = ECM.ID
WHERE EAB.OI = @OI -- Some Variable
GROUP BY ECM.b,ECM.c
ORDER BY MAX(a) DESC
Which does not allow me to get notifications.
I used one another scenario to do so but I feel it is not a correct way.
Created a job in sql server, that job hits a procedure in a fixed interval and filters records from table TABLEA and inserts those records to a new table TABLEC. Now I can use that new table TABLEC for interacting with C# code for notification. (It is working fine but I can not create new tables for each type of different notifications.)
Looking forward for everyone's valuable response.