![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I've got a query that was working fine previously. Now I'm having problems with the output. The query is below. The problem is that the behavior name isn't being displayed. The output I'm getting is actually small boxes like ascii ones for that field. I'm linking to the database through Powerbuilder, but in both PB and Access I'm getting the same problem. SELECT behavior.Behavior_Name, safety_level.Safety_Level_Description, Count(observation.Observation_Id) AS CountOfObservation_Id FROM safety_level, observation, behavior, card WHERE (((safety_level.Safety_Level_Id)=[observation].[safety_level_id]) AND ((observation.Behavior_Id)=[behavior].[behavior_id]) AND ((observation.Card_Id)=[card].[card_id])) GROUP BY behavior.Behavior_Name, safety_level.Safety_Level_Description; I've deleted about 400 records from the observation table and then I get the data correctly. There's only about 3000 records in the table, so I can't imagine there would be a problem with the amount of data in there. TIA Dillon Andersen |
#3
| |||
| |||
|
|
Given the size of the database, my guess is that you may have a query optimization problem. Try changing the order of the tables listed in the FROM section and the order of conditions listed in the WHERE section. The idea is to minimize the size of internal temporary tables created by Access as it processes your query. Not knowing the relationships between your tables, I would be hard-pressed to offer a specific suggestion. See Access reference materials relating to order of precedence to get a better idea of the specifics of what to change. In general, in cases of one-to-many relationships, the table on the "one" side of the relationship should be listed first. Roxann Higuera dillon_andersen (AT) nospamhotmail (DOT) com (D Andersen) wrote in message news:<3f6f33e6.238866121 (AT) news (DOT) telusplanet.net>... Hi, I've got a query that was working fine previously. Now I'm having problems with the output. The query is below. The problem is that the behavior name isn't being displayed. The output I'm getting is actually small boxes like ascii ones for that field. I'm linking to the database through Powerbuilder, but in both PB and Access I'm getting the same problem. SELECT behavior.Behavior_Name, safety_level.Safety_Level_Description, Count(observation.Observation_Id) AS CountOfObservation_Id FROM safety_level, observation, behavior, card WHERE (((safety_level.Safety_Level_Id)=[observation].[safety_level_id]) AND ((observation.Behavior_Id)=[behavior].[behavior_id]) AND ((observation.Card_Id)=[card].[card_id])) GROUP BY behavior.Behavior_Name, safety_level.Safety_Level_Description; I've deleted about 400 records from the observation table and then I get the data correctly. There's only about 3000 records in the table, so I can't imagine there would be a problem with the amount of data in there. TIA Dillon Andersen |
![]() |
| Thread Tools | |
| Display Modes | |
| |