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 |
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2009-09-01 : 07:21:49
|
| Dear All,I tried following queary but it is giveing following error,Error:An expression of non-boolean type specified in a context where a condition is expected, near 'x'.Queary:UPDATE T_BANK_IMPORT_BISET FLEXI_2 = 'M' where (SELECT sum(cast(Amount as decimal(18,2))) as CHANN_AMOUNT,PK_CH_SCHEME_ID FROM T_CD_IMPORT WHERE TRADE_DATE = '4/13/2009' AND cast(AMOUNT as decimal(18,2)) <>0 and flexi_2 IS NULLgroup by PK_CH_SCHEME_IDintersect SELECT sum(cast(CREDITS as decimal(18,2))) as BANK_CREDIT,PK_SCHEME_ID FROM T_BANK_IMPORT_BI WHERE DATE = '4/13/2009' AND cast(CREDITS as decimal(18,2)) <>0 and flexi_2 IS NULL group by PK_SCHEME_ID) x thnksharish |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2009-09-01 : 07:25:07
|
| Not sure what you want to achive. Could you please elaborate on that?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
ra.shinde
Posting Yak Master
103 Posts |
Posted - 2009-09-01 : 08:04:38
|
| UPDATE T_BANK_IMPORT_BISET FLEXI_2 = 'M' where EXISTS(SELECT sum(cast(Amount as decimal(18,2))) as CHANN_AMOUNT,PK_CH_SCHEME_ID FROM T_CD_IMPORT WHERE TRADE_DATE = '4/13/2009' AND cast(AMOUNT as decimal(18,2)) <>0 and flexi_2 IS NULLgroup by PK_CH_SCHEME_IDintersect SELECT sum(cast(CREDITS as decimal(18,2))) as BANK_CREDIT,PK_SCHEME_ID FROM T_BANK_IMPORT_BI WHERE DATE = '4/13/2009' AND cast(CREDITS as decimal(18,2)) <>0 and flexi_2 IS NULL group by PK_SCHEME_ID)Rahul Shinde |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 06:09:01
|
| isnt this similar tohttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=132117 |
 |
|
|
|
|
|
|
|