Answered by:
Subtract one table from another

Question
-
Hi, I have one column ,created from inner joins on many table and same thing is for other column(ie it is also created by many tables)
Like- select amt,date from table1 and select amt1,date1 from table2 now i want to subtract row wise record from table1 to table2.
I dont know how to find this.
Please help.
Thanks in advance.
Best Regards, Mithran.- Changed type KJian_ Saturday, February 4, 2012 6:08 AM
Friday, February 3, 2012 5:22 PM
Answers
-
-
Hi MithranM,
You can also use the NOT IN to return rows from one query that are not included in the other query, please see
http://blog.sqlauthority.com/2007/05/22/sql-server-2005-comparison-except-operator-vs-not-in/
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Get or Request Code Sample from Microsoft
If you have any feedback, please tell us.- Marked as answer by KJian_ Thursday, February 9, 2012 3:28 AM
Monday, February 6, 2012 6:03 AM
All replies
-
-
Hi MithranM,
You can also use the NOT IN to return rows from one query that are not included in the other query, please see
http://blog.sqlauthority.com/2007/05/22/sql-server-2005-comparison-except-operator-vs-not-in/
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Get or Request Code Sample from Microsoft
If you have any feedback, please tell us.- Marked as answer by KJian_ Thursday, February 9, 2012 3:28 AM
Monday, February 6, 2012 6:03 AM -
Hi,
I did this using a temp table by stored procedure.
Many thank to all.
Regards,
Mithran.
Best Regards, Mithran.
Friday, April 13, 2012 1:48 PM