Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting a subset of data from a table 1

Status
Not open for further replies.

Stahr627

Technical User
Sep 21, 2000
22
US
(This is concerning a Bridal Registry)
I have a table of pattern names of dinnerware. The company sends me a list of discontinued patterns. I then create a report to pull the names of the bridal registrants who have selected those particular patterns in order to mail them a notification that the pattern is being discontinued. The field in the report has all the patterns listed. I need to filter out the discontinued patterns first? I need to create a separate table of the discontinued patterns, in Access, and then use it as a field?
Thanks!
Gail

Gail Dengler
GDengler@boscovs.com
 
You should already have a table of patterns that links to the brides in your report. I see two choices:

1) You can manually mark in the existing patterns table that the listed patterns are discontinued, using a field in that table. Then use this field as your select field. I would do this if the list of patterns was short.

2) You can create a new table from the list of dis. patterns, and link this to the main pattern table in the report. The trick will be making sure that the new table links exactly to the existing table. Once linked you can use any field in the newest table to only print dis. patterns.

Of course, you may want to have these patterns marked as dis. in the existing table anyway. This can also be done manually, or by creating a table and running an update query to mark these records Dis. in the original table. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
I should have been clearer in my original posting, Ken, the tables are from a DB2 database. I mentioned Access as a possible way to create a separate table of discontinued patterns. I do not have a lot of experience under my belt with Crystal, so I really am not sure if I can create a discontinued patterns table from the main patterns table, in Crystal.


Gail Dengler
GDengler@boscovs.com
 
You won't be creating any tables in Crystal. If you create a table you would use Access to create it. You could then link this table to the existing tables in the report.

You are probably reading DB2 via ODBC. You can connect to the original two tables via ODBC and also connect to the New table that you would create in Access (probably also via ODBC). However, getting tables to link across platforms is not always easy.

The easiest thing might be to manually mark the Dis. patterns in the exiting tables of the DB2 database.

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Thanks for the great help, Ken! I intend to try the solution tomorrow.

Gail Dengler
GDengler@boscovs.com
 
How would I go about marking the discontinued patterns in the existing table in the DB2 database?

Gail Dengler
GDengler@boscovs.com
 
I am assuming that you have access to the pattern records table and can make changes to them.

You might have a field in the table that indicates active or discontinued patterns, but by your question I assume that you don't.
If there is any field in the table that you are not currently using you could simply put a character in that field for any pattern on your discontinued list. You can then add this field to your select criteria in the report. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
You are amazing, and also my hero!
Gail

Gail Dengler
GDengler@boscovs.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top