Problem Getting the Column name in the BPEL Problem.
I have created one Variable Assume the name Nptf. I want to get the name of the Variable and Store it in another variable. Is there any possibility to do that.
Thanks in advance
Regards
GSR
I do not understand your question. How would you identify the variable whose name you want to copy, if not by name?
Marc
Similar Messages
-
How to get the column names of the table into the Dashboard prompt
how to get the column names of the table into the Dashboard prompt
Thanks & Regards
Kishore PHey john,
My requirement is as follows
I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
My pivot table looks like this
COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
---------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK REGION DOLLARS DOLLARS DOLLARS DOLLARS
1 CENTRAL 10 20 30 40
2 SOUTHERN 10 30 30 70
3 EASTERN 20 20 20 60
4 WESTERN 10 20 30 40
When i select the District in column selector
Report has to display rank based on Total Sales by District. i.e
------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK DISTRICT DOLLARS DOLLARS DOLLARS DOLLARS
for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
do you have any solution for this?
http://rapidshare.com/files/402337112/Presentation1.jpg.html
Thanks & Regards
Edited by: Kishore P on Jun 24, 2010 7:24 PM
Edited by: Kishore P on Jun 24, 2010 7:28 PM -
Rename the Column Name in the Repository
Hi,
after creation the Repository and some Answers I want to change the name of some columns in the Repository (Presentation Layer or Busines Layer).
After changing this column names the answers will not work any more until I replace the columns in answers.
Has got somebody experience with changing column names in Repository and Catalog without replacing the columns in answers?
Regards,
StefanRename the objects in the Business Model Layer and that would get automatically reflected in Presentation Layer. In order for presentation layer to remain constant just double click on the columns and uncheck the "Use Logical Column Names". This would ensure that your presentation layer is not renamed when you rename the BM.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
How To Know The Column Name Of The Internal Table
HI ,
i have an internal table .
f1 f2 f 3 f4 f5
matnr mbrsh mtart meins minbe
i want to know the column name which depending on the value i.e . if it is matnr then f1 , if mbrsh it is f2 ..so on
Thanks.Hi ,
thanks for your replies . i am elaborating my query .
I have an internal table with 80 fields i.e.f1,f2,f3......f80 . In the first index i will be having the fieldnames
i.e.matnr , mbrsh , meins , mtart ..... . From second index onwards i will be having the corresponding data for the field name. i need to display a particular field in a table control . Here i will be knowing the fieldname. If i can get to know the column name i.e whether f1 or f2 or ... .i Can populate the data into the table control.
Wht i have done is taken a field symbol and used the following code.
read table i_upload index 1 assigning <lv_upload>.
here i will get the initial first record i.e
F1 MATNR
F2 MBRSH
F3 MTART
F4 WERKS
F5 LGORT
F6 VKORG
F7 VTWEG
F8 MAKTX
F9 MEINS
F10 MATKL
F11 BISMT
F12 BRGEW
F13 GEWEI
F14 NTGEW
F15 GROES
F16 KLART
F17 CLASS
F18 SPART
F19 VRKME
F20 UMREN
now i want to the field name .
Hope it is clear this time .
Thanks. -
How to know the column name using the index name for a particular table
Hi All,
I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
Thanks
Sudheerselect *
from user_ind_columns -- or all_ind_columns
where table_name = UPPER('&table_name')
and index_name = UPPER('&index_name');
Regards
Arun
Gurgaon -
How to call the column names into the prompt and display values dynamically
Hi,
i have a typical requirement where I have to call 3 columns into the AGE Prompt (I know we can use the Column Selector to call the columns) .Below is the Screen Shot.
!http://i46.tinypic.com/2qjfukh.jpg!
2nd Requirement)
The three columns I have are order Date, Ship Date and Entry Date.
Whenever I click on Orderdate from the Prompt, It should dynamically show its values in the report.
and When I click on the Ship Date from the Prompt, it should display the corresponding values in the report.
and so on with the Entry Date.
Can anybody help me how to acheive this.
Thanks a ton.Ok so then you can use a fake column prompt. Here's one quick approach (nicer and cleaner with LOV tables but I don't if you have any of those).
- Create a fresh prompt using any column you want.
- Open the column formula using the fx button and replace the formula with 'abc'.
- Use "SqL Results" as the "Show" option.
- SQL:
select case when 1=0 the Markets.Region else 'Order Date' from Paint.Markets UNION ALL
select case when 1=0 the Markets.Region else 'Ship Date' from Paint.Markets UNION ALL
select case when 1=0 the Markets.Region else 'Entry Date' from Paint.Markets
- Set Variable = Presentation Variable = @{vPresVarSelectedDate}{Order Date}
- Label = Date
Then in the request, you change the column formula for the date. I'm going to make it short and just assume you called your time dimension alias(es) like the lowest grain:
"@{vPresVarSelectedDate}{Order Date}"."@{vPresVarSelectedDate}{Order Date}"
Cheers,
C. -
How to read the column name of the Table.
hi
I have applied sort functionality to the Table columns. It is working fine but I need to read the table column name before sorting ( On which column user trying to sort ).
Thank you all,
Rama...Hi Alex
Thank you very much for your valid input.
But I am facing one problem here. To get sort functionality I added following logic in WDDOMODIFYVIEW method.
DATA wd_table TYPE REF TO cl_wd_table.
CHECK first_time = abap_true.
wd_table ?= view->get_element( 'TABLE_NAME' ).
wd_this->table_control ?= wd_table->_method_handler.
wd_this->table_control->set_key_attribute_name( 'COL_NAME1' ).
here I hard coded first column name(i.e. COL_NAME1). Is it correct?
and added following code in SORT ACTION of table i.e.
wd_this->table_control->apply_sorting( ).
To get column name I am using the method in SORT ACTION of table which you mentioned but always I am getting COL_NAME1 only....
Please help me how can I rectify this...
Thank you
Rama -
Should the column name in the not in clause be indexed?
Hi, Everyone,
I am having oracle database version 11.0.1.6 on windows server 2003 R2.
I have a query like this:
Select * from icm
where customer_no not in (select customer_no from icm_pre);
I would like to know whether we should index the customer_no column in icm_pre table too? I have indexed customer_no column in icm.
Will there be a better performance if i index both the columns in the 2 tables?
Thanksuser10636796 wrote:
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 1 | 147 | 764 (1)| 00:00:10 |
| 1 | LOAD TABLE CONVENTIONAL | ICM_UPSEL_0_ALL | | | | |
| 2 | HASH GROUP BY | | 1 | 147 | 764 (1)| 00:00:10 |
| 3 | NESTED LOOPS | | | | | |
| 4 | NESTED LOOPS | | 1 | 147 | 763 (1)| 00:00:10 |
|* 5 | HASH JOIN RIGHT ANTI NA | | 1 | 78 | 687 (1)| 00:00:09 |
| 6 | TABLE ACCESS FULL | ICM_UPSEL_1_ALL | 18556 | 235K| 68 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | ICM_UPSEL_MIN_PRDIFF_0 | 223K| 13M| 618 (1)| 00:00:08 |
|* 8 | INDEX RANGE SCAN | PRICE_DIFF_IDX | 84 | | 3 (0)| 00:00:01 |
|* 9 | TABLE ACCESS BY INDEX ROWID| ICM_PRE | 1 | 69 | 76 (0)| 00:00:01 |
Predicate Information (identified by operation id):
5 - access("A"."PR_CODE_BBL"="PR_CODE_BBL")
7 - filter("A"."FLAG"=0 AND "A"."PRICE_DIFF">0 AND "A"."SCORE">=0.5 AND "A"."PRICE_DIFF"<=10)
8 - access("A"."PRICE_DIFF"="B"."PRICE_DIFF")
filter("B"."PRICE_DIFF"<=10 AND "B"."PRICE_DIFF">0)
9 - filter("B"."SCORE">=0.5 AND "B"."FLAG"=0 AND "A"."CUSTOMER_NO"="B"."CUSTOMER_NO" AND
"A"."PR_CODE_BBL"="B"."PR_CODE_BBL" AND "A"."SCORE"="B"."SCORE")
How many rows are there in ICM_UPSEL_MIN_PRDIFF_0, how many match the "constant" predicates, is there an efficient way of finding them, how many will be left after you apply the subquery test.
Ditto for ICM_PRE, and do the figures look like if you apply the subquery to ICM_PRE (which seems possible)
What's the most precise path for joining the two main tables - and is there a supporting index for that join
Notice that you have a duplicated predicate in your original query - is the query correct ?
Notice that the subquery has turned into a "null aware anti join" - so changing the NOT IN to a NOT EXISTS (suggested by another poster) is not logically the same query - do you have a missing constraint (or two) which might help the optimizer find a better path.
Regards
Jonathan Lewis -
Need help on getting the column names of Tabletype
I have a table Mapping with the following values: This Mapping table contains the table names (in Tabname) and the column names(colname) of various tables and values(ValuesTobeFilled) for the columns.
I have to insert into the tables present in the Tabname field with the values present in the ValuesTobeFilled in the columns present in the Colname field.
Note: The Mapping table need not contain all the columns of the base table. The columns that are not present can be filled with null. And this mapping table is not fixed i.e. rows can be inserted/deleted frequently.
Sample values in mapping table:
Tabname Colname ValuesTobeFilled
sample_items Eno Corresponding Expression to get the values from XML input
sample_items Ename Corresponding Expression to get the values from XML input
XXX YYY Corresponding Expression to get the values from XML input
Before filling in the actual tables, I have to store the entire data temporarily and I have used a tabletype declared as follows:
TYPE T_sample_items IS TABLE OF sample_items%ROWTYPE INDEX BY BINARY_INTEGER;
l_sample_items T_sample_items;
Where the table sample_items have the following columns:
• Eno
• Ename
• Eaddress
• Eemail
So, the tabletype should be filled as:
Eno Ename Eaddress EEmail
1 XXX - -
I have declared a cursor to select the values from mapping table and I need to fill in the ValuesTobeFilled values to the corresponding table.
CURSOR c_xpath (c_tname mapping.TABNAME%type)
IS
select * from mapping where tabname = c_tname;
CURSOR c_tables
IS
SELECT DISTINCT TABNAME FROM mapping;
FOR crsr IN c_tables
LOOP
p_tname := CRSR.TABNAME;
FOR csr IN c_xpath(p_tname)
LOOP
IF l_xml_doc.EXISTSNODE(CSR.XPATH_EXP) = 1
THEN
l_node_value := l_xml_doc.extract(CSR.XPATH_EXP).getStringVal(); -- This is the value to be stored in the corresponding column
ELSE
l_node_value := NULL;
END IF;
IF CSR.COLUMN_NAME = ‘eno’
THEN
l_sample_items(1).eno := l_node_value;
ELSIF CSR.COLUMN_NAME = ‘ename’
THEN
l_sample_items(1).name := l_node_value;
END IF;
END LOOP;
END LOOP;
And I need to eliminate hard coding while comparing the column names (in the following piece of code) as the Mapping table values are subject to insertion/deletion:
IF CSR.COLUMN_NAME = ‘eno’
THEN
l_sample_items(1).eno := l_node_value;
ELSIF CSR.COLUMN_NAME = ‘ename’
THEN
l_sample_items(1).ename := l_node_value;
END IF;
I need to insert the values directly into the tabletype without this hardcoding. Please suggest me ways to compare the mapping table values with the field (column) names of the tabletype. If it is not possible using tabletype, please suggest any other ways of fixing the problem.
Many thanks,
GopiI take it this isn't going to be a serious production system at the end of the day?
Storing metadata in tables for extraction and insertion of data is just wrong in so many ways. It smells heavily of Entity Attribute Value modelling, which is the most wrong way to use a relational database and is known to have major performance implications and be liable to bugs and issues. The idea that EAV modelling allows for 'generic' databases where new data items can be added flexibly later on without having to change code is usually justified with an excuse of "it means we don't have to update all our tables when we want a new column" which is easily countered with "if you're adding a single column a good relational design wouldn't require you to add it to more than one table anyway in most cases".
Just what exactly are you trying to do and why? There has to be a better way. -
Hi,
I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display the Column names of the output to Front End. Can any one help me on this.
Example:
Sno | Sname
------- |-------------
1 ABC
2 DEF
I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
Thanks in Advance..:)Look at Re: exporting csv via pl/sql - select statement?
It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray. -
Get the column names of a query (in own plugin)
Hi,
I'm developing my first plugin. It is a region plugin where the plugin-user passes a sql query as the source that the plugin will turn into a formated report.
I found how to retreive the query result by using APEX_PLUGIN_UTIL.GET_DATA functions. Since it is an array, it is simple to cycle through the data rows. But how can i figure out
1) how many columns the query returns
2) whats the name of the columns is?
Thanks a lot in advance for any hint...
Cheers, HansHi Hans,
the package APEX_PLUGIN_UTIL provides everything you need. No need to do your own DBMS_SQL handling!
Have a look at the API documentation and the example of GET_DATA at http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_plugin_util.htm#BABFBIJD
The t_column_value_list record type is a two dimensional array defined as
type t_column_value_list is table of wwv_flow_global.vc_arr2 index by pls_integer;The first array contains an entry for each column.
l_column_value_list.COUNTcan be used to get the number of columns.
l_column_value_list(1).COUNTcan be used to get the number of rows. An example to iterate over all columns and rows:
for l_column in 1 .. l_column_value_list.count loop
for l_row in 1 .. l_column_value_list(l_column).count loop
sys.htp.p('column#=' || l_column || ' row=' || l_row || ' value: ' || l_column_value_list(l_column)(l_row));
end loop;
end loop;If you need the name of the columns and maybe the original data type and not everything converted to VARCHAR2 you have to use the more sophisticated GET_DATA2. See http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_plugin_util.htm#BABFJHAI
This function returns the record type t_column_value_list2 which is defined as
type t_value is record (
varchar2_value varchar2(32767),
number_value number,
date_value date,
timestamp_value timestamp,
timestamp_tz_value timestamp with time zone,
timestamp_ltz_value timestamp with local time zone,
interval_y2m_value interval year to month,
interval_d2s_value interval day to second,
blob_value blob,
bfile_value bfile,
clob_value clob );
type t_value_list is table of t_value index by pls_integer;
type t_column_values is record (
name varchar2(32767),
data_type varchar2(20), /* use c_data_type_* constants to compare */
value_list t_value_list );
type t_column_value_list2 is table of t_column_values index by pls_integer;Again, it's some kind of two dimensional array. The first dimensions are the columns. But this time you also get some details of the parsed column. For example:
for l_column in 1 .. l_column_value_list2.COUNT loop
sys.htp.p('Column Name: ' || l_column_value_list2(l_column).name || ' Data Type: ' || l_column_value_list2(l_column).data_type );
end loop;Will return you all the columns of the SQL statement. Using "name" and "data_type" you can get the column name and the data type. To access the values you can use
for l_column in 1 .. l_column_value_list2.COUNT loop
sys.htp.p('Column Name: ' || l_column_value_list2(l_column).name || ' Data Type: ' || l_column_value_list2(l_column).data_type );
for l_rows in 1 .. l_column_value_list2(l_column).value_list.COUNT loop
sys.htp.p(
'row=' || l_row || ' value: ' ||
apex_plugin_util.get_value_as_varchar2 (
p_data_type => l_column_value_list2(l_column).data_type,
p_value => l_column_value_list2(l_column).value_list(l_row) );
end loop;
end loop;I used apex_plugin_util.get_value_as_varchar2 to always get a VARCHAR2, independent of the actual data type of the column. If you need the original data type, use "number_value", ... of the t_value record type.
Hope that gives you a direction
Patrick
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
How to change recordset bahaviour to accept dynamic column names in the where clause
Hi
im using php-mysql and i make a recordset and i want to make the column names in the where clause to be dynamic like
"select id,name from mytable where $tablename-$myvar";
but when i do this my i break the recordset and it disappear
and when i use variables from advanced recordset it only dynamic for the value of the column not for the column name
and when i write the column name to dynamic as above by hand it truns a red exclamation mark on the server behaviour panel
so i think the only way is to change the recordset behaviour is it? if so How to make it accept dynamic column names?
thanks in advance.As bregent has already explained to you, customizing the recordset code will result in Dreamweaver no longer recognizing the server behavior. This isn't a problem, but it does mean that you need to lay out your dynamic text with the Bindings panel before making any changes. Once you have changed the recordset code, the Bindings panel will no longer recognize the recordset fields.
Using a variable to choose a column name is quite simple, but you need to take some security measures to ensure that the value passed through the query string isn't attempting SQL injection. An effective way of doing this is to create an array of acceptable column names, and check that the value matches.
// create array of acceptable values
$valid = array('column_name1', 'column_name2', 'column_name3');
// if the query string contains an acceptable column name, use it
if (isset($_GET['colname']) && in_array($_GET['colname'], $valid)) {
$col = $GET['colname'];
} else {
// set a default value if the submitted one was invalid
$col = 'column_name1'
You can then use $col directly in the SQL query. -
Alias name for the column name in Prompt
Hi,
I have a scenario where I am taking column names into prompt. I have used the following SQL in the SQL results under "Show" option of the Prompt.
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
UNION ALL
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
My problem here is I am getting the column names into the Prompt as "Orders"."By OrderDate" and "Orders"."By ShipDate", which is not acceptable and readable for mat for the user. Is there any way that I can assign an alias name for the column name such as OrderDate and ShipDate in the above SQL.
Your quick respose is appreciated.
Thanks,
Ramahi,
try an alternative one....in your administrator make new columns with alias to ones you want...so you wiil be able to show whatever you want.
Otherwise,is it possible to show
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' as "xxxxxxxxxxxxx"END FROM " Real Time"
UNION ALL
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' as "yyyyyyyyyyyyyyyy"END FROM "Real Time"
Ending,you want the data from your columns?or just the name??
hope i helped...
http://greekoraclebi.blogspot.com/ -
Alias Names for Column names in the Prompt
Hi,
I have a scenario where I am taking column names into prompt. I have used the following SQL in the SQL results under "Show" option of the Prompt.
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
UNION ALL
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
My problem here is I am getting the column names into the Prompt as "Orders"."By OrderDate" and "Orders"."By ShipDate", which is not acceptable and readable format for the user. I tried using the alias name in the SQL query this way.
SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END) AS "By OrderDate" FROM " Real Time"
UNION ALL
SELECT (CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END) AS "By ShipDate" FROM "Real Time"
but it is throwing an error.Is there any way that I can assign an alias name for the column names such as OrderDate and ShipDate in the above SQL.
Your quick respose is appreciated.
Thanks,
RamaChange ur
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By OrderDate"' END FROM " Real Time"
UNION ALL
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE '"Orders"."By ShipDate"' END FROM "Real Time"
To
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By OrderDate END FROM " Real Time"
UNION ALL
SELECT CASE WHEN 1=0 THEN AGE.AGE ELSE By ShipDate END FROM "Real Time"
So that it displays the Name as required
Then in the Fx for that column in the Report Use '"Orders"."@Presentation variable"'.
This worked for me Let me know if it worked for you. -
How can I list all the column names of a table by programming?
Hi,
Now I want to write an function which has the following features:
Firstly, The function was given a parameter as table name.
Then, it will lists all the columns names of the table.
e.g
table: person
---firstName------lastName----+
Michale Jackson
We can get the columns 'firstname' and 'lastName' by calling the function with table name 'person'.
And I also wonder that where I can get reference book or any other materials?
Thanks.
Edited by: wenjing wang on Feb 15, 2008 6:42 AM
Edited by: wenjing wang on Feb 15, 2008 6:57 AMhi,
hope the below code helps u. Just take the headee which contains the field name and split it like below and compare it with the field name u want here 'last name'.
here,
'First name' will be in wt_filedata1 and remaining field names in wt_filedata2, so 'do' continues.
c_tab must be the separator, either , or + or tab etc..
CODE:
read table person into wl_header index 1.
do.
split wl_header at c_tab into: wt_filedata1 wt_filedata2.
if wt_filedata1 <> 'lastname'.
cnt1 = cnt1 + 1.
wl_header = wt_filedata2.
else.
exit.
endif.
enddo.
Please reward if it is useful.
regards,
sri
Maybe you are looking for
-
Windows 8.1 problems with my enterprise user
Hi all, I have two problems that I need help with. For background information, I am in an IT-support enterprise and I am a support person for a client. Since I am developing and maintaining an application for this client that is to be used inside the
-
I'm working on this project and it has background music. I need the background music to stop (i.e crop the background music) and then make it start in another point. In simpler words I just need to crop a part of the audio out and continue by fading,
-
Transfer of data from flexible planning to PIR table when saving the trans.
Dear all. I have a query regarding Flexible LIS Planning (MC93 or MC94). My question is about on transaction MC94. When I save the data on this transaction, it automatically transfers to PIR (Planned Independent Requirement) table. I donu2019t know h
-
Partitioning a table with brspace
Hello, we are under SAP 46C and oracle 10.2.0.2. we have a table that size over than 200GB, we would to go ahead with partitioning and archiving into a lot of parts. My question: in the past we use a full oracle method with exchange partition. Actual
-
ASPECTHD - Low compression to High compression
This is more a Cineform question, but since they'Re so many CF users in here and it concerns Premiere workflow I guess it has it's place on this forum. When digitizing tapes with AspectHD, if I go with Low compression to save HD space to later just h