I searched a lot on Google but I couldn't find a format following which I can make a connection to SQL Server and get data from a stored procedure, which doesn't need any parameters, and getting data from two tables.
What I want is to get the data from the stored procedure and store in something that I can retrieve the data easily.
My stored procedure is,
ALTER PROCEDURE [dbo].[GetTablesData]
AS
SELECT TableA.Column1, TableB.Column2
FROM TableA TableA
INNER JOIN TableB TableB
ON TableA.ID = TableB.ID AND TableA.ID2 = TableB .ID2
As I will get two columns, I need to check
If (Column1 < 7)
Then Get Column2 and calculate a email address (by stripping off things from that column and get the data I want...) and send an email.
Now I don't know how I will call the stored procedure and do use it in IF else statement, I looked at old code, where they are using XSD (Dataset) but I didn't get the concept of that either online.