questions to move a column name as parameter. Please advice.
Hi allI have some difficulties with oracle reports. I am a novice with the beginner 2 days.
I am not able to use the lexical settings in reports. my query is as easy as
Select & column-name abc xyz;
I tried to make a setting before creating the SQL but I always get the error saying that ORA-00922: lack of expression.
also I tried with bind variables like
Select: col_name abc xyz;
but it gives a: inplace Column of records the data.
some could help me with step by step procedure to create a lexical parameter.
I am using reports 6i.
Please let me know for details.
Thanks in advance!
Hello
I suggest you create a sing an example 'Basic' of the EMP table: (see the demobld.sql script provided with Developer Suite to create this table)
Create a new report
Create a COLUMN name parameter:
Name = COLNAME
DataType = character
Width = 20
Initial value = ENAME
Create a SQL query: select & emp colname
Create a page layout manually or with the wizard
Click on the button «Run paper Layout»
Enter a valid value for the 'column' name (ENAME / JOB / SAL / COMM /...)
Concerning
Tags: Oracle Development
Similar Questions
-
How can I move a column in a table please
www.hunterstables.co.UK/Pricelist/HTML
I have a 'List of Extra Awards' table and would spend the two columns. I tried dragging, but that doesn't seem to work, can anyone help me please.
The first column is wood skates, then the price. I would like to move the column ' awards more towards the right and the same thing with 'channels towing, and then the price. "
This looks a little too crumpled upward.
Thank you.
Karen
Hello Karen,
my eyes, to first 'restore' your line "EXTRA LIST OF PRICES (including VAT)" in a table of 5 cells. For this I line copy two would remove entries and copy 'EXTRAS, (TTC) PRICE LIST' in the first column. After that, you can delete aso.
I got this:
EXTRA (TTC) PRICE LIST
Skates of wood 24 ft £160 Full score (PLY) £140 Wood skids 36 ft £210 Partition of half (PLY) £85 12 ft metal skates £250 8 ft wooden door £150 18 ft metal skates £300 8 ' galvanized grid £140 Skates metal 24 ft £350 Upper door £60 Skates metal 36 ft £550 Talk about Grill £180 OSB Kick boards 11mm £55 per box of 12 feet Metal Chew strips £12 each Kick 18mm OSB boards £70 per 12 foot box Gutter 12 £46 PLY Kick boards of 12mm £100 per box of 12 feet 2 sliding rails £30 Skylight £36 Grass on the ground anchors £50 Here you can play with percentages.
Hans-Günter
-
by using the parameter entry is as column names
Hi all
I have a stored proc in which I get the column names as parameter with string delimited by commas. For example, if I get
Address, city, name, zip_code as a varchar2 in my stored proc is the name of the parameter
p_param
I can do
Select p_param from
VW_Personal
or is their any simple way, I can use these list of parameters by commas as the column names in my stored proc.
Any help will be appreciated.
Thank youI copy - paste the same answer I gave to another question this morning:
You can use ref Cursor, anyway when you retrieve the values you need to know the number and the type of data in the columns.
SQL> create or replace procedure print_enames(in_col in varchar, in_val in varchar2) is 2 c sys_refcursor; 3 v_name emp.ename%type; 4 begin 5 open c for 'select ename from emp where '||DBMS_ASSERT.SIMPLE_SQL_NAME(in_col)||'= :1 ' using in_val; 6 loop 7 fetch c into v_name; 8 exit when c%notfound; 9 dbms_output.put_line('ename='||v_name); 10 end loop; 11 end; 12 / Procedure created. SQL> select * from emp; 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 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. SQL> set serverout on SQL> exec print_enames('mgr','7839') ename=JONES ename=BLAKE ename=CLARK PL/SQL procedure successfully completed. SQL> exec print_enames('sal','1250') ename=WARD ename=MARTIN PL/SQL procedure successfully completed. SQL> exec print_enames('deptno','30') ename=ALLEN ename=WARD ename=MARTIN ename=BLAKE ename=TURNER ename=JAMES PL/SQL procedure successfully completed.
Max
Published by: Massimo Ruocchio, June 23, 2011 17:02
As well stressed Centinul this approach is prone to sql injection.
Usage of DBMS_ASSERT function. SIMPLE_SQL_NAME can avoid this problem, but there are onliy on Oracle 10.2 and later. -
Something's happened awhile and when I create a folder which appears the first column is the column 'Date modified '. By default, how can return the first column 'Name' without having to move it manually every time?
Hello
I suggest you to visit these links and check if it helps:
http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders#section_4
http://Windows.Microsoft.com/en-us/Windows-Vista/folders-frequently-asked-questions
It will be useful.
-
IN parameter is the string of column names I want to SELECT delimited
Hi guys,.
Please bare with me. Not a pro at writing stored procedures.
What I try to do is to pass a parameter of 'IN' to the proc. The setting is a varchar2 which is a comma-delimited string.
I want to put this string in the SELECT statement.
This setting is called "P_SelectFields".
The value in the passage in the proc is like:
P_SelectFields = ' CUSTOMERS SUM (CLI_SERVED) AS SUM (EI_INTC) + SUM (NEI_INTC) AS INTERVENTIONS,
SUM (TOT_EMPRTN) AS EMP_RETURN, SUM (TOTAL_RTS) AS SCHOOL_RETURN
"
That's what I've got and I know that it works, if I put the string instead of the parameter it works. !
PROCEDURE GET_NATIONAL_TOTAL_RESULTS (P_SelectFields IN varchar2, P_AGREEMENT_TYPE_IND AGREEMENT_TYPE.agreement_type_ind%TYPE, io_cursor in SYS_REFCURSOR)
IS
BEGIN
OPEN FOR Io_cursor
SELECT year_desc,
P_SelectFields - that's where I want my partameter go.
OF SPF_RESULT_VW
WHERE r_num = 1 - FILTER for the LAST PERIOD for EACH YEAR
and agreement_type_ind = P_AGREEMENT_TYPE_IND - desired FILTER FOR Agreement_type_ind
GROUP BY year_desc
ORDER BY year_desc
;
END GET_NATIONAL_TOTAL_RESULTS;
That's what I'm after you run the proc.
YEAR_DESC = 2011-2012
: B2 = SUM (CLI_SERVED) ACE, SUM (EI_INTC) CUSTOMERS + EMP_RETURN SUM (NEI_INTC) AS OF THE INTERVENTIONS, SUCH AS SUM (TOT_EMPRTN), SUM (TOTAL_RTS) SCHOOL_RETURN
Where is ': B2 = "come from?".
What can I do to make my parameter is "picked up" by the proc?
Thank youFirstly: in relational databases, there is no distinction between 'fields '. Tables is not 'fields', they have columns.
It is my experience that that call columns 'fields' basically treats the database as a flat file system. It's a very bad idea!If you want to pass as a parameter column names, you need dynamic SQL.
However, PL/SQL was invented to reduce the analysis and using of the dynamic SQL, you'll at least soft-parse each statement.Dynamic SQL is obviously in the documentation, but most people here think that they don't need to read the documentation.
So, for once
glanceOPEN io_cursor FOR 'SELECT year_desc,'|| P_SelectColumns|| ' FROM SPF_RESULT_VW '|| 'WHERE r_num = 1 '|| --FILTER FOR LATEST PERIOD FOR EACH YEAR 'and agreement_type_ind = P_AGREEMENT_TYPE_IND '||-- FILTER FOR desired Agreement_type_ind 'GROUP BY year_desc '|| 'ORDER BY year_desc' ;
Please note that I have renamed the parameter.
-
How to move the column label to the right of the column name in the project Panel
How does a gesture the column label in the project panel to the left of the name to the right of the column name column... machines windows can do this while the macbook pro (3 of 3) this is impossible...
I still want the opportunity to bring him here where he was.
-
By the way a column as a parameter name
Good afternoon
I was wondering if any of you ever come across the following situation and found a way to work around...
I recently created a PivotTable using SQL query (body of function from PL/SQL returning SQL query).
The table was composed of the following information:
-Date range, Type of object, and count.
The final table looks like this (forgive the lack of fancy markup, if all goes well he will get the message):
And he keeps going.Date Object A Object B Object D Object G 01-apr-09 10 16 50 43 02-apr-09 1 15 77 35 03-apr-09 19 0 14 17 04-apr-09 15 7 70 20 05-apr-09 7 6 65 50
I had to create the code dynamically because I don't know what objects I will get course in the same range of dates (for example: I could have something to object C and nothing for object D in March). I had a loop of the cursor in the types of objects before creating the SQL query that creates the table above.
The table now works fine. What I'm trying to do now is to do a little data mining.
Since everything is built dynamically, I can't give the real column names in my report. Is it possible that, when I click on, for example, the '10', on April 1 in one who opposed the column heading 'Object A' is passed? #COL02 # pass only the value '10', which is not what I want, and I have tried other variations such as: COL02 and & COL02. without much luck.
If you can shed some light on this problem, that would be greatly appreciated!
Thank you for your time.
IvanHello
You can also use the substitution #COLUMN_HEADER # (ie. not #COL2 #, but in fact #COLUMN_HEADER #)
See you soon
Ben
-
404 error when the lowest selection (column name) for the metadata 11 g dictionary
Hi allI get a 404 error when I select a column name and click the link for dictionary of metadata. I get the 404 because obiee is allowing more 179 characters for the web link. You do not get a 404 error if you click on one of the shorter column names.
When you select the number of offices with commands and then click the metadata dictionary button you get the error 404 below and the web address is truncated causing the 404
This is the product link
http / / self/analyticsRes/SampleAppLite_BI0024/SubjectArea/PRCAT_Sample_Sales_Lite80cb6a2e /.
PRT_Calculated_Facts80cb6aa9/PRC_N_of_Offices_with_Or80cb6cfb.x
If you type the ml at the end, you can see the Web page you want. Also if you click on the area in question and then click the dictionary of metadata and access the column from here the link works.
We receive this error in our Dictionary of metadata generated, but I can also reproduce the problem with the sample app, we have placed the dictionary in the folder anlyticsRes.
I just wanted to check to see if someone else has this problem.
Thanks in advance!
S. Clark
I opened a SR and a bug has already been reported, and the solution is in the latest patch.
Solution
The fix for the Bug 17449036
is included in the bundle 20124371 Patch (patch bundle 11.1.1.7.150120). See this note for more information:
Note 1488475.1: OBIEE 11 g: required and recommended patches and Patch Sets
There is also a one-off Patch 17449036 on top of previous patch bundle for different platforms.
It is advisable to be in the latest patch bundle. In this case, you prefer to apply exceptional measures, you can do but
It is not for all platforms and all the patches together. -
Can I use * and the list of the column names in a select query
PLSQL again. Can I use * and the list of the column names in a select query, i.e. Select *, col1, col2 from Mytable. When I do that my questions tend to the bomb. Can do in other databases.
Thank you
Mike
Hi, Mike,.
If there is something else in the more SELECT clause *, then * must be qualified with a table name or alias.
For example:
SELECT Mytable. *, col1, col2
FROM MyTable;
-
How to find the same column name in different tables in the same schema
Hello
I find the 'ename' column name in different tables in the same schema.
Thank you
NrHello
Try this query
Select column_name, table_name from user_tab_columns where column_name = 'ENAME ';
Award points and end the debate, if your question is answered or mark if she was...
Kind regards
Lacouture.
-
How to propagate the column names in the file engineering reverse to db table?
Hello
I have successfully reverse engineered column about 100 names on the first line of a file flat .cvs in a data store of file (technology) using ODI 11.1.1.
Now I would like to imitate what I used to do with OWB: simply propagate these column names from my data file store flat source to my table (in the meantime) target store empty db.
How can I do?
---
I tried as much as one can intuitively: drag the columns in my store of source (depending on model) to my target db table that is open in the main view, but ODI Studio just opens as Inspector tabs for columns.
In my loading interface, if I choose 'Temporary target', it behaves exactly as I want (rigth click .cvs file to map the tab 'Add a column to the target'), even the chains are transformed into Varchar2...
... only, it will not implement target as a permanent store if I uncheck 'Temporary' and I can't select and copy the entire grid to export elsewhere.
Generating the DDL to create a target table db and reverse would still be acceptable to me but generating the DDL for a store file does not make sense to ODI.
Any help?
Thank you2 quick ways to do:
1.) copies the file according to the data store and then move it to the Oracle based model.
2.) use CFD (designer of common Format) and create a diagram in your model of Oracle based. Drag and drop the file based model in there. -
Generate CSV with pl.sql column names
Hi guys,.
Well, I am back after a long hiatus in this form, was occupied by SAP BI project.
Now do some oralce - sap project, well here, I needed to generate a CSV of many many queries,
I can do via sql, but I tot it would be better to write a package or a common procedure to generate csv files
ex, if I pass the query to the proceudre it should generate csv on the server directory file, later I send these file to the users concerned.
The e-mail part is later, but first of all is to have a package of generic to launch and run the query n generate the csv file.
I guess this should be possible using native dynamic sql and utl_ package, but I don't know how to get the columns name,
If one has implemented this please explain me the way,.
ex:
Select emp,mgr, empno from emp; emp mgr empno 1 1 123 2 1 234 something like that hope my question is clear
Maybe try this
http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551135514501758779
-
use a (selection list) element as the column name in the select?
I have a popup LOV key based on a select (dynamic list of values)
I want to display and return - select columns in the select statement to be determined by another list.
I tried:
Select distinct: P133_COLUMN d: P133_COLUMN r
FROM MyTable
but then I don't you the value of: P133_COLUMN... so if: P133_COLUMN is 'EMPNO' LOV popup displays the text "EMPNO" and referred the text 'EMPNO', not the empno column values...
If I change
Select distinct P133_COLUMN d & P133_COLUMN r
FROM MyTable
I get the standard
"LOV query is not valid, a display and a return value is needed, the column names must be different. If your query contains a query online, the first CLAUSE in the SQL statement must not belong to the query online. »
Anyone?
Also, I was wondering if it is possible to set the textfield object in the item popup LOV to accept the input text directly as well as the selected value, but the first part of the question is the important part.
Concerning
AndreasHello Andy,
Change your LOV to something like this:
'select' return. : P133_COLUMN |' d, ' | : P133_COLUMN | "as r from myTable";Greetings,
Roelhttp://roelhartman.blogspot.com/
-
Anyway, to remove the column names in the result of the query of SQLPLUS
Hello
I am using sqlplus to run a script that returns results with the column names.
Anyway is to omit the names of columns in the result of the sqlplus query?
I would like to have only results with their column names in the output.
Thanks in advance!Hello
Maybe your LINES (IZE) is not defined?
SCOTT>set lines 130 SCOTT>select status, machine, module 2 from v$session 3 where upper(username) = 'SCOTT'; STATUS MACHINE MODULE -------- ---------------------------------------------------------------- ------------------------------------------------ INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5 ACTIVE PFAE3\VPC4894-03 SQL*Plus 2 rows selected. SCOTT>
As an alternative to the linesize parameter, you can format the columns:
SCOTT>set lines 80 SCOTT>col status for a8 SCOTT>col machine for a30 SCOTT>col module for a30 SCOTT>select status, machine, module 2 from v$session 3 where upper(username) = 'SCOTT'; STATUS MACHINE MODULE -------- ------------------------------ ------------------------------ INACTIVE PFAE3\VPC4894-03 TOAD 9.7.2.5 ACTIVE PFAE3\VPC4894-03 SQL*Plus 2 rows selected. SCOTT>
Concerning
Peter -
Hi guys,.
I have a very trivial question? Is * 30_DAYS * a column name valid?
Thank you
Published by: user10696492 on July 1st, 2009 15:19Ok... I'll try for him...
SQL> create table shame_on_you (30_days number); create table shame_on_you (30_days number) * ERROR at line 1: ORA-00904: : invalid identifier SQL> create table shame_on_you ("30_days" number); Table created. SQL> desc shame_on_you; Name Null? Type --------------------- -------- -------------------- 30_days NUMBER
User10696492 Yes, what is the answer?
See you soon
Legatti
Maybe you are looking for
-
I created a VI who would Excel open, write it down, and then save as original_timestamp (this way I had a clean every time model), the problem I stumbled on was I opened the original every time whenever so I wrote the new worksheet, only the last lea
-
How can I print to hp photosmart all-in-one ipad 7280
How can I print to hp photosmart all-in-one ipad 7280
-
Windows media player why I can't play my songs on my Media Player?
WHAT IS WRONG WITH MY MEDIA PLAYER
-
Problem with memory DDR2 1 GB card
I installed a memory card of 1 GB DDR2 PC2-4300 and it caused my system crash. What can I do to fix this? I'm running on an a1340n HP Pavilion with WIN XP Media Center Edition 2005 with Service Pack 3. I was trying to spend with more memory. I am the
-
original title: cannot open files I am trying to create a disk that I've done it before like 6 months ago and it is not allowing me to open files is just saying 74 files could not be added. .any suggestions?