Using the variable of physical table of type "select".
Hello!I have to use the query as the physical table (in the Administration tool - http://file.qip.ru/file/120930377/8713693/1_online.html):
SELECT ID, CODE
FROM TABLE (pkg.output('1','2'))
This code works well. I need to insert instead of session variables of the ' 1 'and ' 2', parameters which will be fixed to the dashboard.How to set the variable in this query? As variants @{test} do not work.
Good timing, Im bother with that now.
use: "VALUEOF (NQ_SESSION.variable_name).
don't forget the other single quotes as the substituted value is not quoted.
Tags: Business Intelligence
Similar Questions
-
Dynamically create a file using the variable
HI, I am facing a problem in creating file on the time of execution using the variable.
I have a variable file name. In the tab refresh, I wrote a query SELECT TO_CHAR (SYSDATE, 'YYYY, MM, DD') | 'TEST' FOR DOUBLE. I tested the variable and its value is correct.
I've created an interface allowing to extract the data in the table and store it in the file. I assigned the variable file name in the file.
Now when I run the interface... the file is created, but the header is created in different file and its name is ambiguous, g (19) and the data are placed in the other file with the name that matches the value of the variable filename...
It is two ODI creates two files a single header and other data...
When I run my interface in a package of the file created perfectly... but one i want to use package I want to create a file via the interface only runningWhat is the name of the second file? (the file that does not have the name of the variable)
-
new to labview :-) and I have a problem when I want to change the value of a string in bunches, and I want to implement this using the node value of property instead of writing directly to the stream or by using the variable, enclosed is the picture. No matter, I have change in cluster (control) or value of Popery out (indicator) cluster, the value (sensor 7) dataflow keeps unchanged even I gave the new value by value of property node. Thank you to give me some advice about this.
Hi GerdW
Thanks a lot for your answer. The reason I'm stubbornly tring to break the flow of DATA is: we have a test system that have about 100 screws, they have a few connected flow, some of them will be unbundling a cluster dataflow chain to check the value in order to make the different cases. Now I want to insert user event by changing the control and influential cases during run time.
As I initially uses a global variable (to control cases) instead of unbundle string data flow, it works well. But then, I found there are a lot of screws that are using the string unbundle. One of the 'lazy' means, I tried is to change the value via the property node (because that way, I did not need to find all the places where using the unbundle string and replace them with the global variable), then I noticed a problem with "dataflow", the value in the stream of cluster in fact will not be changed by changing the value of the property node.
I did a test with VI simple (like the picture in last post), and after reading your advice, I tell myself that I need to understand the concept of "DATAFLOW" in labview, it seems that my "lazy" way can not work in this scenario.
I have attached the criterion VI here, have you furthur suggestions on what I can do in this case?
Mant thanks!
Minyi
-
Execution plan will change if I use the variable binding instead of the literal value?
Hi guys,.
Suppose I have a select "... Of... WHERE ID = 2 and... "if I go to use the variable binding instead of the literal value 2," SELECT... " Of... WHERE ID =: p_id and... ", the execution plan change?
I test multiple statements, the plan does not change, but I don't know if it would even as well as in some other cases.
Someone at - it ideas?
Thank you very much.Anneso wrote:
Hi, sorry for the unclear post, it's 11 GR 2.As Sybrand already mentioned, there are a lot of change that came in the implementation of the bind variable in some versions of Oracle db. Since you're on 112, it is still true with the introduction of Adaptive Cursor Sharing . Please have a read on it since the post below written by the development of Oracle optimizer group.
http://blogs.Oracle.com/optimizer/entry/why_are_there_more_cursors_in_11g_for_my_query_containing_bind_variables_1Aman...
-
You should have seen the date using the variable of presentation
Hi all
I am facing a problem in the display of the selected date of the guest in the report using the variable of presentation. I have a guest of data (calendar prompt), where the user selects the value. I take this value in the variable RBAP of presentation and report when I try to display this value using the same presentation variable, I get my date in the following format
"TIMESTAMP 2010-10-22 00:00:00 '.
I'm just using ' @{RBAP}' in the formula in the column.
I want to show my date in the format DD/MM/YYYY. How to do this?
I have used CAST (' @{RBAP} {' as DATE} and tried to change the data to dd/mm/yyyy format, but it does not work.)
Please suggest
Thank you
Ronnyin the default section to write the SQL...
Select the OPTION case SENSITIVE WHEN 1 = 0 THEN AnyExistedDateColumn CURRENT_DATE of OTHER END OF SubjectArea
-
How to use the variable in the path of the source of an image in flex
Hello
I just want to know that how to use the variable in the path of the source of an image in flexHello
I just want to know that how to use the variable in the path of the source of an image in flex -
Windows mail. When sending a new email, I want to use the BCC field, that I can not select because it is not on the new Message.
How can I get the future BCC when I create a new message?
Can I add tools please?Thanks for the reply Bruce Hagen. I am very grateful.
Dave.
In a new message window: view | All the headers. Check it out. Or, simply click on the button to easily add to your contacts list to: To, CC, or BCC.
Bruce Hagen ~ MS - MVP [Mail]
-
Hello
I tried something with the processing of the forms which doesn't seem to work. I wonder if the function really works or if I'm doing something wrong.
Here is an example of what I do: I have a form that I want to use. I add "Web Page redirection" processing step to my form. When I click on the processing step to set up, under "General settings" there is an option that says "Choose how the launch of destination page is selected." In this drop-down menu, there are three options: always redirect to the same landing page, use a drop-down list to select the landing page and the value of a form field allows you to select the destination page. I have a hidden field on the form that contains the URL of the web page to which I would like to redirect. When I select 'Use the value of a form field to select the landing page', I select the hidden field to the field that contains the URL of the web page to which I want to redirect. It's my setup. However, when I submit the form, nothing happens, I do not redirect to the URL contained in the hidden field... This function still works? I'm doing something wrong? I can't seem to get the function "Use a drop-down list to select the destination page" to work either. The same thing happens when I try to use the "Add Contact to shared the list" processing step. I add the name of the list that is shared in the field hidden, but the contact does not appear in the shared list... These functions still work? If yes how do I configure them?
Thank you!
Well, I understood the problem of the shared list... You must add the ID of the list shared in the hidden field. I had to use Firebug to see the real ID of the shared list. Once you have the ID, use you it as a static value in the field. If the HTML code of the form will look something like this:
If you do not use the lookup data ID. You use the ID real asset on the shared list. You must use something like Firebug to find.
I'm glad everything is working.
-
How to use the variable instead of the table name in the select statement of procedure
I have a procedure with a select statement with dynamic from clause. How can I use instead of the name of the table variable.
create or replace procedure scc_chemical_analysis
is
v_table_name varchar2 (100);
Start
declare
cursor c1 is select * from v_table_name; -This is the variable name. How can I use it in the select statement.
.
.
.
.
end;Hello
something like that.
1 declare 2 vSQLString VARCHAR2(32000); 3 pTableName varchar2(1000):='EMP'; 4 BEGIN 5 vSQLSTRING := 6 'SELECT ''x'' FROM ' || DBMS_ASSERT.sql_object_name(pTableName) || ' WHERE rownum<=1 '; 7 EXECUTE IMMEDIATE vSQLSTRING; 8* END; SQL> / PL/SQL procedure successfully completed.
-
Parameter IN or OUT to missing index: 1 using the variable date ODI.
Hello
I created the variable of data type date as EXTRACT_FROM_TS and also the default value for this.
Now I use this variable as a filter in the source table in the design of the Interface as below...
LAST_UPDATE_DATE > = #p_extract_from_ts where LAST_UPDATE_DATE is the field in the source database with date data type not null not forced...
I have lkm hv used SQL for Oracle...
Above variable refresh and interface scenario running one after another in ODI package...
Variable gets refresh every time successfully, but Interface fails at the step of loading data... error message as below...
ODI-1227: SrcSet0 (load) task fails on the source of ORACLE R12DEV connection.
Caused by: java.sql.SQLException: parameter IN or OUT to missing index: 1
+ oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1890) +.
If we remove the filter LAST_UPDATE_DATE > = #p_extract_from_ts, then it works well...
I do not know why this error pops up on adding filter... Please help on this...
Thank you
Roshan YHello
put a step DECLARATION above all. After that in my opinion, it is better to put a TO_CHAR().
Try putting your variable in text mode and change your filter in
TO_CHAR (LAST_UPDATE_DATE, 'YYYYMMDDHHMI') > = TO_CHAR(#PROJ.) P_EXTRACT_FROM_TS, "YYYYMMDDHHMI")
In your operator if you click on the variable whose value you see?
-
drop table tab purge;
create table tab (number x, y varchar2 (5));
Insert tab values(1,'rr');
Insert tab values(2,'rr');
Insert tab values(3,'rr');
Insert tab values(4,'rr');
commit;
create or replace PROCEDURE get_data (p_data ON SYS_REFCURSOR,
P_ID IN varchar2)
is
sql_str varchar2 (100): = ' SELECT * FROM tab WHERE. X IN (: x)';
Start
Open p_data
for sql_str
using p_id;
end;
/
SET SERVEROUTPUT ON
VAR A REFCURSOR
VAR B VARCHAR2 (1000)
EXEC get_data (: one, '3', 4);
PRINT
following error, so that the value of product produced no arrow.
-------------------------
ERROR:
ORA-01722: invalid number
-------------------------
Here the implicit conversion does not work, and '3.4' is considered a stgring rather 2 separate values. I have to have to use bind variable and do not want to use dbms_sql. Is it possible, '3,4' is taken as 2-digit values, rather a string value helps Pl, thanks.You cannot use list as a bind variable. Use:
SQL> create or replace PROCEDURE get_data (p_data IN OUT SYS_REFCURSOR, 2 p_id IN varchar2) 3 is 4 sql_str varchar2(100) := 'SELECT * FROM tab WHERE tab.X IN (' || p_id || ')'; 5 begin 6 open p_data 7 for sql_str; 8 end; 9 / Procedure created. SQL> SET SERVEROUTPUT ON SQL> SQL> VAR A REFCURSOR SQL> VAR B VARCHAR2(1000) SQL> SQL> EXEC get_data(:A, '3,4'); PL/SQL procedure successfully completed. SQL> SQL> PRINT A X Y ---------- ----- 3 rr 4 rr SQL>
Or, if you want to use bind variable, use the composite type. Something like:
SQL> create or replace 2 type NumberList 3 as table of number 4 / Type created. SQL> create or replace PROCEDURE get_data (p_data IN OUT SYS_REFCURSOR, 2 p_id IN NumberList) 3 is 4 sql_str varchar2(100) := 'SELECT * FROM tab WHERE tab.X member of :x'; 5 begin 6 open p_data 7 for sql_str 8 using p_id; 9 end; 10 / Procedure created. SQL> SET SERVEROUTPUT ON SQL> SQL> VAR A REFCURSOR SQL> VAR B VARCHAR2(1000) SQL> SQL> EXEC get_data(:A, NumberList(3,4)); PL/SQL procedure successfully completed. SQL> PRINT A X Y ---------- ----- 3 rr 4 rr SQL>
SY.
-
Cannot use the variable in the Interface.
Hello
I create a variable in the reference to 11g odi below
V_name = FTClient
DataType = alphanumeric
default value = "BANK 1"
I create a filter on the source table to pull records only for 1 BANK and talk CELL_SRC_TBL1. CLIENT = #FTClient in the filter.
But when I try to execute its error display interface.
"Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: lack of expression.
Thank you
Paul
You use ODI 11? If so the name of the variable must bee all uppercase and when you pass too!
I hope this can help you!
-
using the variable as a field name in a query
Oracle 10G
Hi all
I have a table like:
TEST_MSL
CID NUMBER (10),
TEST_1 VARCHAR2,
TEST_2 VARCHAR2
Now, I want to use a procedure such as:
create or replace procedure TEST
(VARIABLE_1 IN VARCHAR2) Possible values (TEST_1, TEST_2)
as
BEGIN
declare
cursor c1 is
Select the CID
where VARIABLE_1 = 'BLAH '.
My problem is:
How can I use this variable as a domain name?
Kind regards
Menk Slot
Published by: Menk slot on June 3, 2010 10:46If you know that there are only two possibilities so preferable to use as static SQL statements
procedure test(v_cloumn_name varchar2) IS IF v_column_name='TEST_1' THEN SELECT CID INTO var where TEST_1='BLABLA'; ELSE SELECT CID INTO var where TEST_2='BLABLA'; END;
Otherwise, use Ref cursour as
declare v_sql_stm varchar2(200); refcur sys_refcursor; begin v_sql_stm:='SELECT CID FROM TEST_MSL WHERE '||v_cloumn_name||' = ''BLABLA'''; open refcur for v_sql_stm;
-
How to use the variable in the coil
How can I draw a sequence number of the database and use it in a sqlplus spool file name...
This forum works as: sqlplus user/pass@sid@c:\file.sql
sample file:
BEGIN
declare
V_E_NUMBER varchar2 (7);
Start
Select "E" | LPAD (RWP. E_NUMBER_seq. NEXTVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;
end;
end;
Select "E" | LPAD (RWP. E_NUMBER_seq. CURRVAL, 6, '0') IN THE DOUBLE V_E_NUMBER;
trigger the echo
SET THE POSITION
SET LINESIZE 430
set verify off
SET PAGESIZE 0
SET TRIMSPOOL ON
SET OFF calendar
SET termout ON
SET feedback OFF
coil d:\securedASP\CORE. BU34500.AR.'|: V_E_NUMBER |'. RECEIVD
Select * from table;
spool offHello
Use a substitution for that variable:
COLUMN v_e_number NEW_VALUE v_e SELECT 'E' || lpad ( RWP.E_NUMBER_seq.NEXTVAL , 6 , '0' ) AS V_E_NUMBER FROM DUAL; SPOOL d:\securedASP\CORE.BU34500.AR.&v_e..RECEIVD
Note that this does not at all use PL/SQL.
The variable can be used without quoting or concatenation.
Which can lead to situations where it is ambiguous as to which is part of the name of the variable (the variable is named ve in this example), and what is literal text that happens to come right after him. To resolve these issues, use a point to mark the end of the variable name.
In your case, you want a literal period just after the variable name, use two: one marks the end of the name, and the other is taken literally.Get the SQL * most orders
COLUMN,
The VALUE of CONCAT, and
SET
For more details. -
How to write the suspicion on physical table
Hi all
That's what I read on the creation of index in the physical table
http://download.Oracle.com/docs/CD/E12096_01/books/AdminTool/admintool_PhysicalSetup32.html#wp1054719
The Index indicator tells the optimizer to scan a specified index, rather than a table. The following hypothetical example explains how you can use the Index indicator. You will find queries on the table ORDER_ITEMS is slow. See you the execution plan of the query optimizer and find that the FAST_INDEX index is not used. You create an indicator of Index to force the optimizer to scan the FAST_INDEX index rather than the table ORDER_ITEMS. The syntax of the indicator Index is index (table_name, index_name)...
index (table_name, index_name)
What is the name of the array index in the Admin? I have no clue in the admin. Index created in db name should I give? Or just column name?
Thank youJEP... the name of th index that you want to use the table
KR,
A
Maybe you are looking for
-
Tecra M7: Question about PC card compatibility
Hello I have a Tecra M & and am quite satisfied with its performance. I work on a lot of video editing and had to get a Seagate 300 GB eSATA external hard drive in the hope of making life easier for me. I bought a SIIG eSATA II ExpressCard and believ
-
A series of work without battery Satellite Pro
HelloI use my Toshiba mostly inside, so I decided to use it without battery. Fact it prolongs the life of the battery when start using it again outdoors (or it has no impact on the battery life, I mean ripping off the battery)? Another problem is at
-
security question - I deleted my certificate of security by mistake
I deleted my certificate of security by mistake what I cannot do updates and it says invalid security certificate? I can't roll back something.
-
5530 ENVY: Can you change the live of HP Wireless channel?
I have a HP ENVY 5530. Can I change the channel default channel 6 wireless? Thank you.
-
My can´t PC standby or standby extended
I have a "HP Pavilion TouchSmart 14-n005eo Ultrabook" and there have never been abel sleep or hibernation. When I try to wake the computer from sleep mode it generally shows a blue screen with the errocode: "VIDEO_DXG _FATAL_ERROR (missing some lette