[SQL] Max Columns in a SQL Select

2004-05-17 Thread PS PS
SQL Guru's, Does anyone know what is the Column Limit in a SQL Query in Oracle RDB version 7.1? I've about 200 columns in my SQL query. Each column is a computed column -- Case when a = b Then c Else 0 End. It gives me a runtime error -- abnormal program termination -- upon execution. Than

[SQL] One-2-many relation - need distinct counts

2003-08-26 Thread PS PS
Hi gurus, I have table A, B and need a distinct count of Accounts from A. There is a one-2-many relation between A and B. Accounts # in A are all unique. However, in B there will be duplicates. So the problem I have is, when I join as follows: Select Count(Distinct(account_no)) from A, B whe