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 |
|
veerapureddy
Starting Member
4 Posts |
Posted - 2008-03-11 : 02:55:46
|
| Hi i given my query here. in that joings betweens tables is correct, but i am getting the following errorora-00933 sql command not properly endedcan we have exists function inside if condition??select distinct loc.authorization from account acct, location loc, iom_order iomwhere loc.location_id = acct.location_id and acct.account_id = iom.account_id and iom.iom_order_id =140if(loc.authorization is null and exists(select distinct line.INTRALATA_PIC_FREEZE ,line.INTERLATA_PIC_FREEZE from line line, iom_order iom, activity act where ((line.INTRALATA_PIC_FREEZE='F' or line.INTERLATA_PIC_FREEZE='F')and line.line_id = act.component_id and act.component = 23 and act.iom_order_id = 140) union allselect distinct trunk.INTRALATA_PIC_FREEZE ,trunk.INTERLATA_PIC_FREEZE from trunk trunk, activity act where ( (trunk.INTRALATA_PIC_FREEZE='F' or trunk.INTERLATA_PIC_FREEZE='F')andtrunk.trunk_id = act.component_id and act.component = 25 and act.iom_order_id = 140)select distinct rcf.INTRALATA_PIC_FREEZE ,rcf.INTERLATA_PIC_FREEZE from remote_call_fwd rcf, activity act where((rcf.INTRALATA_PIC_FREEZE='F' or rcf.INTERLATA_PIC_FREEZE='F')and rcf.remote_call_fwd_id = act.component_id and act.component = 24 and act.iom_order_id = 140)select distinct tsg.INTRALATA_PIC_FREEZE ,tsg.INTERLATA_PIC_FREEZE from nodal_tsg tsg, activity act where ((tsg..INTRALATA_PIC_FREEZE='F' or tsg.INTERLATA_PIC_FREEZE='F')and tsg.nodal_tsg_id = act.component_id and act.component = 5 and act.iom_order_id = 140))) Thenselect distinct loc.authorization from order2misc o2m, location loc, iom_order iom where loc.location_id = o2m.serv_loc_id and iom.iom_order_id =140elseselect distinct loc.authorization from account acct, location loc, iom_order iomwhere loc.location_id = acct.location_id and acct.account_id = iom.account_id and iom.iom_order_id =140end if; |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-03-11 : 02:59:10
|
This is a Microsoft SQL Server forum. Please post Oracle related in dbforums.com or in oracle.com KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|
|
|