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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query problem????????

Author  Topic 

sweet_777
Starting Member

16 Posts

Posted - 2010-02-04 : 07:50:32
Hi ,

I am using informix sql database.

ucs_changetranh (parent table):
columns: branch ,principal ,customer ,transcd2,transcd3,counter (p.k)
ucs_changetrand (child)
columns:counter(f.k),product ,salgroup,integer,secondary


i need query: for all the columns from ucs_changetranh,ucs_changetrand and i want to compare with other tables like principal,customer,product,pgroup,branch.

i have return query like this:SELECT ucs_changetranh.*, principal.name PrincipalName, branch.name BranchName, customer.name CustomerName, ucs_changetrand.product ProductName, ucs_changetrand.salgroup ProductGroup ,ucs_changetrand.secondary Secondary FROM ucs_changetranh, OUTER principal, OUTER branch, OUTER customer ,OUTER product ,OUTER pgroup ,OUTER ucs_changetrand WHERE ucs_changetranh.counter IS NOT NULL AND principal.principal=ucs_changetranh.principal AND branch.branch=ucs_changetranh.branch AND customer.customer=ucs_changetranh.customer AND product.product=ucs_changetrand.product AND pgroup.salgroup=ucs_changetrand.salgroup AND ucs_changetranh.transcd2 LIKE '%Y%' AND ucs_changetranh.transcd3 LIKE '%Y%' ORDER BY ucs_changetranh.counter.

but i am getting error like this:Error in GetTable - ERROR [HY000] [Informix .NET provider][Informix]A condition in the where clause results in a two-sided outer join.

Regards
sweet_777

Thanks & Regards
Sweet_77

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2010-02-04 : 07:56:55
I'm sorry but this is an ms sql server forum, you're likely to get your questions answered at an informix forum I believe. And another tip when posting in forums: your sql query is very long and completely without indentation and such. You should make it more readable so people woun't have to spend 10 minutes trying to reformat themselves to understand what's going on.

- Lumbago
If the facts don't fit the theory, change the facts. Albert Einstein
Go to Top of Page
   

- Advertisement -