Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Amber_Deslaurier
Starting Member
40 Posts |
Posted - 2010-06-19 : 21:42:53
|
| HiI need code to run a simple procedure that excute code after it checks the table to ensure the date in the query is different from the date in the column... this way it wont be duplicate data.Thanks, Amber |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-06-20 : 04:31:29
|
| Try if exists.Something like this.if exists(select * from yourtable where date='yourdate')dosomethingelsedosomethingelseLimitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
dattatreysindol
Starting Member
20 Posts |
Posted - 2010-06-20 : 04:32:18
|
| Hi There - What is your requirement exactly ?If you just want to run a piece of code based on a certain condition, then you can use IF / ELSE clause available in T-SQL to check and execute the code to update the table based on whether the data in the query is different from the data in the column.Hope it helps!Dattatrey Sindolhttp://mytechnobook.blogspot.com/This information is provided "AS IS" with no warranties, and confers no rights. |
 |
|
|
|
|
|