Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST
Hi,
How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
Regards,
Raghu
Hi,
Try the following...
DATA : it_fields like help_value occurs 1 with header line.
data: begin of w_vbap,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
werks like vbap-werks,
end of w_vbap.
data: i_vbap like w_vbap occurs 0 with header line,
w_fields type help_value,
i_dfies type table of dfies,
i_return_tab type table of ddshretval with header line,
i_field type dfies.
select vbeln posnr werks
from vbap into table i_vbap up to 5 rows.
if sy-subrc = 0.
sort i_vbap by vbeln.
endif.
clear it_fields[] , it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'VBELN'.
it_fields-selectflag = c_on.
append it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'POSNR'.
it_fields-selectflag = space.
append it_fields.
it_fields-tabname = c_vbap.
it_fields-fieldname = 'WERKS'.
it_fields-selectflag = space.
append it_fields.
loop at it_fields into w_fields.
i_field-tabname = w_fields-tabname.
i_field-fieldname = w_fields-fieldname.
i_field-keyflag = w_fields-selectflag.
append i_field to i_dfies.
endloop.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'VBELN'
window_title = 'Select'
tables
value_tab = i_vbap
field_tab = i_dfies
return_tab = i_return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3
read table i_return_tab into w_return_tab index 1.
if sy-subrc = 0.
endif.
Regards,
Srini.
Similar Messages
-
Contains return all the records when the query string matches the columns
I used the multi_column_datastore preference and created an index on three columns (item_name, description,owner_part_number). Now if I do a search:
select * from items where contains(description, 'description') > 0;It returns all the rows in items table, but not all the rows have "description" as a word. I guess Oracle text assumes the query intends to get all the rows as the query string matches one of the column names. My question is whether Oracle Text has any preference settings to alter this behavior?
execute ctx_ddl.create_preference('item_multi_preference', 'MULTI_COLUMN_DATASTORE');
execute ctx_ddl.set_attribute('item_multi_preference', 'columns', 'item_name, description,owner_part_number');
create index item_text_index on items(description) indextype is ctxsys.context filter by owner parameters('LEXER ENG_LEXER WORDLIST ENG_WORDLIST STOPLIST CTXSYS.EMPTY_STOPLIST datastore item_multi_preference MEMORY 1024M');Thanks.
Jun GaoIt looks like a basic_section_group fixes the problem as well, as demonstrated below and I believe a basic_section_group may be more efficient than auto_section_group.
SCOTT@orcl_11gR2> -- recreation of problem:
SCOTT@orcl_11gR2> drop table items
2 /
Table dropped.
SCOTT@orcl_11gR2> create table items (
2 "ITEM_NAME" varchar2(100 byte),
3 "ITEM_NUMBER" varchar2(100 byte),
4 "DESCRIPTION" varchar2(4000 byte),
5 "OWNER" number
6 )
7 /
Table created.
SCOTT@orcl_11gR2> begin
2 FOR Lcntr IN 1..100
3 loop
4 insert into items (item_name, item_number, description, owner)
5 values (dbms_random.string('A', 10),
6 dbms_random.string('A', 10),
7 dbms_random.string('L', 8) || ' '
8 || dbms_random.string('A', 4)
9 || dbms_random.string('A', 5) || ' '
10 || dbms_random.string('A', 10),
11 dbms_random.value(1,10) );
12 end loop;
13 end;
14 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> begin
2 FOR Lcntr IN 1..100
3 loop
4 insert into items (item_name, item_number, description, owner)
5 values (dbms_random.string('A', 10),
6 dbms_random.string('A', 10),
7 dbms_random.string('L', 8) || ' '
8 || dbms_random.string('A', 4) || '111'
9 || dbms_random.string('A', 5) || ' '
10 || dbms_random.string('A', 10), 1234 );
11 end loop;
12 end;
13 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> exec ctx_ddl.drop_preference('ENG_WORDLIST');
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> begin
2 ctx_ddl.create_preference('ENG_WORDLIST', 'BASIC_WORDLIST');
3 ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_INDEX','TRUE');
4 ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MIN_LENGTH',1);
5 ctx_ddl.set_attribute('ENG_WORDLIST','PREFIX_MAX_LENGTH',10);
6 ctx_ddl.set_attribute('ENG_WORDLIST','SUBSTRING_INDEX','TRUE');
7 ctx_ddl.set_attribute('ENG_WORDLIST','WILDCARD_MAXTERMS', 0);
8 end;
9 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('ENG_LEXER');
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> begin
2 CTX_DDL.CREATE_PREFERENCE ('ENG_LEXER', 'BASIC_LEXER');
3 CTX_DDL.SET_ATTRIBUTE ('ENG_LEXER', 'PRINTJOINS', '@-_');
4 end;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> execute ctx_ddl.drop_preference('items_multi_preference');
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> begin
2 ctx_ddl.create_preference('items_multi_preference', 'MULTI_COLUMN_DATASTORE');
3 ctx_ddl.set_attribute('items_multi_preference', 'columns', 'item_name, description,item_number');
4 end;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> create index items_text_index
2 on items(description)
3 indextype is ctxsys.context
4 parameters
5 ('LEXER ENG_LEXER
6 WORDLIST ENG_WORDLIST
7 STOPLIST CTXSYS.EMPTY_STOPLIST
8 datastore items_multi_preference
9 MEMORY 1024M')
10 /
Index created.
SCOTT@orcl_11gR2> create index owner_idx on items (owner)
2 /
Index created.
SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'ITEMS')
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> select count(*)
2 from items
3 where contains (description, 'description') > 0
4 /
COUNT(*)
200
1 row selected.
SCOTT@orcl_11gR2> -- correction of problem:
SCOTT@orcl_11gR2> exec ctx_ddl.drop_section_group ('items_sec')
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> begin
2 ctx_ddl.create_section_group ('items_sec', 'basic_section_group');
3 ctx_ddl.add_field_section ('items_sec', 'item_name', 'item_name', true);
4 ctx_ddl.add_field_section ('items_sec', 'description', 'description', true);
5 end;
6 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11gR2> drop index items_text_index
2 /
Index dropped.
SCOTT@orcl_11gR2> create index items_text_index
2 on items(description)
3 indextype is ctxsys.context
4 parameters
5 ('LEXER ENG_LEXER
6 WORDLIST ENG_WORDLIST
7 STOPLIST CTXSYS.EMPTY_STOPLIST
8 datastore items_multi_preference
9 MEMORY 1024M
10 section group items_sec')
11 /
Index created.
SCOTT@orcl_11gR2> select count(*)
2 from items
3 where contains (description, 'description') > 0
4 /
COUNT(*)
0
1 row selected. -
Get-NetworkStatistics returns all the values set to zero despite having internet traffic
Hi
I'm running Windows Server 2012 R2 and I have a problem with the Get-NetworkStatistics cmdlet: it returns all the parameters with a value of zero eventhough the wireless network adapter is up and running, including having internet access. Furthermore, if
I double-click on the wireless network adapter, it displays the correct values for bytes sent / received.
So it seems like the Get-NetworkStatistics cmdlet is unable to read the statistics for the wireless adapter. Any help would be appreciated.
ThanksHi,
Is this what you're referring to?
https://gallery.technet.microsoft.com/scriptcenter/Get-NetworkStatistics-66057d71
If so, the best way to contact the author is by posting on the QandA tab of the gallery item.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing) -
Return all the values into cursor
I want to return collection of varray using sys_refcursor. but it is returning only last record. I am wondering how I can return all the four records into result sys_refcursor.
The following is not returning all the four records under SP.
resultData OUT sys_refcursor
for i in 1..4
loop
OPEN result FOR
Select sdo_util.to_wkbgeometry
(sdo_geometry(2002, 2958, Null,
Mdsys.Sdo_Elem_Info_Array(1,2,1),
arr_result123(i)
)) as geometry
FROM dual c;
end loop;
Thanks
AlI have removed the for loop but no luck. I am posting my whole procedure.
Can you please let me know what i am missing!..........urgent please.
PROCEDURE SP_Lines
mlatlon IN Varchar2,
resultData OUT sys_refcursor
) As
plat Varchar2(256);
plon Varchar2(256);
lPosition number;
lcounter number;
newlat number;
newlon number;
-- to draw lines
geometry1 mdsys.sdo_geometry;
geometry2 mdsys.sdo_geometry;
begin
Begin
arr_result123 := arr_result(
mdsys.sdo_ordinate_array(-79.7198833241796,43.7437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.618833241796,43.5437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.4198833241796,43.3437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.1198833241796,43.1437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.0198833241796,43.0437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.7198833241796,43.007243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.7198833241796,43.7437243394591,-79.7170360355377,43.7503404513126),
mdsys.sdo_ordinate_array(-79.7198833241796,43.7437243394591,-79.7170360355377,43.7503404513126) );
lPosition := Instr(mlatlon, '_');
plat := Substr(mlatlon, 1, lPosition-1);
plon := Substr(mlatlon, lPosition+1, length(mlatlon) );
lcounter :=1;
--get 4 nearest points
for rec in (
Select sdo_cs.transform(c.geometry,4326) as geometry
FROM Ac c
where SDO_NN(c.GEOMETRY,
(sdo_geometry(2001, 4326, sdo_point_type(plon, plat, null), null, null) )
, 'sdo_batch_size =5')='TRUE'
AND ROWNUM <= 4
loop
newlat := get_ordinate(rec.geometry, 2);
newlon := get_ordinate(rec.geometry, 1);
-- ~~ building geometries ~~
geometry1 := sdo_geometry(2002, 4326, sdo_point_type(newlon, newlat, null), null, null);
geometry2 := sdo_geometry(2002, 4326, sdo_point_type(plon, plat, null), null, null);
arr_result123(lcounter) := GET_LINE_ORDINATE(geometry1, geometry2);
lcounter:=lcounter+1;
end loop;
end if;
lcounter:=1;
OPEN resultData FOR
Select sdo_util.to_wkbgeometry
(sdo_geometry(2002, 2958, Null,
Mdsys.Sdo_Elem_Info_Array(1,2,1),
arr_result123(lcounter)
)) as geometry
FROM dual c, (select level lcounter from dual connect by level <=2);
END;
end SP_Lines; -
RowSetIterator not returning all the rows
Hi,
We have a use-case where we need to create a new row iterator to insert rows(values) in it. Immediately after insertRow(), we are reading the values by creating a secondary row set iterator (createRowSetIterator) but it is not returning all the inserted rows. Here is the code snippet:
Code to insert rows:
public void insertTerrLineOfBusiness(CreateOperation operation, TerritoryVORowImpl newTerritoryRow, TerritoryVORowImpl selectedRow){
if((operation.equals(CreateOperation.CREATE))
|| operation.equals(CreateOperation.COPY)
|| operation.equals(CreateOperation.ADD_EXISTING)){
RowIterator selTerritoryLineOfBusinessIter = selectedRow.getTerritoryLineOfBusiness();
//RowIterator newTerrLineOfBusinessIter = newTerritoryRow.getTerritoryLineOfBusiness();
ViewRowSetImpl newTerrLineOfBusinessIter = (ViewRowSetImpl) newTerritoryRow.getTerritoryLineOfBusiness();
newTerrLineOfBusinessIter.setAssociationConsistent(true);
while(selTerritoryLineOfBusinessIter.hasNext()){
TerritoryLineOfBusinessVORowImpl selTerrLineOfBusinessRow =
(TerritoryLineOfBusinessVORowImpl)selTerritoryLineOfBusinessIter.next();
TerritoryLineOfBusinessVORowImpl newTerrLineOfBusinessRow =
(TerritoryLineOfBusinessVORowImpl)newTerrLineOfBusinessIter.createRow();
newTerrLineOfBusinessRow.setTerritoryVersionId(newTerritoryRow.getTerritoryVersionId());
newTerrLineOfBusinessRow.setLobCode(selTerrLineOfBusinessRow.getLobCode());
newTerrLineOfBusinessIter.insertRow(newTerrLineOfBusinessRow);
Code to read:
public List getTerritoryLobsValues() {
List <String> lobsValues = new ArrayList<String>();
if (this.getTerritory().getCurrentRow() != null) {
TerritoryVORowImpl territoryVORowImpl =
(TerritoryVORowImpl)this.getTerritory().getCurrentRow();
if(territoryVORowImpl.getTerritoryLineOfBusiness() != null){
ViewRowSetImpl territoryLob =
(ViewRowSetImpl)territoryVORowImpl.getTerritoryLineOfBusiness();
RowSetIterator itr = territoryLob.createRowSetIterator(null);
if(itr!=null){
while(itr.hasNext()) {
Row r = itr.next();
String lobCode = (String)r.getAttribute("LobCode");
lobsValues.add(lobCode);
itr.closeRowSetIterator();
return lobsValues;
Can anybody suggest what could be the issue? How to fix it?
Thanks,
AkhilaThanks for your response.
Jdev version:
Primary == FUSIONAPPS_PT.V1REL6INT_LINUX.X64_120719.0800 (Primary Product for the view)
Primary depends on FMWTOOLS == FMWTOOLS_11.1.1.6.0_GENERIC_120112.0037.2
FMWTOOLS depends on label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1
The above label originated from base label == JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192
Use case: We have a tree table, each record may or may not have Line of Business(LOB) associated with it. On creating a child node in the tree table, the child node copies all the attributes of parent. These attributes are not committed explicitly, if user wants to save the child node only then the attributes are committed.
Giving secondary rowSetIterator a name did not help in resolving this issue.
If I am calling postChanges() before reading from secondary row iterator then its returning all the inserted values. But this.getTransaction().postChanges() is a JAudit violation, so cannot use it:
RuleId: apps-jbo-category.File.AdfModel.54
Rule: insertTerrLineOfBusiness - Review DBTransaction.postChanges call to ensure passivation-safety
Any pointers on this? -
Search for a word and return all the lines (row) from the text file..
Hi all,
I need a help on how to search a string from the text file and returns all the lines (rows) where the searched string are found. I have included the code, it finds the indexof the string but it does not return the entire line. I would appreciate your any help.
public class SearchWord
public static void main(String[] args){
//Search String
String searchText = "man";
//File to search (in same directory as .class file)
String fileName = "C:\\Workspace\\MyFile.txt";
//StringBuilder allows to create a string by concatinating
//multiple strings efficiently.
StringBuilder sb =
new StringBuilder();
try {
//Create the buffered input stream, which reads
//from a file input stream
BufferedInputStream bIn =
new BufferedInputStream(
new FileInputStream(fileName));
//Holds the position of the last byte we have read
int pos = 0;
//Holds #of available bytes in our stream
//(which is the file)
int avl = bIn.available();
//Read as long as we have something
while ( avl != 0 ) {
//Holds the bytes which we read
byte[] buffer = new byte[avl];
//Read from the file to the buffer
// starting from <pos>, <avl> bytes.
bIn.read(buffer, pos, avl);
//Update the last read byte position
pos += avl;
//Create a new string from byte[] we read
String strTemp =
new String(buffer);
//Append the string to the string builder
sb.append(strTemp);
//Get the next available set of bytes
avl = bIn.available();
catch(IOException ex) {
ex.printStackTrace();
//Get the concatinated string from string builder
String fileText = sb.toString();
int indexVal = fileText.indexOf(searchText);
//Displays the index location in the file for a given text.
// -1 if not found
if (indexVal == -1)
System.out.println("No values found");
else
System.out.println("Search for: " + searchText); }
}Hi, you can use servlet class and use this method to get the whole line of searched string. You can override the HttpServlet to treat that class as servlet.
public class ReportAction extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//write your whole logic.
BufferedReader br = new BufferedReader(new FileReader("your file name"));
String line = "";
while(line = br.readLine() != null) {
if(line.contains("your search string")) {
System.out.println("The whole line, row is :"+line);
} -
SQL query which return all the NET SERVICES which are avaiable in tnsname
hi all
how to write a sql query which return all the net services which are avaiable in tnsname.ora
Regards
sAlso, tnsnames.ora is stored on the client, and not necessarily on the server; it's possible (and quite likely) that the name I use for a database in my tnsnames.ora could be different from the name you use for the same database; conversely we might use the same name for two different databases.
Regards Nigel -
Need UCM service which has to return all the files in the Folder
HI,
I need a webservice which has to return all the images/text files in the folder. I ll pass folder name has a input parameter..once i got all the files i have to shown those images in the web page.
Do we have any service with this requirement?? Or
i have to use 'Seach' service ,Which has return all the files meta info ...with this info do i have to use GetFile service for displaying data??
Any suggestions??
ThanksHi Jiri,
I dont know abt folios..I ll go thru it now..
When coming to the option a)
When we are calling Search service it will return resultset which contains meta data(Filename,File Id,URL,etc.....) for list of files in the folder. Now what i do to display image is , using this URL i ll bulid image object using this URL and i ll display it on the webpage(This web page contains Silver light component to display these images.)
I m assuming problem with this one is every time when i m building image i m hitting the the server to construct the image. Instead im trying to get the all the images in one shot when i pass folder name??
I doubt myself wether my assumtion is correct or not...
any suggestions plz..
Thanks -
How to sum a column value using CAML Query?
Hi All,
I would like to sum the column value using CAML qeury. Actually in my list, I have two column "Projects Name" and "Number of Issues". Now need to get sum of "Number of Issues" column. How to achieve in CAML Query.
Thanks in advance!Hi Sam,
it looks like you can use your current view based agregation, otherwise it is not possible(
http://msdn.microsoft.com/en-us/library/ms467521.aspx) and you need to work on custom bit on this requirement.
use the below link and create a view element as described and see if that works for you
Aggregations Element
http://msdn.microsoft.com/en-us/library/ms468626%28v=office.12%29.aspx
Another reference
Query Element
http://msdn.microsoft.com/en-us/library/ms471093.aspx
Hope this helps!
Ram - SharePoint Architect
Blog - SharePointDeveloper.in
Please vote or mark your question answered, if my reply helps you -
How to swap column values using variable in sql?
Hi,
I have a table and i want to swap two column values using variable
please help meHi,
Let us assume that the DeptNAME and DeptNo columns are of type VARCHAR2. However, DeptNO column is VARCHAR2(10) and DeptNAMe is VARCHAR2(100).
First of all DeptNo column needs to be modified to be 100.
i) ALTER TABLE DEPT MODIFY DEPTNO VARCHAR2(100);
Secondly, you will swap DEPTNAME and DEPTNO values using the SQL as follows:
ii) update dept t1
set deptname = (select deptno from dept2 t2 where t1.deptno = t2.deptno),
deptno = (select deptname from dept2 t2 where t1.deptno = t2.deptno);
Now, finally you want the deptname columns to be VARCHAR2(10)
iii) ALTER TABLE DEPT MODIFY DEPTNAME VARCHAR2(10).
If DEPTNO is a NUMBER column, you cannot alter the datatype unless the table is empty; in that case the whole swapping requirement would be moot.
Trinath Somanchi,
( http://www.myospages.com ) -
How to get Metadata column values using powershell(CSOM)
Hi,
I am trying to get list column values using Powershell (CSOM), but I am getting for Metata data columns.
I am getting internal value as System.Collections.Generic.Dictionary`2[System.String,System.Object]
Can anybody let me know how to get the values for metadata columns?
Any help would be greatly appreciate.
Thank you.
AA.Hi
Go through the links. It'll help.
SharePoint 2013 Code Tips – Setting a Managed Metadata Field with the Client Object Model(CSOM and JSOM)
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
Hi Team
I want one query plz help
I have a table emp in that we have empno,ename,sal,comm
like
select empno,ename,comm from emp
where comm=300
it will execute the 300 records
if i did not give any number for comm like null
then i want to execute the all date
i user nvl
like
select empno,ename,comm from emp
where comm=nvl(&comm,comm);
output: wrong.Yes this is the query i am also using and this is returning the all the rows
SQL> select * from emp where nvl(to_char(comm),'0')=nvl(to_char(&comm),nvl(comm,'0'));
Enter value for comm: ''
old 1: select * from emp where nvl(to_char(comm),'0')=nvl(to_char(&comm),nvl(comm,'0'))
new 1: select * from emp where nvl(to_char(comm),'0')=nvl(to_char(''),nvl(comm,'0'))
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
Regards,
Navneet -
Database adapter not returning all the records
I've taken over a BPEL from a developer who left the organization and have been having an issue during our User Acceptance Testing. We are querying a table that will return the insurance enrollment information for employee's and their dependants. When an employee change plans, or adds people, the old plan is terminated and a new once is created. When this happens there will be two records on the database to show the old plan and the new plan.
When we run the SQL thru JDEV or SQLDeveloper, the data comes out fine. When we run it through a BPEL Database Adapter we are only getting one of the rows returned.
I have created a small tester BPEL that is easily modified and deployed to run the same query to try multiple configurations changes within the DBAdapter. What I have found is all the records are returned when the "Return single result set" box on the DBAdapter Wizard is unchecked. When it's checked then it only returns one record for the employees with an old and a new plan.
Can someone explain what the "Return single result set" option does, and what the impact will be if it's unchecked?Hello,
In same way i am using two parent-child(header-line) tables. they have one to many relationship.
I want to generate XML which contains multiple line items under a child elements for header elements.
I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
can u help me please.
-regards
satyendra -
Instr not returning all the occurance
hi i used this to get the space occurance.
SQL> select instr('hi madam bye madam',' ',1) from dual;
INSTR('HIMADAMBYEMADAM','',1)
3
there is a space in 3,9,13 th position but the above query gives 0nly 3.so how to get all the space occurance.You need to pass an additional parameter to get the Nth occurrence of a value.
1* select instr('hi madam bye madam',' ',1,1) from dual
SCOTT @ nx102 JCAVE9420> /
INSTR('HIMADAMBYEMADAM','',1,1)
3
Elapsed: 00:00:00.00
SCOTT @ nx102 JCAVE9420> ed
Wrote file afiedt.buf
1* select instr('hi madam bye madam',' ',1,2) from dual
SCOTT @ nx102 JCAVE9420> /
INSTR('HIMADAMBYEMADAM','',1,2)
9
Elapsed: 00:00:00.00
SCOTT @ nx102 JCAVE9420> ed
Wrote file afiedt.buf
1* select instr('hi madam bye madam',' ',1,3) from dual
SCOTT @ nx102 JCAVE9420> /
INSTR('HIMADAMBYEMADAM','',1,3)
13
Elapsed: 00:00:00.01
SCOTT @ nx102 JCAVE9420> ed
Wrote file afiedt.buf
1* select instr('hi madam bye madam',' ',1,4) from dual
SCOTT @ nx102 JCAVE9420> /
INSTR('HIMADAMBYEMADAM','',1,4)
0
Elapsed: 00:00:00.01Justin -
SQL Query to return all the dependent objects
Hi,
I have a question.
Suppose I am creating a table with a join on 10 other tables, views etc..
And there are nested sub-queries in the CREATE statement.
How can I get the list of all the dependent objects for that table without counting them manually.
I know, we can right click the table/view name and check the dependent objects in Toad or SQL Developer.
But, I want to know the SQL query for getting that information.
Thanks
Rajivwell there is no way oracle would know what query was used when the table was created.
But here is one intuitive trick:
Step 1: Create a procedure that will have a cursor declared on the query you want to know what tables/views are used.
Step 2: Check USER_DEPENDENCIES to see what objects this procedure depends on
Let say you want to create TEST_A table using the following statement:
create table test_a
as
select *
from scott.emp,
scott.dept;
1 create or replace procedure test_temp
2 as
3 cursor test_cur is
4 select *
5 from scott.emp,
6 scott.dept;
7 begin
8 null;
9* end;
SQL> /
Procedure created.
SQL> show errors
No errors.
SQL> desc user_dependencies
Name Null? Type
NAME NOT NULL VARCHAR2(30)
TYPE VARCHAR2(17)
REFERENCED_OWNER VARCHAR2(30)
REFERENCED_NAME VARCHAR2(64)
REFERENCED_TYPE VARCHAR2(17)
REFERENCED_LINK_NAME VARCHAR2(128)
SCHEMAID NUMBER
DEPENDENCY_TYPE VARCHAR2(4)
SQL> select referenced_owner, referenced_name, referenced_type
2 from user_dependencies
3 where name='TEST_TEMP' and referenced_owner<>'SYS';
REFERENCED_OWNER
REFERENCED_NAME
REFERENCED_TYPE
SCOTT
DEPT
TABLE
SCOTT
EMP
TABLE
SQL>
SQL> drop procedure test_temp;
Procedure dropped.
SQL>Message was edited by:
tekicora
Message was edited by:
tekicora
Maybe you are looking for
-
If you are impatient and want the iphone 5 in your hand the very next day, I suggest going to the apple site and place an order for in store pickup. Originally I placed my order with verizon and had a 3-4 week wait. Then I decided to cancel the veriz
-
Hello, Some french special characters are not correctly displayed (not aligned with the rest of the text, some space before or after) or not displayed at all :-( I think the issue is maybe due to ICS but I want to know: could you confirm ? Best Regar
-
Copy and paste error Illustrator cs5
Hello, I am using Illustrator and Photoshop both cs5. When I attempt to copy any element from Illustrator and then paste it into Ps it seems like giving me the bounding box however it doesnt drop the exact element. I tried dropping smart object it di
-
Dynamically displaying a label
I have a form: http://htmldb.oracle.com/pls/otn/f?p=34728:1 My Version is 1.6 When the user select "Destroy Date" or "Created Date" from the 'Column' drop box, I would like to have a "label" show up to the right of the 'Value' box that says: (Format:
-
ok my iphone 3g touch screen is not responding, i can recieve calls and it can charge and connect to itunes, but i cannot go any further than using the home button or the power button, it is only the slide feature and touch feature that has become no