"At most one record can be returned by this subquery."

Greyowlsl

Mlak Mlak
Local time
Tomorrow, 02:51
Joined
Oct 4, 2006
Messages
204
Hi i have a query which has the above (thread name) problem coming up when i try to run the query.

The query should display all the products ("product id as on product") where the "product id" = "LS1212" and the "c customer specific" does not = 0.

Attached is an image of the query design and a sample of the 1500 table data.

Thanks for your time.

Kind Regards,
Leon
 

Attachments

  • temp2.jpg
    temp2.jpg
    94.8 KB · Views: 767
  • temp4.jpg
    temp4.jpg
    47.2 KB · Views: 591
A subquery by default can only return one record as it is being used to filter a field essentially with a value. So you can have a query pull what you want but you can't use a subquery in your query to pull more than one record for that field. It can return a DIFFERENT single record for each record in your query but if the subquery itself when run returns more than one record it can't be used as the subquery in a field.

I hope that made sense.

Also, having that third table in your query and not linked is going to create a Cartesian Product, just in case you didn't know.
 
Oh, and having a table with a field for each part is ludicrous (sorry, but I have to state it). That is horrible.
 
Thanks for your reply Bob.

I think I've figured it out now :)

As to you second post, the list in the parts table you saw are the products, the parts are the records and the amount that the part is used is listed under each product.
 
Could you provide a solution as to how to do this better than please?

There is a parts table and a product table
There are around 500 different parts, and around 50 different products.
I need to know how much of each part is used in each product.
Whats the best way to do this?
 
Ok, but my antivirus software (Avira Pro) has that site listed as a reported attack page ("Part of this site was listed for suspicious activity 2 time(s) over the past 90 days."), not sure if should visit it, but I'm guessing since you work at a large bank you would have far better antivirus protection and would know if its safe right?

For the moment the current database works, and we are doing a full restructuring of our business and computer systems in 6-8 months time, i will take a look at it then.
 
It was fine for me but just in case for you - here's the image from there:
conceptual_bom.gif
 
I'm getting a similar warning to Greyowlsl.

attachment.php
 

Attachments

  • Warning.PNG
    Warning.PNG
    30.7 KB · Views: 7,732
Strange. I accessed it from work and have had no problem from home either. We have Symantic AV here at work and I use AVG Free at home. Could it be another AV program has it tagged incorrectly, or maybe there was something in the past which caused it to be flagged for them. Weird.
 
I remember trying it from home where I run McAfee on one of my laptops and I had the same problem. This is quite recent.
 

Users who are viewing this thread

Back
Top Bottom