Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 9262

create a temp table in Cr?

$
0
0

I have a strange process going and would like to mimic how it works. on the IBM AS400 i have 4 queries going to produce the data set.

1. read the parts master and establish which parts are good as sellable.

2. read the sales summary table and match parts to the first set. Now i have taken these 2 temp tables and created a cr that the user enters

the month and year. for particular report they wanted now i had hard coded the 2 months they wanted to see no sales action on a part.

The CR produces which parts have had sales in the month year passed param, as well as the previous month to the passed. it's a simple matter of checking the 2 months sales buckets and taking when 1 or 2 of them are not 0. so #2 creates a set of parts that sold in the months span requested. #3 query does the unmatched so will give the non sold parts.

 

3. Now is the tricky part. on the server what i did was exception match so that i got a list of those parts that are sellable but did not sell in specified months.

4. Final query simply joins various tables for some static data.

 

now at #3 in crystal, I am thinking I need to create a temp table to then run the exception query. this will work i have tested in sql. the question is

how to make such a temp table or do I out put to a sub report? then i think i can run the exception match in the command of the sub report.

 

 

SELECT                                                          
  ALL T01.IAPRT#, T01.IA101, T01.IAPRLC, T01.IARCC1, T01.IARCC2,
T01.IARCC3, T01.IARCC4, T01.IARCC5, T01.IARCC6, T01.IARCC7,
T01.IARCC8, T01.IARCC9, T01.IARC10, T01.IARC11, T01.IARC12,
T01.IARC13, T01.IARC14, T01.IARC15, T01.IAORDF      
  FROMCBLIB.INVPRT T01 LEFT EXCEPTION JOIN                
CBLIB.SLDPRT T02                                    
  ON  T01.IAPRT# = T02.IAPRT#                              

Viewing all articles
Browse latest Browse all 9262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>