Row value as one column/row value
Hi,
I want below values like 1;2;3;4;5;(same like we get by using UserResponse function for user prompt but this is simple object not user prompt)
1
2
3
4
5
thanks in advance
Prabhat
Edited by: prabhat2009 on May 19, 2009 6:42 AM
Hi Prabath,
Alas, this is not simple, I have to challenge the solution road you choose.
Can't you work with a rotated table? So say the object normal table would be:
<object name>
1
2
3
4
5
the rotated table would read:
<object name> 1 2 3 4 5
So if you were to hide the header of this table and may be put a ";" after each object value,
you get almost the same.
Plus; it scales automatically based on the number values for the object.
Minus; it requires a fixed width, row by row autofith option doesn't exist for column by column...
Only other (complex) option:
Create a table with the object (first one).
Give the table a footer line.
Now in the footer use the following formula:
max(<object name>&previous(<object name>)&previous(previous(<object name>))&...)
Then you fold the table and show only the footer.
Now the downside here is that obviously you will have to know just how many occurrence of object name there are. So I really wouldn't recommend it unless there are really few values max.
Good luck,
Marianne
Similar Messages
-
Is it possible to Lock just one column value in a row?
Is it possible to Lock just one column value in a row
A Java Developer has just asked me if it is possible to Lock just one column value in a row in Oracle
select ename from emp where empno=7369 for update;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
will lock the entire row with empno=7369.
But is it possible to lock one column value from this row, like SAL=800 ?
Edited by: J.Kiechle on Jan 8, 2009 10:45 PMJ.Kiechle wrote:
Is it possible to Lock just one column value in a rowNo. Locking granularity is a row. -
Making whole row coloured red based on value in one column in BI Answers.
Hi
Would anyone know how to make a whole row red (eg) based on the value from one column within the row in
a BI Answers report in either a pivot table or a table view. I know it should be a case of setting up the
conditional formatting in the Conditional Tab on the Properties of the column, but all the columns apart from the
one with the value being determined ignore the value in another column.
Thanks,
- Pete
Edited by: user1636556 on 09-Dec-2011 07:58Hi
Would anyone know how to make a whole row red (eg) based on the value from one column within the row in
a BI Answers report in either a pivot table or a table view. I know it should be a case of setting up the
conditional formatting in the Conditional Tab on the Properties of the column, but all the columns apart from the
one with the value being determined ignore the value in another column.
Thanks,
- Pete
Edited by: user1636556 on 09-Dec-2011 07:58 -
Formating the Row Based on one column value
Hi Friends
I am trying to format the Entire row based on the value of the first column in my Answers.
Example if first column value in 'F' now i want the Entire row to be colored
I can do conditional formating on one column but i want to do it on the entire row
F 8.1 % 12.0 %
E 5.2 % 3.5 %
M 2.3 % 3.3 %
If any one has done this or any suggestions please respond
Thanks
SangIts a Pivot View
F 8.1 % 12.0 %
E 5.2 % 3.5 %
M 2.3 % 3.3 %
the column 1 --> F,E,M are the Product
the column 2 --> 8.1% , 5.2% , 2.3% are the sales in year 2008
the column 3 --> 12.0 % , 3.5 %, 3.3 % are the sales in year 2009
So will i be able to apply the formating in pivot view based on one column to other column If yes please let me know how or
suggest if this can be done using the BI Office , or BI publisher
sing the BI Office i can do the formating in Excel but once i refresh the data all the formating is gone ... :(
I am donno BI Publisher if we have to use BIP please suggest any solution its very very very urgent and important report formating they need here ....
Thanks in advance David
sango -
Join all rows bases on one column value
Hi All,
I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
table:Test
id id_desc
1 desc_a
1 desc_b
1 desc_c
Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
id id_desc
1 desc_a
desc_b
desc_corza wrote:
Hi All,
I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
table:Test
id id_desc
1 desc_a
1 desc_b
1 desc_c
Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
id id_desc
1 desc_a
desc_b
desc_cI'm guessing you want to pivot the results in TEST and use that to insert into TEST1?
If so this may be useful
http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php -
Collecting data from multiple rows into one column
I'd like to run a query and put a collection of items into one output column instead of multiple rows. See the example below:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
"CORE 10.2.0.5.0 Production"
TNS for 32-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
CREATE TABLE "SKIP"."INGREDIENTS"
( "INGRED_ID" NUMBER,
"INGRED_NAME" VARCHAR2(20 BYTE),
"STORES" VARCHAR2(20 BYTE)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
REM INSERTING into SKIP.INGREDIENTS
Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (1,'SEA SALT','Food lion');
Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (2,'TABLE SALT','Food lion');
Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (3,'FLOUR','Piggly Wiggly');
Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (4,'YEAST',null);
Insert into SKIP.INGREDIENTS (INGRED_ID,INGRED_NAME,STORES) values (5,'BEER','ABC Store');
CREATE TABLE "SKIP"."PRETZELS"
( "PRETZEL_ID" NUMBER,
"PRETZEL_NAME" VARCHAR2(20 BYTE),
"PRETZEL_DESC" VARCHAR2(100 BYTE)
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
REM INSERTING into SKIP.PRETZELS
Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (1,'CLASSIC','Classic knot pretzel');
Insert into SKIP.PRETZELS (PRETZEL_ID,PRETZEL_NAME,PRETZEL_DESC) values (2,'THICK STICK','Straight pretzel, abt 1/2" in dia');
CREATE TABLE "SKIP"."INGRED_XREF"
( "PRETZEL_ID" NUMBER,
"INGRED_ID" NUMBER
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
REM INSERTING into SKIP.INGRED_XREF
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,1);
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,2);
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (1,4);
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,2);
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,3);
Insert into SKIP.INGRED_XREF (PRETZEL_ID,INGRED_ID) values (2,5);
-- Constraints for Table INGRED_XREF
ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("PRETZEL_ID" NOT NULL ENABLE);
ALTER TABLE "SKIP"."INGRED_XREF" MODIFY ("INGRED_ID" NOT NULL ENABLE);
{code}
Desired output (note how the ingredients are all listed in one column, separated by commas):
{code}
PRETZEL_ID PRETZEL_NAME PRETZEL_DESC INGREDIENTS
1 CLASSIC Classic knot pretzel SEA SALT, TABLE SALT, YEAST
2 THICK STICK Straight pretzel, abt 1/2" in dia TABLE_SALT, FLOUR, BEERSee the FAQ : {message:id=9360005}
Especially links concerning string aggregation. -
How to get all the values in one column of a JTable
How to get all the values in one column of a JTable as a Collection of String.
I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.
-
Hello everyone,
I am developing an application (ALV OO) to select more than 1 column by row ( one ). This is an a holiday application so the idea is:
-One column will be the day, and the row will be the user.
So I am trying to select more than one day by user (that would be the row).
I am using the method set_table_for_first_display but when it shows the alv, doesn't let me to select more than one column with a click of the mouse.
Does anybody know if I can do this (select more than one column, by row) in somehow?
Please let me know if you need more clarification about this.
Thanks in advance
DiegoHi Diego,
it's all in the documentation.
set different selection modes through the value of the field u201CSEL_MODEu201D in the layout structure.
SPACE
same as 'B'
see 'B'
Default setting
'A'
Column and row selection
Multiple columns
Multiple rows
The user selects the rows through pushbuttons at the left border of the grid control.
'B'
Simple selection, list box
Multiple columns
Multiple rows
'C'
Multiple selection, list box
Multiple columns
Multiple rows
'D'
Cell selection
Multiple columns
Multiple rows
Any cells
The user selects the rows through pushbuttons at the left border of the grid control
Beyond setting this option, you can set u201CNO_ROWMARKu201D option to hide the mark column which is normally visible when the selection mode allows multiple row selection.
One point to notice here is that if you set your ALV Grid as to be editable, it may override your selection mode regardless of your layout settings.
This is from SDN Community Contribution "An Easy Reference for ALV Grid Control" By: Serdar ŞİMŞEKLER
Sorry, no link,. it's on my disk.
Regards,
Clemens -
How to add all value of the one column ?
Hi All,
i created my UI project based on Human task flow.The jspx page contains one table.In table we have one column Amount. i want to add all row value of column amount which i used for some custom validation.
Because this is automatically generated project so we do not have any VO.and also i saw my UI af table is pointing to one xml file where all the attribute are present.
So please let me know how can achieve my validation scenario.
ThanksHi,
the table is bound to a tree binding in the PageDef file. This tree binding is bound to an iterator. You can access this iterator from Java
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingEntries();
DCIteratorBinding iter = (DCIteratorBinding) iter.get("Name of the iterator");
You can now iterate over the iterator and for each Row you call row.getAttribute("Amount") to the amount value
Frank -
Multiple value in one column issue
Dear proffessionals,
i'm trying to put more than one value in one column, so i have next problem:
1. Query select cr_pjid from acc_users where username='ACCBTPS121' give result
CR_PJID
'26','63'2. Query select * from acc_accbtp_nova_view where ed_id=2 and to_char(pj_id) in ('26','63'); return 186 rows.
3. Query: select * from acc_accbtp_nova_view where ed_id=2 and
to_char(pj_id) in (select cr_pjid
from acc_users
where username='ACCBTPS121'); doesn't return any row... :(
Could anyone help me ?
Thx in advance,
AdnanAfter researching, I think that the best idea is to create another table with multiple rows and different values for one column...
[http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:210612357425] -
Split one column value and insert into multiple columns
hi
am new to plsql .
i want to split a characters from one column and insert into multiple columns
i tried used substr function the symbol ',' vary his place dynamically ,so i can't apply substr function.
for eg: before split
col1 :
col2 :
col3 :
col4 :
colu5: adsdf,fgrty,erfth,oiunth,okujt
after split
col1 :adsd
col2 :fgrty
col3 :erfth
col4 :oiunth
col5 : adsdf,fgrty,erfth,oiunth,okujt
can anyone help me
thanks
Edited by: 800324 on Dec 23, 2010 8:28 AM
Edited by: 800324 on Dec 23, 2010 8:36 AMHow about:
SQL> create table t
2 (col1 varchar2(30)
3 ,col2 varchar2(30)
4 ,col3 varchar2(30)
5 ,col4 varchar2(30)
6 ,col5 varchar2(30)
7 );
Table created.
SQL> insert into t (col5) values ('adsdf,fgrty,erfth,oiunth,okujt');
1 row created.
SQL> insert into t (col5) values ('x,y');
1 row created.
SQL> insert into t (col5) values ('a,b,c,d');
1 row created.
SQL> select * from t;
COL1 COL2 COL3 COL4 COL5
adsdf,fgrty,erfth,oiunth,okujt
x,y
a,b,c,d
3 rows selected.
SQL>
SQL> merge into t a
2 using ( with t1 as ( select col5||',' col5
3 from t
4 )
5 select substr(col5, 1, instr(col5, ',', 1, 1)-1) col1
6 , substr(col5, instr(col5, ',', 1, 1)+1, instr(col5, ',', 1, 2)- instr(col5, ',', 1, 1)-1) col2
7 , substr(col5, instr(col5, ',', 1, 2)+1, instr(col5, ',', 1, 3)- instr(col5, ',', 1, 2)-1) col3
8 , substr(col5, instr(col5, ',', 1, 3)+1, instr(col5, ',', 1, 4)- instr(col5, ',', 1, 3)-1) col4
9 , rtrim(col5, ',') col5
10 from t1
11 ) b
12 on ( a.col5 = b.col5 )
13 when matched then update set a.col1 = b.col1
14 , a.col2 = b.col2
15 , a.col3 = b.col3
16 , a.col4 = b.col4
17 when not matched then insert (a.col1) values (null);
3 rows merged.
SQL> select * from t;
COL1 COL2 COL3 COL4 COL5
adsdf fgrty erfth oiunth adsdf,fgrty,erfth,oiunth,okujt
x y x,y
a b c d a,b,c,d
3 rows selected.
SQL> Assuming you're on 9i... -
I have data in a table that looks like below:
ColumnA ColumnB
123 abc|cde|fgr
345 def|ght|sew
890 deq|nmk|lop|lip|fre|dwsThere is no limit on how many values you can have in ColumnB and they are pipe delimited.
I need to split this one column into rows as:
ColumnA ColumnB
123 abc
123 cde
123 fgr
345 def
345 ght
890 fre
890 dwsThanks in advance!with sample_data as (
select 123 columna,'abc|cde|fgr' columnb from dual union all
select 345,'def|ght|sew' from dual union all
select 890,'deq|nmk|lop|lip|fre|dws' from dual
select columna,
regexp_substr(columnb,'[^|]+',1,column_value) columnb
from sample_data,
table(
cast(
multiset(
select level
from dual
connect by level <= length(regexp_replace(columnb || '|','[^|]'))
as sys.OdciNumberList
order by columna,
column_value
COLUMNA COLUMNB
123 abc
123 cde
123 fgr
345 def
345 ght
345 sew
890 deq
890 nmk
890 lop
890 lip
890 fre
COLUMNA COLUMNB
890 dws
12 rows selected.
SQL> SY. -
How get one column's value in dashboard of obiee?
I have two reports, MAIN report and DETAIL report. I want to get one column's value as the filter of DETAIL report.
For example, the MAIN report is
Class AVG_Age MAX_Age MIN_Age
Class1 13 15 11
Class2 14 16 12
DETAIL report is
Name Class Old Describe
Name1 Class1 15 ...
Name2 Class2 16 ...
Through the Navigation to implement it, when I click the 15 of MAIN report, it can only show the MAX age student of calss1. So I have to put the MAX_Age as the DETAIL report's filter. How can I get it?
Thanks
Edited by: user10496160 on 2008-11-3 下午9:31
Edited by: user10496160 on 2008-11-3 下午10:53If I understand correctly, what you are trying to do is build a report so that a user can determine the oldest student of a particular class and then look at the details of that student, yes? But what if several classes have a student (or students!) with the same "max" age? For example, what if there are students in 2 classes that are aged 15 and are the oldest in their respective class? Wouldn't you want to give the user the option if choosing the various classes in which the oldest student is the "max" age? Then do this:
On the Main report, put the summary information as you have it (Class, AVG_Age, MAX_Age, MIN_Age). Put the Value Interaction navigation on the MAX_Age column.
On the Detail report, put Class, Name, Age, Description, etc., and any other columns that show the details of the student(s) that are the oldest. Add the filter on the Age column: "Is prompted." Now, create a Pivot Table view and place the Class column in the Pages area. (If you want you can create a duplicate of the Class column so you can have a copy in the Rows section of the Pivot Table.)
Now when the user clicks on the MAX_Age in the Main report, it will show the Detail report with the Classes that have students with the same "max" age in a drop down window. The user can select different classes to see the various students that meet that criterion. -
Selecting rows based on one column change
Hi All -
I need to select the rows from a table (this table has 4 columns and has a primary key and have many records for that primary key).
I need to select all the rows for this primary key for which only one column (in this case "flag" column) has been changing from its past value.
How can I do this?
for example, table data is:
ID, flag, Profile,date
pk, Y, Profile4,01/10/10
pk, N, Profile4, 01/08/10
pk,N, Profile3, 01/07/10
pk,Y, Profile3, 01/05/10
pk,Y, Profile2, 01/03/10
pk,N, Profile1, 01/02/10
The output of the query I am looking for should return the following i.e. only retrieve rows whose previous flag value has been changed:
ID, flag, Profile,date
pk, Y, Profile4,01/10/10
pk,N, Profile3, 01/07/10
pk,Y, Profile2, 01/03/10
pk,N, Profile1, 01/02/10
Please share your expertise.
Thanks,
SeenuHi, Seenu,
Centinul wrote:
It is always helpful to provide the following:
1. Oracle version (SELECT * FROM V$VERSION)
2. Sample data in the form of CREATE / INSERT statements.
3. Expected output
4. Explanation of expected output (A.K.A. "business logic")
5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
Seenu001 wrote:(1) Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production Good!
(2) select 'pk' id,'Y' flag,'Profile4' profile,to_date('01/10/10','mm/dd/yy') dt from dual union all
select 'pk','N','Profile4',to_date('01/08/10','mm/dd/yy') from dual union all
select 'pk','N','Profile3',to_date('01/07/10','mm/dd/yy') from dual union all
select 'pk','Y','Profile3',to_date('01/05/10','mm/dd/yy') from dual union all
select 'pk','Y','Profile2',to_date('01/03/10','mm/dd/yy') from dual union all
select 'pk','N','Profile1',to_date('01/02/10','mm/dd/yy') from dualNot bad. It can be made into a CREATE TABLE AS statement without a lot of work, but if you're not willing to do that little bit or work, why should anyone else?
(3) Expected output: I want all the rows from this table where the flags have been changed from its previous value.That's a vague description. Post the exat output, like Solomon did:
ID F PROFILE DT
pk N Profile1 01/02/2010
pk Y Profile2 01/03/2010
pk N Profile3 01/07/2010
pk Y Profile4 01/10/2010
(4) I want all the rows from this table where the flags have been changed from its previous value.That's a repeat of the vague description. Explain how you get the crorrect results, with specific examples, like this:
"The row dated January 2 should be included, because it is the oldest row in the table, regardless of what its flag is.
The row dated January 3 should be included because ...
The row dated January 5 should *not* be included, because ..."
You don't have to explain every row, just every reason.
Solomon - I tried your query but the prev_flag is not being populated, it shows null value '-'NULL is not the same as '-'. Did you issue a command like
SET NULL "-"that would display a '-' instead of NULL?
Solomon's query works fine for me, as it did for him. Post your code, even if you just copied it from this site. (There may have been an editing problem.)
Frank - I tried your query, prev_flag is populated in this case but when I am using with the WITH clause, I am getting an error saying "unsupported column aliasing" , I guess WITH command doesnt allow use of column alias. The problem is that I forgot the keyword AS after the sub-query name.
WITH got_prev_flag AS
SELECT id, flag, profile, dt -- DATE is not a good column name
, LAG (flag, 1, '??') OVER (ORDER BY dt) AS prev_flag
FROM t
-- WHERE ... -- any filtering goes here
SELECT id, flag, profile, dt
FROM got_prev_flag
WHERE flag != prev_flag
;If you don't post data in an executable form, then people can't test their ideas. If people can't test their ideas, trivial mistakes like this are very likely.
This flag column will have either
Y or N columns. Could you tell me what is the use of "??" value.By default, LAG returns NULL for the first row. If you want to include the first row in the results, then "WHERE flag != prev_flag" won't work when prev_flag is NULL. We could explicitly check for "prev_flag IS NULL", but I find it cleared to override the default, and have LAG return '??' on the first row. I guessed that '??' would make the condition "WHERE flag != prev_flag" work, no matter what value flag had. There's nothing magical about '??'; you can use any string that will never actually match flag. -
I am creating new table. My goal is to display some text in few lines like this:
"AAAAAAAA" "BBBBBBBB" "CCCCCCCCC"
"DDDDDDD" "EEEEEEEE"
Actually the next row (with "DD" and "EE" values) is not displayed below first row, but on the next page.
I've tried to put table into rectangle, disabled all page breaks and still the same effect. Any help?Hi Heidi,
Actually, it's not solution, I only gave more details about my problem :)
Another description:
In my report I'm creating Tablix with Column grouping. There is only one column with image (every image has same width). If there is only three pictures, then they are displayed next to each other in one row.
In case, there is more than three pics, another row is showing on next page. I'd like to display all rows one after another on one page.
I've tried to create three vertical lists, and filter each column group to display only records:
1) =(RowNumber("Tablix1")) mod 3 = 1
2) =(RowNumber("Tablix1")) mod 3 = 2
3) =(RowNumber("Tablix1")) mod 3 = 0
Unfortunately, I got an error:
"A FilterExpression for the tablix ‘Tablix1’ uses the function RowNumber. RowNumber cannot be used in filters."
Do You have any other propositions?
--------EDIT--------
ok, I manged to solve it. As I said, I've created three vertival lists and placed them next to each other.
Then, instead of using filter, I've used Visibility trigger:
1)
=IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix1") mod 3 = 1, false, true)
2)
=IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix2") mod 3 = 2, false, true)
3)
=IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix3") mod 3 = 0, false, true)
I had to use function RunningValue to count all occurrences, as my report is quite complex and "RowNumber" [ssrs function] and "ROW_NUMBER() OVER (ORDER BY [rowgroupfield])" [sql query] were not working properly. -
Search one column for value in another column
Hello,
I am trying to take the whole value from one column, and see if that string appears anywhere in another colmn. So if one row in one column has the value "cat", I want to see if that string appears anywhere in any row in another column: so a row with the value "The cat sat on the mat" would return true.
I have tried:
select term from pic_lib_keywords, csv
where contains (csv.nhm_field_asset_description,pic_lib_keywords.term) >0;
But I get the error:
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 32
20000. 00000 - "%s"
*Cause: The stored procedure 'raise_application_error'
was called which causes this error to be generated.
*Action: Correct the problem as described in the error message or contact
the application administrator or DBA for more information.
Can you use 2 columns in this way, or does the search term have to be a literal? Any suggestions would be appreciated.
Thank you.It works for me, as shown below.
SCOTT@orcl_11gR2> select * from v$version
2 /
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 rows selected.
SCOTT@orcl_11gR2> create table csv
2 (nhm_field_asset_description clob)
3 /
Table created.
SCOTT@orcl_11gR2> insert all
2 into csv values ('The cat sat on the mat.')
3 into csv values ('The dog sat on the mat.')
4 select * from dual
5 /
2 rows created.
SCOTT@orcl_11gR2> create table pic_lib_keywords
2 (term varchar2(30))
3 /
Table created.
SCOTT@orcl_11gR2> insert all
2 into pic_lib_keywords values ('cat')
3 into pic_lib_keywords values ('mouse')
4 select * from dual
5 /
2 rows created.
SCOTT@orcl_11gR2> create index test_idx
2 on csv (nhm_field_asset_description)
3 indextype is ctxsys.context
4 /
Index created.
SCOTT@orcl_11gR2> select term
2 from pic_lib_keywords, csv
3 where contains
4 (csv.nhm_field_asset_description,
5 pic_lib_keywords.term) >0
6 /
TERM
cat
1 row selected.
SCOTT@orcl_11gR2>
Maybe you are looking for
-
How to use Conditional statements in SQL Loader control file
Hi, I am using sql loader to load a flat file to the table. I am using control file for this purpose as show below: LOAD INTO TABLE store_shrink TRUNCATE FIELDS TERMINATED BY " " TRAILING NULLCOLS SITE_ID char, ST_SHRINK char, ST_REVENUE char, SH
-
I'm trying to create a couple of captivate videos. Have finished the videorecording. When I started to record audio, what I've captured runs to fast. Is there any way of pausing the video on certain frames while recording the audio?
-
ImportEnt field in XL Reporter
On a Sales Invoice Accounting Screen there in a field called Sales Order. The database name for this is 'ImportEnt'. Is there anyway to pull this field in to XL reporter? It does not appear to be available in the field selection within XL Reporter?
-
Language install and Support Packages
We have installed some new languages in our system and are now re-applying the support packages as required. In SMLT when re-importing the support packages, a pop-up box with the option to 'Overwrite' or 'Do Not Overwrite' repaired texts comes up. W
-
Hi Please let me know the code to get the view context values. regards mmukesh