Microsoft
Software
Hardware
Network
Question : SQL Query using SQL Plus in Oracle 10g
Hi,
I am running following query in sql plus:
set colsep ',' pagesize 0 trimspool on feedback off echo off
spool sample.csv
SELECT ip.first_name|| ',' ||ip.last_name|| ',' ||ipd.loginuid|| ',' ||sd.name|| ',' ||atk.serial_number|| ',' ||atk.token_type|| ',' ||to_char(atk.token_shutdo
wn_date,'M
M-DD-YYYY'
)
FROM rsa_rep.ims_principal ip,
rsa_rep.ims_principal_data
ipd,
rsa_rep.am_token atk,
rsa_batchrep.am_token_oob ato,
rsa_rep.ims_identity_sourc
e isrc,
rsa_rep.ims_security_domai
n sd
WHERE ipd.id = atk.principal_id
AND ipd.identity_src_id=isrc.i
d
AND atk.id = ato.am_token_id
AND ipd.owner_id = sd.id
AND ipd.identity_src_key = ip.id(+);
spool off
The output i am getting is attached as sample.csv.
Now my question is as follows:
I want to pull out the group name of the user in this query. It is stored in probably in IMS_PRINCIPAL_GROUP and this table is linked to IMS_GROUP or IMS_GROUP_DATA. (Please refer to attached Database Schema html page. I am having hard time to establish proper relationship between this tables. I tried some modification in above query which are as follows:
SELECT ip.first_name|| ',' ||ip.last_name|| ',' ||ipd.loginuid|| ',' ||sd.name|| ',' ||atk.serial_number|| ',' ||atk.token_type|| ',' ||gd.name|| ',' ||to_char(atk.token_shutdo
wn_date,'M
M-DD-YYYY'
)
FROM rsa_rep.ims_principal ip,
rsa_rep.ims_principal_data
ipd,
rsa_rep.am_token atk,
rsa_batchrep.am_token_oob ato,
rsa_rep.ims_identity_sourc
e isrc,
rsa_rep.ims_security_domai
n sd,
rsa_rep.ims_group gd,
rsa_rep.ims_group_data gdd,
rsa_rep.ims_principal_grou
p gds
WHERE ipd.id = atk.principal_id
AND ipd.identity_src_id=isrc.i
d
AND atk.id = ato.am_token_id
AND ipd.owner_id = sd.id
AND ipd.identity_src_key = gds.principal_id
AND gds.group_id = gd.id
AND ipd.identity_src_key = ip.id(+);
But the result is 0 rows. I am pretty sure i am doing something wrong in relationship part of query. Can you please help me...
Attachments:
sample.csv
(768 bytes)
(File Type Details)
Output of Original Query in CSV format
am-database-schema.html
(150 KB)
(File Type Details)
Database Schema Document
Answer : SQL Query using SQL Plus in Oracle 10g
version 9.14 of the IOS is absolutely obsolete (it was already in decline when I started working on cisco devices, 15 years ago). anyway, the current configuration can be displayed with
write terminal
and the startup config can be loaded with
config mem
write terminal
Try to use hyperterminal with flowcontrol "hardware or "CTS/RTS"
Random Solutions
OCS 2007 R2 and Cisco call manager
Terminal server 2008 R2 Pinned Taskbar Links
Move applications between networked computers
Windows Update Error on Hyper-V guest on a HP Proliant ML370 G6 (NC375i network card)
Select All Columns Count Column Group By Only One Column?
Windows 7 recently used programs is blank
why can't autocomplete after div is loaded via ajax when autocomplete is in the div box
SpellNumber
Can't Figure Out How to Turn Off PHP Display Errors
SQL query on a financial reporting table