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 |
|
Abhikerry
Starting Member
4 Posts |
Posted - 2009-06-17 : 15:08:38
|
| I have two tables names AmountTable and TotalAMount table AmountTable have columns sales, amountid,so on.......Totalmount tbale have coloumns PIF,amountid,so on.... I nedd AmountTable /Totalmount values by joining thses two coloumns by using amountidis the common coloumn, please send me the queryThanks.. |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-06-17 : 15:21:25
|
try this:select isNull(at.[sales] / nullif(ta.PIF,0), 0) as [result]from AmountTable as atinner join TotalAMount as ta on ta.amountid = at.amountid Be One with the OptimizerTG |
 |
|
|
|
|
|