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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lot of info into one cell

Status
Not open for further replies.

jrp

Technical User
Feb 27, 2000
9
0
0
US
I have film information on one table, and cast information on another. tha Cast table has a MOVIE_ID, NAME_OF_PERSON and JOB_IN FILM. the MOVIE_ID is used to link the Cast table with the Film table. I want to get a result table with a specific film information and it's cast. I can't figure out a way to do it. I get a table, with the desired film info on every row, and a different cast member on the CAST colum. I don't know if it's posible, but I would like to put ALL the Jobs AND Cast Members of a specific movie in ONE cell.<br>Please let me know if you know of&nbsp;&nbsp;a way.
 
I don't know your particular application (or even what a Cell is).&nbsp;&nbsp;But, when you relate the two tables in a single Query you will get the results you have been getting (i.e., the File information will be duplicated.) No way around it. <br>What your application needs to have is a parent-child query structure.&nbsp;&nbsp;For each row returned from the Film table, another query needs to be applied against the Cast table using the movie_Id in the WHERE clause of the cast table.<br><br>&nbsp;
 
Assuming that you are using access... first ensure that your relationships are set up properly in the relationship window - including integrity and join types. Because you appear to be new to Queries, I suggest you use a query wizard for the first few queries, then open them in design view to see what it has done for you. As the last response to your message said; you cannot get around the duplicates in the query. It sounds like you are trying to display this query as output (like a report). That is a no-no. You should use a report to display results. With a report, you can hide the duplicates and it is more professional. If you really want to clump the results of several fields into one field, you can create an expression field in the query or reports like so: <br><br>(Query example) Expr1: [field1] & &quot; &quot; & [field2] & &quot; &quot; & [field3]<br><br>(Report example) = [field1] & &quot; &quot; & [field2] & &quot; &quot; & [field3]<br><br>Your question is kind of hard to follow but I hope that helps a bit. Also look in the help files on sub-quries and union queries...<br>CCTC1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top