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

Cannot copy entire SQL query

Status
Not open for further replies.

Joe1010

Programmer
Dec 11, 2006
49
US
Currently I do not have access to create views. I can only create reports.

My first table has a status field for discontinued items. (It is a text field)

My second table also has all items with more details, but it does not have the status field. I would like to display the information from the second table only for items with status in the first table is <> Y

My problem is that for this report, I must use a combination of 2 fields as the primary key in both tables in order to link it.

I created a report for table one and added a formula field where it combines the 2 fields into one.

When I go to “Show SQL query” it does not include the formula field, so I can not paste it into the Add Command on the second report.

Any idea?

I hope I have explained my situation clear enough. If not please let me know.

Thank you
Joe
 
You should create the entire SQL as an Add Command, you don't need a second report.

It also doesn't make sense that you need to concatenate 2 fields to create one for both tables, just join by both fields and it's the same, so you're probably not explaining this fully.

At any rate, use SQL to create the join fields and do everything in the Add Command.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top