Question : Where to/ How to access variables Oracle PLSQL

Take a look
at code snippet
Like The above two sets in code  i have ten more..

Once the variables x,y,z etc are populated I need to sum thema nd depeing on a condition i have to display a message

Ex:

IF (x+y+z) > 10
..some SQL.....
ELSE
..SOME SQL....

How do i do that ?
My problem is when i add

PRINT x+1; or
PRINT x; or
SELECT (y+10);

Jsut ot see if x is being populated or not.. BUT it throws errors like

If i add SELECT x with in BEGIN and END

[1]: (Error): ORA-06550: line 7, column 4: PL/SQL: ORA-00923: FROM keyword not found where expected ORA-06550: line 6, column 1: PL/SQL: SQL Statement ignored ORA-06550: line 7, column 4: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted de

If i add SELECT x; with in BEGIN and END

[1]: (Error): ORA-06550: line 6, column 9: PL/SQL: ORA-00923: FROM keyword not found where expected ORA-06550: line 6, column 1: PL/SQL: SQL Statement ignored

f i add them after END;

[1]: (Error): ORA-06550: line 8, column 1: PLS-00103: Encountered the symbol "SELECT"

f i use PRINT

It says SQL statement ignored.
Do i have to put them all into a PROC or Package ?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
DECLARE x NUMBER(5);
BEGIN
SELECT count(a.sales_id) INTO x
FROM Saales.Sales_managers a JOIN Sales.Sales_master b on a.sales_id = b.Sales_id
WHERE to_date(a.add_date) > sysdate - 1;
END;

DECLARE y NUMBER(5);
BEGIN
SELECT count(a.sales_id) INTO y
FROM Saales.Sales_managers a JOIN Sales.Sales_master b on a.sales_id = b.Sales_id
WHERE to_date(a.mod_date) > sysdate - 1;
END;

Answer : Where to/ How to access variables Oracle PLSQL

I would remove the old drivers and install new ones for Video, chipset and anything else relevant.

apparently the hardware is different enough to cause issues.

also check the device manger

 I hope this helps !
Random Solutions  
 
programming4us programming4us