One sequence for multiple lookup tables?
I am sorry if this is off-topic, however can anybody advise what is better - use one sequence for all tables (lookup tables) or to create unique sequence for each table?
Thanks
DanielD
Daniel,
After you read this (http://asktom.oracle.com/pls/ask/f?p=4950:8:::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2985886242221,), you may be sorry you asked.
Scott
Similar Messages
-
Can i install itunes multiple times on one computer for multiple users?
Can i install itunes multiple times on one computer for multiple users?
Like most applications you only need to install it once for it to be available to all users. (That said it is possible to install an application and only make it available to the current user, but that's rarely needed.)
tt2 -
How to create one delivery for multiple sales order
Hi!! Friends,
Can some one explain the steps to be followed in creating one delivery for multiple sales order in SAP SD.
Regards
AKASH
Message was edited by:
AKASH TAMBIHi.,
You can combine different orders in to one delivery ,But for the customer Order combination should be checked in the sales area data of the shipping tab,we can combine orders but the ship to party,Route,Inco terms,Shipping date,shipping point should be same,you can do in T.code VL04 & VL10
REWARD if helpfull
Thanks & Regards
Narayana -
How to create one TO for multiple TRs
Dear All,
how to create one TO for multiple TRs, kindly suggest me
Regards,
baluAs for your question: it is discussed in sAP online help:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/c6/f841f24afa11d182b90000e829fbfe/frameset.htm
Sorry I misunderstood your question.
The above mentioned solution won't create one single TO from multiple TR.
Edited by: Csaba Szommer on Aug 11, 2010 9:46 AM -
One TPV for multiple Countries
Hi Experts,
Could you pls share experirnce/knowledge around having one TPV for multiple countries together. The scenario is like below:
1. There are mutiple Countries in Central America which are small islands for whom we need to roll out the Travel and Expense Solution.
2. The Company code is only one which contains employees from all these Countries.
Could you tell us how can we do the setup. Should we create one TPV at the company code level. OR should we rather use some other criteria for selecting the TPV maybe at the Personnel area or Personnel Sub Area level.
Your help is much appreciated.
Regards,
VijayHi Kiron,
These things I am aware about too. My real question is if I create only one TPV for the company code and assign the Country of the Company code then what issues would this cause. To name a few pls see below.
1) The domestic Country would always be the Company code Country so would be treated as Domestic Country and show on the Form also as domestic Country even for the employees who are from other Countries.
2) There are setting which SAP allows differently for Domestic and International like per diem, miles cumulations. So these necessarily have to be kept as same even though local laws are different in all these countries as Domestic is only the Company code Country.
So I need detailed analysis of what impact I will have by having only one TPV as against making many TPV like one for each Country by using some other parameter like Personnel area/Personnel sub area etc.
Appreciate your help!
Regards,
Vijay -
One invoice for multiple deliveries
Hi Gurus,
Can any one tell how can i create one invoice for multiple deliveries.
Regards,
Vinodone invoice for multiple delivers we can do in vf04
we can do in vf04
reward points if it is help ful
Thanks
mubeen
Edited by: mahammad mubeen on Mar 5, 2008 10:02 AM -
One cheque for multiple vendors
hi,
is it possible to generate one cheque for multiple vendors ?
cheque will be sent to bank and bank will deposit the amounts into vendor banks.
Can you anybody help me?
regards,
kalyanHi
Yes. you can do it
First transfer the amount to bank and from there bank will transfer the amount to respective vendors through ther banks.
Go for implementing automatic payment programme according to your client reqyuirement. Check TCode F110 which is master transaction for APP. Check at TCode F110-Environment-maintain Config.....
Cheers
Srinivas -
One lockbox for multiple company codes
Is it possible to have one lockbox for multiple company codes?
No, I don't think so. Lockbox is 1:1 for a Company Code.
You configure Lockbox for a Company Code.
You can use one of the 2 available Lockbox user exits (not sure which) to write a piece of code that searches invoices against the customer posted to different company codes. You will have to have the intercompany setups.
You may find an OSS notes for intercompany clearing.
Hope this helps! -
One delivery for multiple STO's
Folks,
I have multiple STO's for the same ship-to (plant). Items due for shipping would need to be combined into 1 delivery and not 1 delivery per STO.
Would this be possible? And if yes, how?
Thanks,
MZHi ,
Yes , We can create one delivery for multiple PO's .
Go to VL10D tcode --> Purchase order tab -- > enter the STO's and press execute
Select the STO's and click on background tab. Then it creates the log
Select the item again and press shift +F4
It will gives the log inforamation for the STO's and select the item and press on documents tab.
It will creates only one Delivery for all the STO's.
Now go to VL02N tcode and enter the delivery number then goto picking tab then enter picking qnty = delivery qnty
then press on " post goods issue "
Now go to MIGO to do the goods reciept then enter all the STO's here and check the item then save .
Only one document will be posted for all the STO's
Regards,
Usha. -
One OCS for multiple Company´s ???
Hello,
It´s possible to install multiple "areas" on one OCS? We want to provide a OCS for our customers. They shouldn´t see other caledars or adress-book. Only ther own "area".
KR
MathiasHi ,
Yes , We can create one delivery for multiple PO's .
Go to VL10D tcode --> Purchase order tab -- > enter the STO's and press execute
Select the STO's and click on background tab. Then it creates the log
Select the item again and press shift +F4
It will gives the log inforamation for the STO's and select the item and press on documents tab.
It will creates only one Delivery for all the STO's.
Now go to VL02N tcode and enter the delivery number then goto picking tab then enter picking qnty = delivery qnty
then press on " post goods issue "
Now go to MIGO to do the goods reciept then enter all the STO's here and check the item then save .
Only one document will be posted for all the STO's
Regards,
Usha. -
One inventory for multiple ORACLE_HOMEs ?
RDBMS version:11.2, 10.2
Platform : AIX
In one server , we are going to install multiple ORACLE_HOMEs (both 10.2 and 11.2). I have been asked to configure separate inventory for each ORACLE_HOME (each inventory within its own ORACLE_HOME). But i came across OTN posts which advices one inventory for all ORACLE_HOMEs .
1. How can i create 1 inventory for all ORACLE_HOMEs . Is it by specifying an inventory directory outside all ORACLE_HOMEs in OUI when you do the very first installation ?
2. Which one is more professional : one inventory for each ORACLE_HOME or one inventory for all ORACLE_HOMEs ?When installing Oracle software for the first time, the OUI will create a "global" inventory under $ORACLE_BASE.
Depending on you OS, to locate this inventory look at "/etc/oraInst.loc" (AIX+Others) or "/var/opt/oracle/oraInst.loc" (Linux+others).
You can add/remove Oracle homes from this inventory by using OUI or command line ./runInstaller.
Each Oracle home may also contain an "$ORACLE_HOME/oraInst.loc" file.
HTH
PS: +"One inventory for multiple ORACLE_HOME is a bad practice"+ -- Untrue. Perhaps only for those that don't know how to use it.
:p -
Shall I use one datasource for multiple connection pool?
Hi,
I need to clarrify that, Shall I use one Datasource for multiple connection pool in distributed transaction?
Thanks with regards
SureshNo. If its transactions across multiple databases you should use different datasources.
-
How to schedule one report for multiple company code?
How you can schedule reports in BW 3.5? Suppose I need to schedule one report for multiple company code, how can you do that and notify the users? I do not want to send multiple emails to the same user if the report runs for 20 times (for 20 different companies).
points are given for ASAP replies.
Thanks in advance
PeterDear Peter,
Try to restrict the Company Code with those 20 values and schedule.
Regards,
Ramkumar. -
ALV for one header and multiple item table
Hello All,
I have a requirement to display records from one header and three item table using ALV.
The output should be such that
1-line - record from header table
followed by - records from the 1st item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
followed by - records from 2nd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
followed by - record from 3rd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
Can you help me out.
Thanks and regards,
Subramanian.hi
data population is same for alv or normal reporting.
First you select the data from header
select from item data using for all entries in it_header where....
select item 2
selct item 3
loop a it_header
read item1
read item2
read item3
check sy-subrc
move to i_final
then build fieldcatalog and display..
look the example
SELECT PERNR
STELL
WERKS
ABKRS
ENAME
ENDDA
BEGDA
ORGEH
PERSG
PERSK
KOSTL
FROM PA0001
INTO TABLE I_PA0001
WHERE PERNR IN S_PERNR
AND ABKRS IN S_ABKRS
AND PERSG IN S_PERSG.
SELECT SPRSL
STELL
ENDDA
STLTX
FROM T513S
INTO TABLE I_T513S
FOR ALL ENTRIES IN I_PA0001
WHERE STELL = I_PA0001-STELL AND SPRSL = 'EN'.
SELECT PERSA
NAME1
FROM T500P
INTO TABLE I_T500P
FOR ALL ENTRIES IN I_PA0001
WHERE PERSA EQ I_PA0001-WERKS.
LOOP AT I_PA0001 .
READ TABLE I_T513S INTO WA_T513S WITH KEY STELL = WA_PA0001-STELL
SPRSL = 'EN'
ENDDA = WA_PA0001-ENDDA.
IF SY-SUBRC IS INITIAL.
MOVE WA_T513S-STLTX TO WA_FINAL-STLTX.
ENDIF.
V_SNO = V_SNO + 1.
Read Value For Personal area Text.
READ TABLE I_T500P INTO WA_T500P WITH KEY
PERSA = WA_PA0001-WERKS.
IF SY-SUBRC EQ 0.
MOVE WA_T500P-NAME1 TO WA_FINAL-NAME1.
ENDIF.
FORM DISPLAY_DATA .
--BUILDING FIELD CATALOG--
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = V_REPID
I_INTERNAL_TABNAME = 'I_FINAL'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = V_REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = I_FCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--Modifying titles of Field Catalog--
READ TABLE I_FCAT INTO WA_FCAT WITH KEY FIELDNAME = 'S_NO'.
IF SY-SUBRC EQ 0.
WA_FCAT-REPTEXT_DDIC = 'X'.
WA_FCAT-SELTEXT_S = TEXT-041.
WA_FCAT-SELTEXT_M = TEXT-041.
WA_FCAT-SELTEXT_L = TEXT-041.
WA_FCAT-OUTPUTLEN = 3.
WA_FCAT-JUST = 'L'.
MODIFY I_FCAT FROM WA_FCAT INDEX SY-TABIX.
CLEAR WA_FCAT.
ENDIF.
do for all the fields u want to display..
Award points if useful. -
Creating a single context index on a one-to-many and lookup table
Hello,
I've been successfully setting up text indexes on multiple columns on the same table (using MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a one-to-many data collection table (with a FK to a lookup table), and I need to search columns across both of these tables. Sample code below, more of my chattering after the code block:
CREATE TABLE SUBMISSION
( SUBMISSION_ID NUMBER(10) NOT NULL,
SUBMISSION_NAME VARCHAR2(100) NOT NULL
CREATE TABLE ADVISOR_TYPE
( ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL
CREATE TABLE SUBMISSION_ADVISORS
( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL,
SUBMISSION_ID NUMBER(10) NOT NULL,
ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
FIRST_NAME VARCHAR(50) NULL,
LAST_NAME VARCHAR(50) NULL,
SUFFIX VARCHAR(20) NULL
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper');
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns');
INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor');
INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL);
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS');
INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS');
COMMIT;I want to be able to create a text index to lump these fields together:
SUBMISSION_ADVISORS.FIRST_NAME
SUBMISSION_ADVISORS.LAST_NAME
SUBMISSION_ADVISORS.SUFFIX
ADVISOR_TYPE.ADVISOR_TYPE_NAME
I've looked at DETAIL_DATASTORE and USER_DATASTORE, but the examples in Oracle Docs for DETAIL_DATASTORE leave me a little bit perplexed. It seems like this should be pretty straightforward.
Ideally, I'm trying to avoid creating new columns, and keeping the trigger adjustments to a minimum. But I'm open to any and all suggestions. Thanks for for your time and thoughts.
-JamieI would create a procedure that creates a virtual document with tags, which is what the multi_column_datatstore does behind the scenes. Then I would use that procedure in a user_datastore, so the result is the same for multiple tables as what a multi_column_datastore does for one table. I would also use either auto_section_group or some other type of section group, so that you can search using WITHIN as with the multi_column_datastore. Please see the demonstration below.
SCOTT@orcl_11gR2> -- tables and data that you provided:
SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION
2 ( SUBMISSION_ID NUMBER(10) NOT NULL,
3 SUBMISSION_NAME VARCHAR2(100) NOT NULL
4 )
5 /
Table created.
SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE
2 ( ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
3 ADVISOR_TYPE_NAME VARCHAR2(50) NOT NULL
4 )
5 /
Table created.
SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS
2 ( SUBMISSION_ADVISORS_ID NUMBER(10) NOT NULL,
3 SUBMISSION_ID NUMBER(10) NOT NULL,
4 ADVISOR_TYPE_ID NUMBER(10) NOT NULL,
5 FIRST_NAME VARCHAR(50) NULL,
6 LAST_NAME VARCHAR(50) NULL,
7 SUFFIX VARCHAR(20) NULL
8 )
9 /
Table created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
3 VALUES (1, 'Some Research Paper')
4 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
5 VALUES (2, 'Thesis on 17th Century Weather Patterns')
6 INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
7 VALUES (3, 'Statistical Analysis on Sunny Days in March')
8 SELECT * FROM DUAL
9 /
3 rows created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
3 VALUES (1, 'Department Chair')
4 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
5 VALUES (2, 'Department Co-Chair')
6 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
7 VALUES (3, 'Professor')
8 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
9 VALUES (4, 'Associate Professor')
10 INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
11 VALUES (5, 'Scientist')
12 SELECT * FROM DUAL
13 /
5 rows created.
SCOTT@orcl_11gR2> INSERT ALL
2 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
3 VALUES (1,1,2,'John', 'Doe', 'PhD')
4 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
5 VALUES (2,1,2,'Jane', 'Doe', 'PhD')
6 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
7 VALUES (3,2,3,'Johan', 'Smith', NULL)
8 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
9 VALUES (4,2,4,'Magnus', 'Jackson', 'MS')
10 INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
11 VALUES (5,3,5,'Williard', 'Forsberg', 'AMS')
12 SELECT * FROM DUAL
13 /
5 rows created.
SCOTT@orcl_11gR2> -- constraints presumed based on your description:
SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk
2 PRIMARY KEY (submission_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk
2 PRIMARY KEY (advisor_type_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk
2 PRIMARY KEY (submission_advisors_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk
2 FOREIGN KEY (submission_id) REFERENCES submission (submission_id)
3 /
Table altered.
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk
2 FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id)
3 /
Table altered.
SCOTT@orcl_11gR2> -- resulting data:
SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45
SCOTT@orcl_11gR2> COLUMN advisor FORMAT A40
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE sa.advisor_type_id = a.advisor_type_id
10 AND sa.submission_id = s.submission_id
11 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
Statistical Analysis on Sunny Days in March Scientist Williard Forsberg AMS
5 rows selected.
SCOTT@orcl_11gR2> -- procedure to create virtual documents:
SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc
2 (p_rowid IN ROWID,
3 p_clob IN OUT NOCOPY CLOB)
4 AS
5 BEGIN
6 FOR r1 IN
7 (SELECT *
8 FROM submission_advisors
9 WHERE ROWID = p_rowid)
10 LOOP
11 IF r1.first_name IS NOT NULL THEN
12 DBMS_LOB.WRITEAPPEND (p_clob, 12, '<first_name>');
13 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name);
14 DBMS_LOB.WRITEAPPEND (p_clob, 13, '</first_name>');
15 END IF;
16 IF r1.last_name IS NOT NULL THEN
17 DBMS_LOB.WRITEAPPEND (p_clob, 11, '<last_name>');
18 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name);
19 DBMS_LOB.WRITEAPPEND (p_clob, 12, '</last_name>');
20 END IF;
21 IF r1.suffix IS NOT NULL THEN
22 DBMS_LOB.WRITEAPPEND (p_clob, 8, '<suffix>');
23 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix);
24 DBMS_LOB.WRITEAPPEND (p_clob, 9, '</suffix>');
25 END IF;
26 FOR r2 IN
27 (SELECT *
28 FROM submission
29 WHERE submission_id = r1.submission_id)
30 LOOP
31 DBMS_LOB.WRITEAPPEND (p_clob, 17, '<submission_name>');
32 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name);
33 DBMS_LOB.WRITEAPPEND (p_clob, 18, '</submission_name>');
34 END LOOP;
35 FOR r3 IN
36 (SELECT *
37 FROM advisor_type
38 WHERE advisor_type_id = r1.advisor_type_id)
39 LOOP
40 DBMS_LOB.WRITEAPPEND (p_clob, 19, '<advisor_type_name>');
41 DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name);
42 DBMS_LOB.WRITEAPPEND (p_clob, 20, '</advisor_type_name>');
43 END LOOP;
44 END LOOP;
45 END submission_advisors_proc;
46 /
Procedure created.
SCOTT@orcl_11gR2> SHOW ERRORS
No errors.
SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates:
SCOTT@orcl_11gR2> DECLARE
2 v_clob CLOB := EMPTY_CLOB();
3 BEGIN
4 FOR r IN
5 (SELECT ROWID rid FROM submission_advisors)
6 LOOP
7 DBMS_LOB.CREATETEMPORARY (v_clob, TRUE);
8 submission_advisors_proc (r.rid, v_clob);
9 DBMS_OUTPUT.PUT_LINE (v_clob);
10 DBMS_LOB.FREETEMPORARY (v_clob);
11 END LOOP;
12 END;
13 /
<first_name>John</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
<first_name>Jane</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
<first_name>Johan</first_name><last_name>Smith</last_name><submission_name>Thesis on 17th Century
Weather Patterns</submission_name><advisor_type_name>Professor</advisor_type_name>
<first_name>Magnus</first_name><last_name>Jackson</last_name><suffix>MS</suffix><submission_name>The
sis on 17th Century Weather Patterns</submission_name><advisor_type_name>Associate
Professor</advisor_type_name>
<first_name>Williard</first_name><last_name>Forsberg</last_name><suffix>AMS</suffix><submission_name
Statistical Analysis on Sunny Days inMarch</submission_name><advisor_type_name>Scientist</advisor_type_name>
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- user_datastore that uses procedure:
SCOTT@orcl_11gR2> BEGIN
2 CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE');
3 CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc');
4 END;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group:
SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1))
2 /
Table altered.
SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx
2 ON submission_advisors (any_column)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 PARAMETERS
5 ('DATASTORE sa_datastore
6 SECTION GROUP CTXSYS.AUTO_SECTION_GROUP')
7 /
Index created.
SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i
2 /
TOKEN_TEXT
17TH
ADVISOR_TYPE_NAME
AMS
ANALYSIS
ASSOCIATE
CENTURY
CHAIR
CO
DAYS
DEPARTMENT
DOE
FIRST_NAME
FORSBERG
JACKSON
JANE
JOHAN
JOHN
LAST_NAME
MAGNUS
MARCH
PAPER
PATTERNS
PHD
PROFESSOR
RESEARCH
SCIENTIST
SMITH
STATISTICAL
SUBMISSION_NAME
SUFFIX
SUNNY
THESIS
WEATHER
WILLIARD
34 rows selected.
SCOTT@orcl_11gR2> -- sample searches across all data:
SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
SCOTT@orcl_11gR2> EXEC :search_string := 'professor'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string) > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'doe'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'paper'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> -- sample searches within specific columns:
SCOTT@orcl_11gR2> EXEC :search_string := 'chair'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'phd'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Some Research Paper Department Co-Chair John Doe PhD
Some Research Paper Department Co-Chair Jane Doe PhD
2 rows selected.
SCOTT@orcl_11gR2> EXEC :search_string := 'weather'
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> SELECT s.submission_name,
2 a.advisor_type_name || ' ' ||
3 sa.first_name || ' ' ||
4 sa.last_name || ' ' ||
5 sa.suffix AS advisor
6 FROM submission_advisors sa,
7 submission s,
8 advisor_type a
9 WHERE CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0
10 AND sa.advisor_type_id = a.advisor_type_id
11 AND sa.submission_id = s.submission_id
12 /
SUBMISSION_NAME ADVISOR
Thesis on 17th Century Weather Patterns Professor Johan Smith
Thesis on 17th Century Weather Patterns Associate Professor Magnus Jackson MS
2 rows selected.
Maybe you are looking for
-
How to get exact date and time difference?
Hi, When i am using the below sql statement: SELECT (TO_DATE('7/27/2006 05:00:15 PM','MM/DD/YYYY HH:MI:SS PM') - to_Date('7/27/2006 8:30:13 AM','MM/DD/YYYY HH:MI:SS AM')) * 24 hours FROM DUAL; the output is: Hours 8.50055555555556 But Actually it is
-
Hello all i'm working on a homework assignment in where we created a match game. It's up to me to figure out how to tell the action script which difficulty the user play the game at. There are 3 buttons easy, mediym, hard. Each one lays out an inc
-
Dears, I am configuring CHARM in solman 7.0,I have performed configuration activities but after creating change management ticket by DSWP->Change management->Change request management I go to ticket and make it in change mode I get in option tab: The
-
Can anyone tell me what the "action cannot be completed" upon startup means?
The drive where my lightroom catalogs crashed. I recovered my catalog to another drive. But when I try to start lightroom, or open any catalog, now it gives me the following error. After a few minutes, the retry will work.
-
Is there any way to sort the styles list that is in the properties panel so that it reflects the order in the style sheet? Or possibly alphabetically? It would be a lot easier to find a style and apply it. Thanks