Home » SQL & PL/SQL » SQL & PL/SQL » help
help [message #463] Thu, 14 February 2002 01:27 Go to next message
David
Messages: 110
Registered: November 1998
Senior Member
AREA_C AREA AREA AREA AREA AREA AREA AREA AREA ARE AREA AREA AREA AREA AREA AREA
------ ---- ---- ---- ---- ---- ---- ---- ---- --- ---- ---- ---- ---- ---- ----
VLS 0352 0321 0322 0325 0323 0323 0352 0335 EUR 0352 0327
VFE 0353 0321 0322 0325 0323 0323 0353 0335 EUR 0353 0327
VST 0354 0321 0322 0325 0323 0323 0542 0335 EUR 0354 0327 0559 0557
VBT 0355 0321 0322 0325 0323 0323 0324 0335 EUR 0355 0327 0557

The above is created through a View, but instead of the Area Codes being displayed as numbers I want to see the Areas they actually relate to i.e.
I want the 0557 to show the Area Code as below;

SELECT AREA_CODE
FROM ARSE
WHERE AREA_MIS4_UNIT = '0557';

AREA_C
------
VST

Is there anyway I can alter my view (as below) to incorporate the above select query??

CREATE OR REPLACE VIEW MTEST AS
SELECT AREA_CODE, AREA_UNIT, AREA_CITY_UNIT, AREA_GROUP_UNIT, AREA_CREDIT_UNIT, AREA_GL_UNIT, AREA_LEADCLOSE_UNIT, AREA_BROKER_UNIT,
AREA_TICK_CONF_UNIT, AREA_BASE_CCY, AREA_MIS1_UNIT, AREA_MIS2_UNIT, AREA_MIS3_UNIT, AREA_MIS4_UNIT, AREA_MIS5_UNIT, AREA_MIS6_UNIT
FROM ORD_AREA;

I eventually want to see the above information as;

AREA_C AREA AREA AREA AREA AREA AREA AREA AREA ARE AREA AREA AREA AREA AREA AREA
------ ---- ---- ---- ---- ---- ---- ---- ---- --- ---- ---- ---- ---- ---- ----
VLS VT VGL VGL VCR VCR VCR VRT VGL EUR VP VB VA VST
Re: help [message #465 is a reply to message #463] Thu, 14 February 2002 04:07 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
you have to join the table

here is an example

select ename,dname
from dept,emp
where emp.deptno=dept.deptno;
Previous Topic: unable to delete record
Next Topic: unable to delete record
Goto Forum:
  


Current Time: Fri Mar 29 07:08:24 CDT 2024