Although we can’t make the above query into a database view, we can incorporate it into a stored procedure that returns a result set and then feed that stored procedure into Crystal no differently than we would feed a query based on views or tables.
Since stored procedures are so different between Oracle and SQLServer, we’ll first show you how to use a stored procedure in Crystal, given that it is already created.
This is the person’s base rate prior to any increase during that period.
So, if we can feed this query into Crystal, the report will be very simple.
To do this, our general procedure is to turn complex queries into database views.
The whole point of this article is to show options when the SQL gets too complicated.) Here it is.
Although the above is slightly more than a simple “SELECT * FROM emprate” (ha, ha), it not only gets us the data we want, but also does all of the summarizing and ordering.
This way, we retain the underlying security built into emp_pay_rates.
(Note that in the below query, we use emprate instead of emp_pay_rates when we do self-joins.
In our example, the first thing we do is replace the above tables with their corresponding secured views.
However, there is no need to combine multiple complex views in our report since we don’t really need any information in empcomp other than the distribution_code and we really don’t need any information in tbldist other than the distribution name.
It is important to ensure the firmware on your NA400 is up to date and compatible with the version of Net Station you are also running.