How the BEE lines column names populated in OTL?
Hi,
I am trying to figure out how the elementry entry lines column names( in the pay_batch_lines table they are from value_1 to Value_15) populated in the form dynamically. I checked the pay_input_values_f table and it seems the element entry form is showing the columns for the vlaues in the name column for a particular element_type_id. So can we say the element entry lines shows the column which are in pay_input_values_f table and stores data ascending order of display sequence in pay_input_values_f table.
Thanks and Regards.
Extracted from the ProC manual from Oracle 7.3 (don't ask :-{).
Chapter 11: Using Dynamic SQL
Section: Using Method 4
What Is a SQLDA?
A SQLDA is a hostprogram data structure that holds descriptions of
selectlist items or input host variables.
SQLDA variables are not defined in the Declare Section.
The select SQLDA contains the following information about a query
select list:
maximum number of columns that can be DESCRIBEd
actual number of columns found by DESCRIBE
addresses of buffers to store column values
lengths of column values
datatypes of column values
addresses of indicatorvariable values
addresses of buffers to store column names
sizes of buffers to store column names
current lengths of column names
NOTICE THE LAST THREE ENTRIES!
Could this also be usefull?
Enjoy.
Similar Messages
-
How to modify a column name & How to modify a constraint name
How to modify a column name?
How to modify a primary key constraint name if the pk has been referenced by another foreign key?
Thanks.Hi,
What version of oracle are you using? If it is 9i,
then you can the command
alter table <table_name> rename column <column_name> to <new_column>;
if it is 8i or earlier, you can create a view with the required names.
hth
Always post the oracle version and the platform you are using to get better response. -
How to pull only column names from a SELECT query without running it
How to pull only column names from a SELECT statement without executing it? It seems there is getMetaData() in Java to pull the column names while sql is being prepared and before it gets executed. I need to get the columns whether we run the sql or not.
Maybe something like this is what you are looking for or at least will give you some ideas.
public static DataSet MaterializeDataSet(string _connectionString, string _sqlSelect, bool _returnProviderSpecificTypes, bool _includeSchema, bool _fillTable)
DataSet ds = null;
using (OracleConnection _oraconn = new OracleConnection(_connectionString))
try
_oraconn.Open();
using (OracleCommand cmd = new OracleCommand(_sqlSelect, _oraconn))
cmd.CommandType = CommandType.Text;
using (OracleDataAdapter da = new OracleDataAdapter(cmd))
da.ReturnProviderSpecificTypes = _returnProviderSpecificTypes;
//da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
if (_includeSchema == true)
ds = new DataSet("SCHEMASUPPLIED");
da.FillSchema(ds, SchemaType.Source);
if (_fillTable == true)
da.Fill(ds.Tables[0]);
else
ds = new DataSet("SCHEMANOTSUPPLIED");
if (_fillTable == true)
da.Fill(ds);
ds.Tables[0].TableName = "Table";
}//using da
} //using cmd
catch (OracleException _oraEx)
throw (_oraEx); // Actually rethrow
catch (System.Exception _sysEx)
throw (_sysEx); // Actually rethrow
finally
if (_oraconn.State == ConnectionState.Broken || _oraconn.State == ConnectionState.Open)
_oraconn.Close();
}//using oraconn
if (ds != null)
if (ds.Tables != null && ds.Tables[0] != null)
return ds;
else
return null;
else
return null;
}r,
dennis -
How to rename a column name in a table? Thanks first!
I tried to drop a column age from table student by writing the
following in the sql plus environment as :
SQL> alter table student drop column age ;
but I found the following error
ORA-00905: 缺少关键字 (Lack of Key word)
I have oracle enterprise edition 8.0.5 installed at windows 2000
thank you
And I want to know how to rename a column name in a table?
thanksIn Oracle 8i, your syntax would have worked. However, if I
recall correctly, in Oracle 8.0, you can't rename or drop a
column directly. One way to get around that problem is to
create another table based on a select statement from your
original table, providing the new column name as an alias if you
want to change the column name, or omitting that column from the
select statement if you just want to drop it. Then drop the
original table. Then re-create the original table based on a
select statement from the other table. Then you can drop the
other table. Here is an example:
CREATE TABLE temporary_table_name
AS
SELECT age AS new_column_name,
other_columns
FROM student
DROP TABLE student
CREATE TABLE student
AS
SELECT *
FROM temporary_table_name
DROP TABLE temporary_table_name
Something that you need to consider before doing this is
dependencies. You need to make a list of all your dependecies
before you do this, so that you can re-create them afterwards.
If there are a lot of them, it might be worthwhile to do
something else, like creating a view with an alias for the
column or just providing an alias in a select. It depends on
what you need the different column name for. -
How to bind a column name in PL/SQL
i have this code in a transaction report.
DECLARE
q VARCHAR2 (1000);
t VARCHAR2 (15);
BEGIN
t := '11110000';
q := q || 'select STARTDATE, PHONESOURCE, PHONETO, DURATION ';
q := q || 'from TRANSACTION ';
q := q || 'where TRANS_ID = ' ||t|| 'and STARTDATE between :P3_DATE_FROM and :P3_DATE_TO ';
q := q || 'and PHONESOURCE = :P3_FILTER_BY_TEXT';
RETURN q;
END;
I have a combo box item which suppose to select between 2 different columns (PHONESOURCE & PHONEDEST) lets call this combo box: P3_FILTER_BY.
I need to replace 'PHONESOURCE' (marked) with this combo box in order to set the query dynamically. the question is: is it possible? and if so how?
i tried few variaton of replacing it, but it wouldn't work.thank u for your answer,
However, i've thought about it and tried it before. but it gave me this error when applying the edit page:
"LS-00103: Encountered the symbol "&" when expecting one of the following..."
even when i checked the "Use Generic Column Names (parse query at runtime only)" check box it gave me this error in runtime.
so, what should i do ?? -
How to know exact column name in following error (oracle9i)
Hi all,
Please telll me
How to know exact column name in following error
ORA-01401: inserted value too large for column
Prashant
nullIf you are running this in your SQL*Plus session then you can easily check it out --
satyaki>
satyaki>create table test_sat
2 as
3 select empno,ename,job
4 from emp;
Table created.
satyaki>
satyaki>
satyaki>desc test_sat;
Name Null? Type
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>insert into test_sat values(5555,'Robin','BU');
1 row created.
satyaki>
satyaki>
satyaki>insert into test_sat values(5555,'Arama Baager Taaja','FR');
insert into test_sat values(5555,'Arama Baager Taaja','FR')
ERROR at line 1:
ORA-01401: inserted value too large for column
satyaki>insert into test_sat values(55557,'Arama','FR');
insert into test_sat values(55557,'Arama','FR')
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column
satyaki>
satyaki>insert into test_sat values(5555,'Arama','ACCOUNTING');
insert into test_sat values(5555,'Arama','ACCOUNTING')
ERROR at line 1:
ORA-01401: inserted value too large for column
satyaki>Regards.
Satyaki De. -
How to dynamically set column name in Answers
Hi.
How to dynamically set column name in Answers, for example I want to put presentation variable in column header. Is this possible?
Regards,
Goran Ocko
http://108obiee.blogspot.com/May be a rude way .. but it works.
Add narrative view and use Java script to change the column headings based on the variables.
<script language="javascript" type="text/javascript">
var a = document.getElementById('idResultsTableParent');
var rows= a.getElementsByTagName('tr');
rows[1].cells[1].innerText ="@{Presentation Variable}";
</script>
Editing the same post to remove irrelevant information.
- Girish -
How can I edit column name/heading in Column Attributes?
Hi All,
In the link "*Home>Application Builder>Application 1000>Page 2>Report Attributes>Column Attributes*", can someone help me how to edit/modify 'Column Name' and 'Column Heading' ?
Thanks in advance.
Regards
SharathHi,
There is Headings Type radio buttons above report column attributes.
Select Headings Type "Custom" and then you can change Headings.
Column names (Alias) you need change to report query.
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0 -
How to use get column name.vi in SQL toolkit 2.0?
Due to the vi "get column name.vi" paremeters,no table name has connected to the vi. So, I want to ask how to use this vi for gain one column name of a table. Maybe there are some other ways to solve column name getting.
Thanks.Thanks!
Error 4101 Description:
Execute SQL - The connection, statement, or query handle you provided is not valid.
I don't just used the toolkit in a while,now, I am developing a irrigation system. For the table field names defined by users,column names must be known before any select operations. Do you have any other good idea about drawing out the columnname parameters?
As you know, a valid DSN and table have been also available. The database I used is Access. The bad thing to me is that there is no any text information gotten. And I think, it may be some problems in connection way which I don't find out.
Really appreciated by your reply.
Could you give me some example in the aspect?
Thank you again. -
How to get the constraintlist and column name in a table?
Hi,
can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.
Thanks,
DeekayDeekay wrote:
can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.To get constraint type:
select constraint_type from user_constraints where constraint_name = 'YOUR CONSTRAINT NAME';To get constraint columns:
SELECT column_name from user_cons_columns where constraint_name = 'YOUR CONSTRAINT NAME';SY. -
How to spool the null alias column names in sppol file
Hi,
I have to spool the data and having some issues.
SELECT DISTINCT a.market_name,a.market_code,*''as empid* from ssp2_pcat.markets a ;
in the above select sql I have created extra null column as empid
when I spool with tild dilimited I am not getting column name(empid) in spool file.
a.market_name||'~'||a.market_code||'~'||'''empid'
SSB ~25010~' empid
In the feed file it should be null. but the alias column is populted with empid
Can you please let me know what is wrong here?
Thanks,SELECT DISTINCT a.market_name,a.market_code,*''as empid* from ssp2_pcat.markets a ;
in the above select sql I have created extra null column as empid
when I spool with tild dilimited I am not getting column name(empid) in spool file.
a.market_name||'~'||a.market_code||'~'||'''empid'
SSB ~25010~' empid
In the feed file it should be null. but the alias column is populted with empid
Can you please let me know what is wrong here?
Thanks,Try this one
SELECT DISTINCT a.market_name||'`'||a.market_code as empid from ssp2_pcat.markets a ; -
What is the order of Column Names in Sqlite query results?
I am writing an application using Adobe Air, Sqlite, and Javascript.
After writing the following select statement:
SELECT field1, field 2, field 3, field 4 FROM TableA;
I would like to get the columnName/data combination from each row -- which I do successfully with a loop:
var columnName="";
for (columnName in selResults.data[i]) {
output+=columnName + ":" + selResultsdata[i][columnName] + ";";
My issue is that the column names come out in a different order every time I run the query and never once have they come out in the desired order -- field 1, field 2, field 3, field 4. If I run the query in Firefox's Sqlite Manager, the columns come out in the "proper" order. When I run them in Adobe Air, the order will be the same if I run the query mulitple times without closing the app. If I make a change such as declaring the columnName variable with "" before the for column, or declare it as (var = columnName in selResults.data) , then the order changes. If I shut down my app and re-open after lunch and run query, it comes out in another order. At this time, I'm not interested in the order of the rows, just the order of the columns in each output row. I've even tried assiging an index to columnName which seems to just pick up a single letter of the columnName.
I'm in the process of changing my HTML presentation of the data to assign a precise columnName to an HTML table title, but I'm reluctant to let go of the above concept as I think my separation of HTML/presentation and Javascript would be better if I could use the solution described above.
So, does anybody know how to force the order of the columnNames in my output -- or what I'm doing to cause it to come out in a different order?
JeaneTechnically there isn't any "order" for the return columns. They aren't returned as an Array -- they're just properties on an Object instance (a "generic object"). The random order you're seeing is the behavior of the for..in loop iterating over the properties of the object. Unfortunately, with a for..in loop there is no guaranteed order for iterating over properties (and, as you've seen, it tends to vary wildly).
The only solution is to create your own list of the column names and sort it the way you want to, then use that to create your output. For example, use the for..in loop to loop over the properties, but rather than actually get the values, just dump the column names into an Array:
var columnName="";
var columns = [];
for (columnName in selResults.data[i]) {
columns.push(columnName);
columns = columns.sort(); // just uses the default alphabetical sort -- you would customize this if desired
var j = 0;
for (j = 0; j < columns.length; j++) {
columnName = columns[j];
output+=columnName + ":" + selResultsdata[i][columnName] + ";"; -
How to get only column names from different tables as single table columns
Hi All,
I have one requirement in which we want only column names from different tables.
for example :
I have three tables T1 ,T2, T3 having
col1 clo2 clo3 --> T1 ,
col3 col5 ,clo6 --> T2 ,
Clo6 col8 col9 --> T3
columns i want to get only all Column names from all table as single Resultset not any data from that how can i get that empty resultset
because this empty result i want to bind in datagridview(front end) as Empty resultset
Please tell me anyways to do this
Niraj SevalkarIf I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
SET FMTONLY ON
SELECT Col1, Col2, Col3, ....., Coln
FROM
T1 CROSS JOIN T2 CROSS JOIN T3
SET FMTONLY OFF
Another alternative is to include an imposible contition
SELECT Col1, Col2, Col3, ....., Coln
FROM
T1 CROSS JOIN T2 CROSS JOIN T3
WHERE 1 = 0
If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
"No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena -
How to refer a column name in form report
Hi,
How can i refer a column name in the form report. My issue is that " I have a form report in that i have column name when i use to click the column name it should bring me to next page with the corresponding values of the column."
Here i have achieved that when i click on column name(in Page1) it brings me to next page(Page2). but in the next page(P2) i want to display(only display) the corresponding values of the selected column(Page1) but the values should not be editable and should not be in text field it should be in display only field.
So how can i write a sql query in display only souce field. Ie, how can i refer the column name in(page1) form report.Hi Karthik
Very good morning.
I think u have column link in the first page and when u select a data in the first page and when u r moving to the next page the the corresponding data need to there is it correct.
For example You have table Employee and u have a select list in the first page contains name of the employee when u select one name and corresponding datas of the employee need to be in the second page.
So Dont clear the cache of the first page.
I the next page make the page items as display only and give the source of the all items a returning the single sql query.
If u have four items in the next page namely p2_sal, P2emp_no etc..
Then use like this
select sal from emp where emp_name=:P1_EMPNAME
Hopes this might helps you.
Thanks & Regards
Srikkanth.M -
How to rename a column name while copying it from another table
Hi All,
I am copying rows between two table TableA to TableB
but I wanted to insert data in he column name (username) in tableA to a column named (NewUser) in tableB
How do I go about that?
insert into TableB
select Username
from TableA
ThanksIf you want to only move username, then just specify the column name for TableB, that is
insert into TableB(NewUser)
select Username
from TableA
If you want to move all (or some) of the columns while putting Username in a column named NewUser, just list the columns in both the insert into part and the select part, for example
insert into TableB(NewUser, ColA, ColB, ColC)
select Username, ColA, ColB, ColC
from TableA
Tom
Maybe you are looking for
-
How can I reduce wind noise in Final Cut Pro X?
The footage has been shot. I used a Sony HDR-SR12 for the footage. We were shooting outside in what was almost a wind tunnel it seemed. I have only just started into FCPx with no other experience. The only other production software I have is Garag
-
We have the C160 (also have an S160 but I will just discuss the C160 in this thread). Since its no longer sold, I was wondering if it still has the power to run the new 8.5.6-074 that went GA. I do not see it as an available upgrade, however I am o
-
HT3743 my cpmputer is showing an error code 1015. please help me.
hello i'm facing problem in restoring software
-
Hi all, I have a function collecting years from another table and creating a dynamic sql statement to included all years. Also I set some variables in the where statement. At the end of the function I use execute immediate. The issue with this method
-
Error While Importing Ustream XML Profile
I get this error message while importing my Ustream XML profile. This is what I'm trying to do. http://www.ustream.tv/higher-quality Any help is greatly appreciated.