Using the variable as a schema / table names?
Hello all-For the first time post :)
I would use PL SQL to do something like this
--***************RUN MAIN******************
DEFINE SCHEMA_NAME IS 'SCHEMA_NAME' TANK;.
SET FINAL_TABLE 'FINAL_TABLE' TANK IS;.
BEGIN
SELECT A DISTINCT FROM SCHEMA_NAME COLUMN. FINAL_TABLE
END
However, this does not work. I googled and found other ways as the production of a prompt orders, but those who are always in the search string and not the name of the schema or table to run the SQL on. I don't know if this is even possible. Any help would be appreciated.
Thank you!
Published by: 813738 on November 19, 2010 11:02
813738 wrote:
However, this does not work.
In SQL, use:
SELECT DISTINCT COLUMN FROM &SCHEMA_NAME..&FINAL_TABLE;
In PL/SQL, you need to use SELECT INTO (if the query returns exactly one line) or a slider.
SY.
Tags: Database
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)
-
kindly tell how to use the unique value of a table with the index 0
kindly tell how to use the unique value of a table with the index 0
Hi
Yep, use Index Array as Gerd says. Also, using the context help (+ h) and looking through the array palette will help you get an understanding of what each VI does.
This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
-CC
-
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 -
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.
-
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 can we use the variables name, for example?
I use 9 textbox in my step. The names are similar, only difference is the last character. (s1_0, s1_1, s1_2,...). I am using these textbox in a loop. But I couldn't find the right typing... s1_ [i], (i) s1_ or s1_ {i} gives an error.
s1_0.text = 0
s1_1.text = 0
s1_2.text = 0
s1_3.text = 0
s1_4.text = 0
s1_5.text = 0
s1_6.text = 0
s1_7.text = 0How can he do the shortest hits for this problem?
Use the operator [] table:
for (var i: uint = 0; i<>
This ["s1_" + i.ToString ()] .text = 0;
}
-
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):
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.SELECT ID, CODE FROM TABLE (pkg.output('1','2'))
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.
-
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!
-
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 we use the variable checkbox?
I use Cap 8. Finally, I want to set a variable to store the user's decision to play any narration automatically, or do not play automatically narration.
A check box appears as a perfect way to let the user make this decision, so I used the box widget to display only a single checkbox. Successfully, I set the text property of checkbox and entered a unique variable name (myNarrationDefault) to store the State of the checkbox. Now how to access the variable?
I added a text field, so I could see the value of this variable. However, when I try to insert a variable, I don't see the new user variable, in the list. Then I tried to add an action to a button just to see if the variable appears in the tool; There can be no.
I'm doing something wrong?
Thank you
Pete
In fact, you will need to create so that the variable you made in the interaction interface, CP does not do it for you, project/Variables in the top Menu.
When the box is checked, the value is then assigned to the variable.
-
Using the variable obtained using JavaScript in a widget
Hi again
I found this useful bit of JavaScript code that gets the name of active users of an LMS and sets it to a variable in a Captivate course. [the link below for anyone interested]
I have seen that variables can be used in the Widgets but I can't make it work.I have defined the variable as ActiveUserName ($$ActiveUserName$ $ in list dropdown widget) but it shows that $$ActiveUserName$ $ if I'm the test or on a LMS System. Same result with an entry box.
Someone has already tried this before or know a way to do this please?
Thank you
As promised, the JavaScript link on behalf of active users of traction: display name of your LMS using Adobe Captivate to the 6.x - CaptivateDev.com student
Captivate 7 and 8, the Captivate defined variable user cpQuizInfoStudentName made for you.
With regard to the drop-down list widget, you cannot use a variable in the comma delimited list to display to the user. The result when the user makes a selection in the list can be assigned to a variable.
Maybe you are looking for
-
Syncing iTunes between Apple devices without iCloud
Hello I want to synchronize my iTunes between my Mac and my Macbook Air library. I tried to connect via a cable Thunderbolt, but the icon does not appear in iTunes. I believe to sync iTunes via iCloud, you pay a monthly subscription. Is this corre
-
Satellite Pro A200 does not load if current enforcement
Hello I have a new Toshiba Satellite Pro A200 on Vista. I have a problem with the power adapter and charge socket.It will start and run very well and when turned off will charge the battery of fine food. But when running, the machine automatically ru
-
Satellite L450D - 11 X - Skype microphone does not work
Sbdy hope can help... I have been using Skype on the mobile above but all of a sudden it has stopped working...I still don't know if there were updates etc... The speakers work fine just on Skype.People could hear me either. I bought a headset in the
-
HP630: power 83854736 error
My HP630 gives power on password error 83854736. Help, please
-
I want to be able to have an indicator that tells me that when the caps lock is on