Select (variable) into:parameter from xyz , dynamic sql
hello everyone
I have a table with the columns KZ01*01*, KZ01*02*, KZ01*03*.....
I want to select the value from one column depending of a variable z.b. varable=3 I want the value select KZ01*03*
I wrote the trigger post_querry:
declare
v_kfz string(20);
begin
v_kfz:='select KZ010'||:daten.lkw||'into :kennzeichen from r_bestellung@r where nummer=:daten.r_bestell_nummer';
Forms_DDL(v_kfz);
end;
alternativ I tried:
execute IMMEDIATE 'select KZ010'||:daten.lkw||'from r_bestellung@r where nummer=:daten.r_bestell_nummer'
I am using Form builder 6.0.... and Oracel 8i
what I am doing wrong, thanks for helping
regards
robert
I think there was good example in form but here is the example for your crieteria.
DECLARE
vSqlStr VARCHAR2(1024);
cursor_number EXEC_SQL.CursType;
vRecCount NUMBER;
vReturnedValue DATATYPE; -- Set this datatype upon table field
BEGIN
cursor_number := Exec_SQL.Open_cursor;
-- Here variable your field name
-- for numeric
vSqlStr := 'select '||<VARIABLE>||' from r_bestellung@r where nummer='||:daten.r_bestell_nummer;
-- for characters
vSqlStr := 'select '||<VARIABLE>||' from r_bestellung@r where nummer='''||:daten.r_bestell_nummer||'''';
-- From above use only one on your requirement
EXEC_SQL.PARSE(cursor_number, vSqlStr);
EXEC_SQL.DEFINE_COLUMN(cursor_number,1,vReturnedValue,30);
vRecCount := EXEC_SQL.EXECUTE(cursor_number);
IF EXEC_SQL.FETCH_ROWS(cursor_number)=1 THEN
EXEC_SQL.COLUMN_VALUE(cursor_number,1,<:FORM_FIELD_NAME>); -- Here form_field_name replace with you current form field.
END IF;
EXEC_SQL.CLOSE_CURSOR(cursor_number);
EXCEPTION
When EXEC_SQL.INVALID_CONNECTION Then
message('Unexpected Invalid Connection error from EXEC_SQL');
When EXEC_SQL.PACKAGE_ERROR Then
message('Unexpected error from EXEC_SQL: '||to_char(EXEC_SQL.LAST_ERROR_CODE)|| EXEC_SQL.LAST_ERROR_MESG);
If EXEC_SQL.IS_OPEN(cursor_number) Then
EXEC_SQL.CLOSE_CURSOR(cursor_number);
message('Exception - Cleaned up Cursor');
End if;
END;-Ammad
Similar Messages
-
Passing variables into CVI from TestStand.
Is there a different way to send variables into CVI from TestStand other than the input buffer? Parsing that string is annoying and bulky. Isn't there an easier way?
Hi,
Here is a short cut to another example which will use the StationGlobals -
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=313&HOID=506500000008000000301F0000&UCATEGORY_0=_8_&UCATEGORY_S=0
There are loads of other examples either as part of the examples provided by TestStand installation or in the Resource Library under TestStand on the NI website
Good Luck
Ray Farmer
Regards
Ray Farmer -
Hi i want to use this query in Tablour Style form
Select name into :Name_supp from py_emp where id=:id_supp;
Exception when no_data_found then null;
Now i need that its will generate all name when id=:id_supp
When i used this Trigger in button its not update all text box its update only current text box
Regards
Shahzaib ismailShahzaib ismail,
When i used this Trigger in button its not update all text box its update only current text box
From this i think that its a multi record block, and after fetching it, you changed the id_supp in the master block. So in order to that change, you want to set the name of that supplier in the detail block.
For this you can,
1) Create a function that returns the name using the select statement you wrote, and call that function in the Formula property. Also change the Calculation Mode to Formula.
2) Assign the name in to a text item in master block, which is hidden, and assign that item's name in the Synchronize with Item property of the detail item.
3) Loop through the detail block, and assign the name value.
Regards,
Manu.
If this answer is helpful or correct, please mark it. Thanks. -
Execute SQL Task with Parameter - from DB2 to SQL Server
I am pulling data from DB2 to SQL Server.
1st Execute SQL task runs the following against DB2:
SELECT TIMESTAMP(CHAR(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 1 MONTH)) as START_MONTH
FROM SYSIBM.SYSDUMMY1;
I'm storing it as a Result Set.
Next I have a Data Flow Task. This pulls data from DB2 where the date matches the parameter.
FROM SCHEMA.TABLE t
WHERE DATE_TIME_COLUMN= ?
This works fine. Guessing, because the parameter source is DB2 and the Data Flow source is DB2.
The problem is, I want to remove existing data for the same date in the SQL table. IE, if I'm pulling March 2014 data from DB2, I want to be sure there is no March 2014 data in the SQL table. The main use is for re-runs.
So, I added another Execute SQL task after the first one that assigns the variable, and before the Data Flow Task. This runs the following statement against SQL Server:
DELETE FROM
database.dbo.table
WHERE DATE_TIME_FIELD >= ?
The package fails at the new Execute SQL Task with the following error message:
Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "DELETE FROM
SBO.dbo.tblHE_MSP_FEE_BUCKETS
WHERE T..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
correctly.
Task failed: Execute SQL Task
SSIS package "Load_MSP_Fee_Buckets_SQL.dtsx" finished: Success.
The program '[14240] Load_MSP_Fee_Buckets_SQL.dtsx: DTS' has exited with code 0 (0x0).
I am assuming this is something to do with the Parameter source being DB2, and trying to use against SQL?
Any suggestions on how to make this work??
Thanks,
-Al HParameter name is unrecognized
is the key, how come DB2 is related if it runs against SQL Server
What I think is happening you do not use the OLEDB connection to SQL Server.
Likewise, if it is ADO then the query needs to be
DELETE FROM
database.dbo.table
WHERE DATE_TIME_FIELD >= @MyDate
Arthur My Blog -
Build stored procedure from a dynamic SQL query
I have the following method, that receives a string from a textbox and creates a dynamic select command. Since I am using a dataSet I cannot execute a dynamic SQL query by calling a method of a strongly-typed dataset (.xsd). I have been told that the best
way to do this is to pass an array of values to the stored procedure.
But I have no clue how to build the stored procedure.
string[] allWords = txtSearch.Text.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string sql = "SELECT Books.ISBN, Books.Title, Books.Tag, Books.Image, Books.photoType, Publishers.Name AS publisherName FROM Books INNER JOIN Publishers ON Books.codPublisher = Publishers.codPublisher WHERE ";
using (SqlCommand command = new SqlCommand())
for (int i = 0; i < allWords.Length; ++i)
if (i > 0)
sql += "OR ";
string paramName = "@param" + i.ToString();
sql += string.Format("(Books.Title LIKE {0}) ", paramName);
command.Parameters.AddWithValue(paramName, allWords[i] + "%");
command.CommandText = sql;
//execute the SQL query against the db...After hours around this, I have came with this solution.
private SqlConnection sqlConn = new SqlConnection();
private System.Data.DataSet dataSet = new System.Data.DataSet();
private System.Data.DataTable dataTable;
private System.Data.DataRow dataRow;
private SqlCommand search(string searchParam, int searchOption)
SqlCommand command = new SqlCommand();
string sql;
string[] allWords = searchParam.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (searchOption == 1)
sql = "SELECT Livros.ISBN, Livros.Titulo, Livros.Tema, Livros.Resumo, Livros.Imagem, Livros.fotoTipo, Editoras.Nome AS nomeEditora FROM Livros INNER JOIN Editoras ON Livros.codEditora = Editoras.codEditora WHERE ";
else
sql = "SELECT Livros.ISBN, Livros.Titulo, Livros.Tema, Livros.Resumo, Livros.Imagem, Livros.fotoTipo, Editoras.Nome AS nomeEditora FROM Livros INNER JOIN livrosAutores ON Livros.ISBN = livrosAutores.ISBN INNER JOIN Autores ON livrosAutores.idAutor = Autores.idAutor INNER JOIN Editoras ON Livros.codEditora = Editoras.codEditora WHERE ";
using (command)
for (int i = 0; i < allWords.Length; ++i)
if (i > 0)
sql += "OR ";
if (searchOption == 1)
sql += string.Format("(Livros.Titulo LIKE '%{0}%') ", allWords[i]);
else
sql += string.Format("(Livros.Autor LIKE '%{0}%') ", allWords[i]);
command.CommandText = sql;
return command;
protected void Bind()
sqlConn.ConnectionString = Properties.Settings.Default.BibliotecaConnectionString;
string connectionString = sqlConn.ConnectionString.ToString();
SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(search(searchText, searchOption).CommandText, connectionString);
sqlDataAdapter.Fill(dataSet, "livrosTitulo");
dataTable = dataSet.Tables["livrosTitulo"];
dataGrid.DataContext = dataTable.DefaultView; -
How to pass table type variable into function from SQL*PLUS ?
How to pass a table type variable from sql*plus prompt into a function ?
Thanx in advance.Krishna,
Do you mean like this?SQL> DECLARE
2 TYPE t_tbl IS TABLE OF VARCHAR2(20);
3 l_sample_tbl t_tbl;
4
5 FUNCTION print_contents ( p_tbl IN t_tbl )
6 RETURN VARCHAR2
7 IS
8 l_string VARCHAR2(1000);
9 BEGIN
10 FOR i IN 1..p_tbl.COUNT LOOP
11 IF (i = 1) THEN
12 l_string := p_tbl(i);
13 ELSE
14 l_string := l_string || ', ' || p_tbl(i);
15 END IF;
16 END LOOP;
17 RETURN (l_string);
18 END print_contents;
19
20 BEGIN
21 l_sample_tbl := t_tbl();
22 l_sample_tbl.EXTEND;
23 l_sample_tbl(1) := 'one';
24 l_sample_tbl.EXTEND;
25 l_sample_tbl(2) := 'two';
26 l_sample_tbl.EXTEND;
27 l_sample_tbl(3) := 'three';
28 l_sample_tbl.EXTEND;
29 l_sample_tbl(4) := 'four';
30 l_sample_tbl.EXTEND;
31 l_sample_tbl(5) := 'five';
32 DBMS_OUTPUT.PUT_LINE(print_contents(l_sample_tbl));
33 END;
34 /
one, two, three, four, five
PL/SQL procedure successfully completed.
SQL> HTH,
T. -
How to get save result from EXECUTE from a dynamic SQL query in another table?
Hi everyone,
I have this query:
declare @query varchar(max) = ''
declare @par varchar(10)
SELECT @par = col1 FROM Set
declare @region varchar(50)
SELECT @region = Region FROM Customer
declare @key int
SELECT @key = CustomerKey FROM Customer
SET @query = 'SELECT CustomerKey FROM Customer where ' + @par + ' = '+ @key+ ' '
EXECUTE (@query)
With this query I want get col1 from SET and compare it to the column Region from Customer. I would like to get the matching CustomerKey for it.
After execution it says commands are executed successfully. But I want to save the result from @query in another table. I looked it up and most people say to use sp_executesql. I tried a few constructions as sampled and I would always get this error:
Msg 214, Level 16, State 2, Procedure sp_executesql, Line 12
Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
So the output should be a list of CustomerKeys in another table.
How can I save the results from EXECUTE into a variable? Then I assume I can INSERT INTO - SELECT in another table.
ThanksCREATE TABLE Customer
(CustomerKey INT , Name NVARCHAR(100));
GO
INSERT dbo.Customer
VALUES ( 1, N'Sam' )
GO
DECLARE @query nvarchar(max) = ''
declare @par varchar(10) = 'Name',
@key varchar(10) = 'Sam'
CREATE TABLE #temp ( CustomerKey INT );
SET @query =
insert #temp
SELECT CustomerKey
FROM Customer
where ' + @par + ' = '''+ @key+ ''' '
PRINT @query
EXEC sp_executesql @query
SELECT *
FROM #temp
DROP TABLE #temp;
DROP TABLE dbo.Customer
Cheers,
Saeid Hasani
Database Consultant
Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
[My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
[Twitter] [Facebook] [Email] -
Insert multiple rows into dB from one dynamic HTML form problem
Hi,
- I have form which has dynamically generated text fields so I don't want to hard code the field names into the servlet
- A user will fill in one or more of the text boxes with a number and submit to the servlet (the name of the field represents an item ID, the value represents a quantity the user wants of that item).
- The servlet needs to insert a new record into a table for each field that is not null.
My question is how!
If I send as an array or string, how will the servlet know that each submitted field needs to be inserted as a new record as opposed to one long record?
I know I'll need to use a loop of somekind; how will I know how long to loop for if the number of 'not null' fields is not static? I need to get a value for the number of 'not null' fields from the form before the loop starts I think but don't know how...
Also, should I call an SQL procedure that has an insert-loop OR should I have the servlet loop a call to a single insert statement? (am I making sense!?)
Anyway, I've seen many examples where a submitted form updates/inserts one record into a table but never any for multiple records at one time. I'm using a Tomcat/Oracle set up, and I'm "New to Java"...
Many thanks in advance.sorry, but I dont' understand very well what do you want to do!
In any case if you want to retrieve all parameters (and you don't know what they are), you can use a general cosde like this:
Enumeration names= request.getParameterNames();
while(names.hasMoreElements()) {
// in 'name' you store the name of the parameter
String name = (String) names.nextElement();
// in 'value' you store it's value
String value = request.getParameter(name);
remember that ALL parameter values can't be null (if they are void their value is "").
The only case that you can get a null value is when you try to access a non existing parameter (like request.getParameter("pwqjsak"));
I hope this helps! Else try to give me more info about your problem -
Spool SQl data into text file using dynamic sql
Hi,
I am spooling output data into text file using command
select 'select t.mxname,bo.lxtype,t.mxrev'||chr(10)||'from mx_1234567'||chr(10)||
'where <condition>';
here mxname varchar(128),lxtype(128),mxrev(128) all are of varchar type.I want the output in format
e.g Part|1211121313|A
but due to column width the output,I am getting is with spaces.
"Part then blank spaces |1211121313 then blank spaces |A"
how can I remove these spaces between columns.I used set space 0 but not working.
Thanks in advance.
Your help will be appreciated.Hi Frank,
I have seen your reply for SET LINE SIZE function. But, I could not be able to understand it.
I am facing similar kind of issue in my present project.
I am trying spool more than 50 columns from a table into flat file. Because of more column lengths in few columns, i am getting space. There are so many columns with the same issue. I want to remove that space.so that, data can fit perfectly in one line in .txt file without any wrap text.
Below is my sample query.sql. Please let me know the syntax. My mail id : [email protected]
--Created : Sep 22,2008, Created By : Srinivasa Bojja
--Export all Fulfillments
--Scheduled daily after 1:00am and should complete before 3:30am
WHENEVER SQLERROR EXIT SQL.SQLCODE
SET LINESIZE 800
SET WRAP OFF
SET PAGESIZE 800
SET FEEDBACK OFF
SET HEADING ON
SET ECHO OFF
SET CONCAT OFF
SET COLSEP '|'
SET UNDERLINE OFF
SPOOL C:\Fulfillment.txt;
SELECT SRV.COMM_METHOD_CD AS Method,
SRV.SR_NUM AS "Fulfillment Row_Id",
CON.LAST_NAME AS "Filled By"
SRV.SR_TITLE AS Notes,
SRVXM.ATTRIB_04 AS "Form Description"
FROM SIEBEL.S_SRV_REQ SRV,
SIEBEL.S_SRV_REQ_XM SRVXM,
SIEBEL.S_USER USR,
SIEBEL.S_CONTACT CON
WHERE SRV.ROW_ID = SRVXM.PAR_ROW_ID AND
SRV.OWNER_EMP_ID = USR.ROW_ID AND
CON.ROW_ID= SRV.CST_CON_ID;
SPOOL OFF;
EXIT; -
Pulling in a variable into TestStand from an externally running LabView Vi ?
Hello,
My coworker has a problem and I'm tyring to help him.
We have a functional test written by an outside company, using TestStand 4.1
He has a LabView Vi with an Thermotron driver that monitors a chamber temp and outputs an INTERVAL number ( 1 intervel every x minutes)
That interval number is written to text file.
We would like to loop the Main function of the TestStand sequence based on that Interval number, but I'm unsure how to read that variable from within Test Stand.
I can either pull interval numbers from the text file, or set up logic in the VI to make a true / false flag based on interval numbers
i.e. interval 30 - 60 run the test....61 to 75 pause (dont run test)....76 to 125 run test...etc
Can you tell me how I might pull that interval into TestStand ?
Is there a way without incorporating the stand alone VI in question into the Test Seq ?
Thank you for any advice in advance !
Solved!
Go to Solution.Hi,
Are you saying that you want to read this value stored in your text file and use this value to set the number if iteration of your test sequence loop.
You will need a piece of software that will obtain the value from your file and then pass this back into TestStand to store in a teststand variable, probably a local. TestStand doesn't have the built in function to directly read the data from your file.
Therefore you will need a code module attached to say an Action Step Type. The code module can be written in any one of the supported language, as you mentioned LabVIEW then maybe this is your perferred language. So your VI need to obtain the data from your file and return the value back to TestStand and you do this by sending your data out of your VI via its connector pane and then in teststand assigning a Teststand variable to your output connection of your VI.
I am assuming you have the basic knowledge of setting up a Step in TestStand.
Regards
Ray Farmer -
Convert Select-options into Parameter at runtime.
Dear Friends,
In my selection screen, i have declared select-option, now if i choose the radio button then select option shhould be work like parameter. It means without use of no inervals and no-extension in select option, it will work like no intervals and no-extension.
Can anybody suggest me that is it possible or not???
Thanking you,HI Aakash,
Copy and paste the following code.
PARAMETERS:
p_selopt RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND d001,
p_parm RADIOBUTTON GROUP grp1.
SELECT-OPTIONS:
s_date FOR sy-datum.
PARAMETERS :
p_date LIKE sy-datum.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-name CS 'P_DATE'.
screen-invisible = '1'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-name CS 'S_DATE'.
screen-invisible = '0'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN OUTPUT.
IF p_parm = 'X'.
LOOP AT SCREEN.
IF screen-name CS 'S_DATE'.
screen-invisible = '1'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-name CS 'P_DATE'.
screen-invisible = '0'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF p_selopt = 'X'.
LOOP AT SCREEN.
IF screen-name CS 'P_DATE'.
screen-invisible = '1'.
screen-active = '0'.
MODIFY SCREEN.
ELSEIF screen-name CS 'S_DATE'.
screen-invisible = '0'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Hope you got the required output.
Thanks,
Susmitha -
Pass Variables into Flash from URL
I have a real simple request for some reason cannot pull it
off. I have a url that looks like this:
http://mywebserver/directory1/directory2/webpage.html?name=Mark
I am trying to pull the variable "mark" into a swf. The URL
will change depedning on the user and I plan on adding additional
variables as well (lastname, state, age, etc).
Easy answer to this? If so, please excuse my ignorance. I use
actionscript 2 but would consider myelf a novice as I am more into
design.Using FlashVars would work, as would SWFObject - which is
what I'd use. Glad
yout got it though.
Dave -
www.offroadfire.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Getting result of dynamic select statement into variable
I have a function that builds a dynamic sql statement. I then want to take the result of that statement and insert it into a variable. I have tried this
execute immediate strSQL USING OUT intCounter;but that is giving me an error on that line of code. The SQL is a select count(*) and works fine. It is just how to get it into the variable that is tripping me up.
Thanks,
EvaSure. Version 11g. The complete procedure reads as follows:
CREATE OR REPLACE FUNCTION VALIDATIONQUESTIONRESULT
p_ShortName VARCHAR2,
p_SiteID VARCHAR2
RETURN NUMBER IS
strSQL VARCHAR2(5000);
strTableName VARCHAR2(200);
strPatIDFieldName VARCHAR2(200);
intCounter NUMBER;
BEGIN
select VALIDATIONSQL into strSQL from vwvalidationquestions where upper(shortname) = upper(p_ShortName);
select
case UPPER(DBTABLENAME)
when 'CPTICODES' then 'CPTIPATID'
when 'CPTIICODES' then 'CPTIIPATID'
when 'DEMOGRAPHICS' then 'PATID'
when 'FAMILYHISTORY' then 'FHPATID'
when 'GCODES' then 'GCODEPATID'
when 'HOSPITALIZATION' then 'HPATID'
when 'MEDICALHISTORY' then 'MHPATID'
when 'MEDICATIONS' then 'MPATID'
when 'PROCEDURES' then 'PPATID'
when 'VISITS' then 'VPATID' end into strPatIDFieldName
from DATASPECIFICATIONS where UPPER(SHORTNAME) = UPPER(p_ShortName);
strSQL := strSQL||' and '||strPatIDFieldName||' in (select PATID from DEMOGRAPHICS where PARTICID = '||p_SiteID||');';
execute immediate strSQL into intCounter;
return intCounter;
END VALIDATIONQUESTIONRESULT; strSQL when checked builds perfectly. I get 100% what I expect from it. An example of what I am getting from strSQL is:
select count(*) from Procedures where TO_CHAR(ProcdDt, 'MM') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM') and TO_CHAR(ProcdDt, 'YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -12), 'YYYY') and PPATID in (select PATID from DEMOGRAPHICS where PARTICID = 12);I am getting the number I would expect from this. I just need to put that number into intCounter. I tried altering strSQL so it looked like this:
select count(*) into intCounter from Procedures where TO_CHAR(ProcdDt, 'MM') = TO_CHAR(ADD_MONTHS(SYSDATE, -1), 'MM') and TO_CHAR(ProcdDt, 'YYYY') = TO_CHAR(ADD_MONTHS(SYSDATE, -12), 'YYYY') and PPATID in (select PATID from DEMOGRAPHICS where PARTICID = 12);but that gave me an error on the execute immediate line as well.
Sorry, I thought it would be simple so that was why I only put that bit of info. I guess it is more complicated than it at first appeared!
Eva -
If in a form, I assign current_date to a variable like ' wdate:=current_date' the variable get incorrect value than if i assign like 'select current_date into wdate from dual'
Why?, current_date is always from database session isn't it?
Thanks for your help.Hello tony.g
This is the code:
:b11.femovi is a form field date type;
In this code wdate shows differente value than :b11.femovi.
I think that the value must be the same because "current_date" is a database variable isn't it?
declare
wdate date;
begin
:b11.femovi := current_date;
select current_date into wdate from dual;
rutmensaje('date='||to_Char(wdate,'dd/mm/yyyy hh24:MI')||'-'||to_Char(:b11.femovi,'dd/mm/yyyy hh24:MI'));
end; -
Is it possible to pass a variable in FROM clause in SQL?
Hi Experts,
<i><b>loop at it_db_table.
select field1 from it_db_table-table_name into my_it.
endloop.</b></i>
I mean, Is it pass a variable value to FROM clause in SQL?
I got the info from SAP as,
<i><b>Works like variants 1-3, provided the source_text varialb contains the table name or a join expression as ABAP source text.
Examples
Output of a list of all customers:
DATA tabname(10).
DATA: BEGIN OF wa,
id TYPE scustom-id,
name TYPE scustom-name,
END OF wa.
tabname = 'SCUSTOM'.
SELECT id name INTO CORRESPONDING FIELDS OF wa FROM (tabname).
WRITE: / wa-id, wa-name.
ENDSELECT.</b></i>
thanq.Here is a short sample of a dynamic select statement.
Enter your table name in the parameter on selection screen. Enter you where clause in the select-option on selection screen.
I used.....
MARA
MTART = 'HALB'
report zrich_0004 .
data: xwhere(30) type c.
data: iwhere(30) type c occurs 0.
data:itab(1000) type c occurs 0 with header line.
parameters: p_table(30) type c.
select-options: s_where for xwhere.
loop at s_where.
clear iwhere.
xwhere = s_where-low.
append xwhere to iwhere.
endloop.
select * up to 100 rows into table itab
from (p_table)
where (iwhere).
loop at itab.
write:/ itab.
endloop.
Regards
vasu
Maybe you are looking for
-
Hp deskjet 5940 drivers for windows xp 32 bit
hello! who can help me find a driver for windows xp 32 bit for my hp deskjet 5940?? the drivers that you download from hp website is for xp 64 bit! thanks Ans
-
IMac freezing and clicking.
I'm hoping someone can help or offer some suggestions on a problem I'm having with my iMac. After not using my Mac for a week, it made a long beeping sound when it was switched on. It then hung at the grey Apple screen for approximately 5 minutes bef
-
Hello everyone, I have a project with several sequence that I have been working for a long time (multicam basically) Every time I try to render/encode any of the sequence the Media encoder is giving me a: "Offline material is present in this export a
-
Installing second optical drive and the door hangs
This is just an FYI post, have not been able to find anyone else with the exact same problem, but thought I would list in the event of. I originally installed an internal DVD R/RW Lightscribe drive from LaCie in a Power Mac G4 Dual 1Gig and it worked
-
How to solve tproblem "Your session has expired" temporary.
I think developers always feel frustrated about a issue when Uploading app & Downloading data and meeting a problem of message: "Your session has expired. Please click Login to log back into iTunes Connect." I suggest you have to email to Apple via "