can't save modified query

  • Thread starter Thread starter Phil Smith
  • Start date Start date
P

Phil Smith

I have this query:

SELECT item_types.name AS Type, SellableItemsList.item_id,
item.short_desc, IsNull([PriceListDistributor]![price]) AS Blank
FROM item_types INNER JOIN (item INNER JOIN (SellableItemsList LEFT JOIN
PriceListDistributor ON SellableItemsList.item_id =
PriceListDistributor.item_id) ON item.item_id =
SellableItemsList.item_id) ON item_types.type_id = item.item_type
WHERE (((PriceListDistributor.price) Is Null Or
(PriceListDistributor.price)=0))
ORDER BY item_types.name, item.short_desc;


I try to simplify it by removing two tables, and I get:

SELECT SellableItemsList.item_id, IsNull([PriceListDistributor]![price])
AS Blank
FROM SellableItemsList LEFT JOIN PriceListDistributor ON
SellableItemsList.item_id = PriceListDistributor.item_id
WHERE (((PriceListDistributor.price) Is Null Or
(PriceListDistributor.price)=0));

I choose save as, give it my new name,
"PriceListMissingDistributorforAdd," hit OK, and Access crashes out.
Before you jump to the "Corrupted" conclusion, I created a brand new
database, imported everything from the original, with the same results
when I makes this change to that query.

acess 2007.

Phil
 
1. I still wouldn't discount the corruption issue. Export the table data as
Excel or CSV then import it into a new database. Then try running it.

2. If that still crashes things, I'd simplify the statement unti it doesn't
crash. For starters I'd get rid of the WHERE clause. If it still crashes, I'd
remove the "AS Blank" and let Access name it. After that I'd remove the
IsNull in the Select.
 
I will try it, but it is already simpler then before, and that one works.
PLus the table data is all in an MYSQL database, and is definitely not
corrupt.
....
 
Back
Top