Click here to Skip to main content
15,905,323 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys, i have a problem here, pseudo code goes like this

IF (SELECT COLUMN FROM TABLENAME WHERE ID=SOMETHING) = NULL THEN
DO THIS


CAN ANYONE GIVE ME A SAMPLE CODE ON STORED PROCEDURES,
I DONT HAVE GOOGLE :)
THANK YOU IN ADVANCE
Posted

Quote:
I DONT HAVE GOOGLE Smile :)
Take it https://www.google.com[^].

And for Stored Procedures - sql + stored procedure[^].

[Update]

Take a look at the below resources.
1. Overview of SQL Server Stored Procedure[^]
2. what is stored procedure in Sql server | what are the advantages of using stored procedures in sql server[^]
3. Stored procedure[^]
 
Share this answer
 
v2
Comments
Goenitz 13-Jan-14 0:10am    
The proxy server is refusing connections :), i just need an example because i dont know the syntax and all i have is code project lol
Okay, no worries. :)

Take a look at the below resources.
1. Overview of SQL Server Stored Procedure[^]
2. what is stored procedure in Sql server | what are the advantages of using stored procedures in sql server[^]
3. Stored procedure[^]

Please accept this answer, if it has helped you in any way.
This will help others to find the answer in one go and you will also be awarded with some points for this action...

Thanks,
Tadit
this is WORKING :)
<pre lang="sql">
SET @var1 = SELECT COLUMN FROM TABLENAME
SET @var2 = SELECT COLUMN FROM TABLENAME

IF @var1 IS NOT NULL AND @var2 IS NOT NULL
        BEGIN
            DO THIS
            END
 
Share this answer
 
v2
Comments
Adding an answer is not a problem. But explaining nothing about the question and answer is not a good habit.

Either explain clearly what was the problem and how you resolved it or just check my answer Solution 1, which is answered as per your comments.

Thanks,
Tadit
I guess you rejected my answer after accepting it by mistake. In that case, please accept it again.

Thanks,
Tadit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900