Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trying to write a Crystal Report based on following

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-20 : 09:14:59
Tony writes "SELECT l.product_group_id, l.qty_on_hand, m.item_id , m.item_desc
FROM inv_mast m , inv_loc l
WHERE m.inv_mast_uid = l.inv_mast_uid
AND l.qty_on_hand > 0
AND m.inv_mast_uid NOT IN
(SELECT DISTINCT i.inv_mast_uid
FROM invoice_line i
WHERE i.inv_mast_uid IS NOT NULL
AND date_created > (current_timestamp - 365))
ORDER BY l.product_group_id

This works through Query Analyzer but not through Crystal.
I am trying to get an idea on stock that has not been sold in over a year. I realize this might be outside your limitations but appreciate any help I can get.

Thank you
Tony Sergi"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-20 : 09:21:22
I vaguely remember reading a post in the SQL Team forums about Crystal Reports not liking subqueries, but I can't find it now. If you wrap up the query into a stored procedure you should be able to use it instead.

Use the forum search feature and try searching for "crystal reports" as a complete phrase, you'll find a number of posts that describe how to do it.

Go to Top of Page
   

- Advertisement -