Our demographic table is obnoxiously formatted. It basically has three important fields: Client_Name, Data_ID, and Data_Value. The Data_Value field has all the demographic info- phone numbers, contact names, address, zip codes. Each type of data is identified in the Data_ID field by a number. For example, every phone number in the Data_Value field is identified in the Data_ID field by a 9; each Zip Code by an 8, and so on. This produces a table where every 9 records is associated with a client- records 1-9 belong to Client A, 10-18 belong to Client B, and so on.
I've got an account balance reporot that I want have show the client name, phone number, contact name, and balance. I can SELECT Data_Value WHERE Data_ID = 9 to get phone numbers by placing a column that shows the Data_Value. But, if I SELECT Data_Value WHERE Data_ID = 9 or Data_ID = 2 I get two records for each client. I want to have a seperate column for each phone number and for each contact name.
In short, I want this:
------------------------------------------
Client | Contact | Phone# | Balance |
-----------------------------------------
Client A | Joe | 123-4567 | $132.00 |
-----------------------------------------
Client B | Bob | 674-7465 | $784.00 |
------------------------------------------
But what I get, is this:
----------------------------------
Client | Data_Value | Balance |
----------------------------------
Client A | Joe | $132.00 |
----------------------------------
Client A | 123-4567 | $123.00 |
----------------------------------
Client B | Bob | $784.00 |
----------------------------------
Client B | 674-7465 | $784.00 |
----------------------------------
Does anyone have any ideas on formulas to try to basically trick CR into thinking each Data_ID is a different field? I really appreciate anyone helping out. Sorry it's long and probably confusing,
dylan
CR 8.5
Pervasive SQL, ODBC
I've got an account balance reporot that I want have show the client name, phone number, contact name, and balance. I can SELECT Data_Value WHERE Data_ID = 9 to get phone numbers by placing a column that shows the Data_Value. But, if I SELECT Data_Value WHERE Data_ID = 9 or Data_ID = 2 I get two records for each client. I want to have a seperate column for each phone number and for each contact name.
In short, I want this:
------------------------------------------
Client | Contact | Phone# | Balance |
-----------------------------------------
Client A | Joe | 123-4567 | $132.00 |
-----------------------------------------
Client B | Bob | 674-7465 | $784.00 |
------------------------------------------
But what I get, is this:
----------------------------------
Client | Data_Value | Balance |
----------------------------------
Client A | Joe | $132.00 |
----------------------------------
Client A | 123-4567 | $123.00 |
----------------------------------
Client B | Bob | $784.00 |
----------------------------------
Client B | 674-7465 | $784.00 |
----------------------------------
Does anyone have any ideas on formulas to try to basically trick CR into thinking each Data_ID is a different field? I really appreciate anyone helping out. Sorry it's long and probably confusing,
dylan
CR 8.5
Pervasive SQL, ODBC