Skip to content
Advertisement

Having an issue with a stored procedure SQL-Server

I’ve got a stored procedure that i’m having some issues with.

I’m trying to lookup against my table GOTWVotes and if VotedBy hasn’t voted before write the vote to the table(this is working) however if VotedBy has voted before not to write to the table and return VoteCount as 1.

Although it doesn’t write to the table when VotedBy exists the value of VoteCountalways appears to be 0

Any help would be appreciated

Advertisement

Answer

You can do following code

To Call above Stored procedure you need to write following code

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement