Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: concatenate table alias w parameter in
On Jun 13, 11:11 pm, drd..._at_canoemail.com wrote:
> How can I combine the two or can I??
>
> trying to combine table alias w. and parameter in p_column_in in the
> last AND
>
> (p_column_in IN VARCHAR2,
> p_location_id IN VARCHAR2,
> p_industry_id IN VARCHAR2,
> p_from_current_year IN NUMBER,
> p_to_current_year IN NUMBER,
> p_reporting_type IN NUMBER)
> return NUMBER is SearchTotal Number;
>
> BEGIN
>
> SELECT COUNT(current_year) AS RecordCount INTO SearchTotal
> FROM cpws_work_stoppage w, cpws_location l, cpws_industry i
> WHERE w.location_id IN (p_location_id)
> AND w.location_id = l.location_id
> AND w.industry_id IN (p_industry_id)
> AND w.industry_id = i.industry_id
> AND w.current_year BETWEEN p_from_current_year AND
> p_to_current_year
> AND w.reporting_type_id = p_reporting_type
>
> AND w. || p_column_in is null;
>
> RETURN SearchTotal;
>
> END;
Research Dynamic SQL. There are two forms of it in Oracle, Native
Dynamic SQL and DBMS_SQL. Tons of documentation and examples are
available for both.
Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Received on Wed Jun 13 2007 - 14:24:23 CDT
![]() |
![]() |