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
DataList - need dynamic ImageUrl for an <asp:Image> tag
A servlet to handle and ajax get request?
ID File Creation in Lotus notes
Disabling software restriction policy
Having a webservice use a Session variable that is set in the project before the webservice is called.
RHEL How to set the IP addy in KNOME or command line
"File Helper" reporting - Your system may have upopenable files - Why?
SSH console: go to specified folder after login
OMA and OWA
How would I edit the code for additional levels from: How can I prep text files for import into Excel that are in subheading formats?