How to Concatenate Strings in XI !
Hello..
I have the scene RFC - XI - JDBC
insert in SQLServer tables... when i insert in last table i have one proble with concatenate Strings.
This is the error ocurred in my message monitor:
Unable to execute statement for table or stored procedure. 'TLINES' (Structure 'statement_TABELA4') due to java.sql.SQLException: [SQLServer 2000 Driver for JDBC][SQLServer]INSERT statement conflicted with TABLE FOREIGN KEY constraint 'FK_TLINES_CRFV'. The conflict occurred in database 'tmp_rfc', table 'CRFV'.
the problem is refering to TABLE FOREIGN KEY !
This is the message come from XML:
I need to concatenate the field TDLINE to insert the Data in only one line in the table because the TABLE FOREIGN KEY relationship !!!
My question is:
How to cancatenate the Field TDLINE ??
thanks...
Regards...
Boni
Hi Vijaya Lakshmi,
Sorry for delay my response. Thanks for your reply.
My Input structure is complex structure. here is the example
Source Structure
ZEmployee
Data
Employee first name
Employee Last name
Employee number
Employee Joining date
Employee Joining time
Lines
Tdline.
Target Structure is
ZEmployee
Employee first name
Employee Last name
Employee number
Employee Joining date
Employee Joining time
Employee Notes
In my scenario i need to concatenate all the TDLINES and pass to Employee Notes in the target for each employee. How to triger UDF for this scenario and I need to change any mappings.
your help is highly appreciated.
Regards,
Srini
Similar Messages
-
How to concatenate string with a numeric control ?
Hi,
How to concatenate string with a numeric control ?
Thankyou.
Solved!
Go to Solution.Its simpler to just use the Format Into String.
Attachments:
Format Into String.png 11 KB -
I need to display all the elements of a 2d array (all integers) using one line per row. Unfortunately, Java prints vertically, not horizontally. I know how to concatenate String, but how would i achieve the same in this case?
Any ideas?
Thanks.http://java.sun.com/j2se/1.5.0/docs/api/java/io/PrintStream.html#print(java.lang.String)
http://java.sun.com/j2se/1.5.0/docs/api/java/io/PrintStream.html#println(java.lang.String) -
How to concatenate a string with single quotes
Hi all,
how to concatenate a string with single quotes to a variable.
SathyaHi sathyabama,
1. simple
2. use TILDE character <b>(`)</b>
(just left to the '1' key)
<b> `'mystring'`</b>
3. just copy paste
report abc.
data : m(100) type c.
concatenate `'amit mittal'` 'hello' into m separated by space.
write m.
regards,
amit m. -
How to pass strings for IN Clause in REF Cursor
I have following query;
SELECT 1 INTO L
FROM test_po_apprvlines
where '4020' between NVL(approval_cost_centre_from, '0000') and
nvl (approval_cost_centre_to, '9999')
and req_approval_type IN ('BUS', 'FIN') and 10500 >= approval_amount
and NVL(req_line_type, 'X') = 'X'
AND ROWNUM =1;
Now the values for req_approval_type should be dynamic, based on approval_amount. If approval_amout > 10000 then
req_approval_type should have 'BUS' and 'FIN' , other wise only 'BUS'.
I have tried with the following code using ref cursor. But i'm not getting the result.
Any help. The problem is how to concatenate those two values to get the result.
in the following code, strings are not recoginised properly. Valid data exists in the table.
DECLARE
l_approva_type1 VARCHAR2(20) := 'FIN';
l_approva_type2 VARCHAR2(10) := 'BUS';
l_approva_type VARCHAR2(20) := '''FIN'''||','||'''BUS''';
L NUMBER;
TYPE TEST_REF IS REF CURSOR;
cur_ref TEST_REF;
L_str varchar2(1000) := 'SELECT 1'||
' FROM test_po_apprvlines'
||' where '||'''4020'''||' between NVL(approval_cost_centre_from, '||'''0000'''||') and nvl(approval_cost_centre_to, '|| '''9999'''||')'
||' and req_approval_type IN ( :bi_approva_type)'||
' and 10500 >= approval_amount '||
' and req_line_type IS NULL '||
'AND ROWNUM =1';
L_flg varchar2(1);
BEGIN
DBMS_OUTPUT.PUT_LINE (l_approva_type);
open cur_ref for l_str USING l_approva_type;
fetch cur_ref INTO l_flg;
close cur_ref;
DBMS_OUTPUT.PUT_LINE (nvl(L_flg, 'x'));
EXCEPTION
WHEN OTHERS THEN
if cur_ref%isopen then
close cur_ref;
end if;
DBMS_OUTPUT.PUT_LINE (SQLERRM);
END;You cant "Bind" here.
One way..
SQL> var a refcursor
SQL> declare
2 str varchar2(100) := '''SALESMAN'',''ANALYST''';
3 begin
4 open :a for 'select ename from emp
5 where job in ('||str||')';
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> print :a
ENAME
WARD
SCOTT
Message was edited by:
jeneesh
Results in More parsing... -
Hi
How do you concatenate characters together to form one string?how to concatenate charactersThis is one way of many with different pros and cons,
String s = "" + 'c' + 'h' + 'a' + 'r'; -
How to Concatenate Table name and Where condition at runtime
I am passing parameter as User and Zone to Stored Procedure.How to concatenate Table Name
and WHERE CONDITION in SQL Statement.i have different type of users and zones.Hi !
declare
cur sys_refcursor;
r emp%rowtype;
v_sql varchar2(512);
begin
-- do your logic here
v_sql := 'select * from emp';
open cur for v_sql;
loop
fetch cur into r;
exit when cur%notfound;
dbms_output.put_line(r.ename);
end loop;
close cur;
end;In this example you can see how can be done this with cursor vars .. You should concatenate v_sql string according to your requirements.
But as in further posts has already been mentioned , be carefull at publishing such kind of procedures and think on security.
Also when you want dynamicaly change from clause , you should consider using different records to accept data ? Maybe all your tables has the same structure and then this problem will be smaller.
T
T -
Need help for "From concatenate string insert to mysql table"
Well, most of this problem is a question about SQL syntax. In the VALUES clause you put a comma delimited list of the values to go into the new record. You insert one record at a time. How are the columns defined? Have you done any study on basic SQL?
Mike...i nid to insert values from concatenate string into mysql with using LabSQL, but the result come out from conatenate string is like " 2015-07-08 00:00:00 38.933235E-3" , a logged data of "Date Time Wind Speed(m/s). i nid to put these 3 values into 3 different column in mysql which is Date Time and Wind Speed. How can i pick Date to put inside Date's column, Time into Time's column and Wind Speed into Wind Speed's column in mysql ?
What i do is
INSERT INTO wind_speed_data (Date, Time, Wind_Speed) The space in Wind Speed can i put a _ in between Wind Speed? without _ and just put Wind Speed it shows errors.
VALUES( i have no idea wat to key in at this part ) <--- nid help !
The Mysql table. Date Time Wind Speed
The result from concatenate string. Have to insert into mysql.
My labview program.
The error i facing.
-
I have made a concatenate strings vi in LV 6.0. However I am not able to save my readings in the save file. I cannot save the data. Notice the broken line. The vi is attached.
Attachments:
concatenate strings.vi 32 KBYou should also learn how to get away from sequence structures. They are frowned upon because they hide code. You have to flip through frames to see the rest of the code. In your vi, the sequence structure is very unnecessary. It seems like your intentions were to write some sort of heading to the file containing the items you are concatenating into a string, then to write the data collected into the file. I have modified your vi to do this, take a look at the attachment (LV7.1, if you are using a different version, let us know which one). The entire code is visible in one screen, and this makes it much easier to read and understand. I used the open/create/replace file, write file, and close file to show that this can be done differently. If writing just once, you can replace the three functions with the higher level Write Characters to File function. The file operation will not take place until all of its inputs are present (this is what we call data dependency). That is why the sequence is unnecessary. By using data dependency with the way things are wired, the data must be collected first by the AI function. The concat will not execute until all of its inputs are present. After the data is collected, the output of the AI function will go through the conversion to string, and then to the concat function. At this time, all of the concat inputs are present and it will execute. Then the output of the concat will go to the File Write and then all of its inputs will be present, and it will write the total string to the file all at one time. The Error Out from the file write is wired to the Close File function so that the file will only close after the write has finished executing. I hope you understand the data depencency concept, then you won't have to use sequence structures again, except in some special cases to force execution flow where data dependency cannot be created by wiring.
- tbob
Inventor of the WORM Global
Attachments:
concatenatestrings[1].vi 53 KB -
onitoring a voltage and storing it to the same file under the associated header...What I'm having problems doing is after the loop is completed I need to write the MIN\MAX values of the voltage that was monitored in the "While Loop" once it completes. I juBefore the loop the "Concatenate String" peforms the following... line1 col.1 in an excel file is (Tester then Line1 col.2 (the testers name appears) next is a end of line. Then Line2 col.1 is (DATE)header then col.2(TIME)header then col.3(throttle voltage output)header then col.4(MAX VOUT)header then col.5(MIN VOUT) as i said this is perform before the loop with no pr
oblem. Next during the "While Loop" the actual information for the DATE,TIME,Throttle voltage output,are inserted into Line 3 under the associated header with no problem. What I need to do is wait until the "While Loop" has completed to then store the MAX/MIN, but I can't seem to get the information to end up under the associated header. What do I need to set/use to accomplish this task? Thanks I've attached an excel spread sheet to give an example of where I need the values to be stored.
Attachments:
test1.txt 1 KBonitoring a voltage and storing it to the same file under the associated header...What I'm having problems doing is after the loop is completed I need to write the MIN\MAX values of the voltage that was monitored in the "While Loop" once it completes. I juThis can become hard depending on how much data you will be writing. If you could wait and write the data all at one at the end of the while loop it becomes easier. The problem is that when you write a file it writes it in rows of data not columns. I will attach an example (LabVIEW 6.0) that demonstrates how to do this. It is a hard to describe in text. Basically I create the new columns of data and write empty strings to them on each iteration of the while loop except for the first iteration. The first iteration I write a Max? and Min? into the column information. After the while loop is completed I search the array for Max? and Min? and replace it with the appropriate min and max values.
Attachments:
append_column.vi 47 KB -
How to concatenate single quote with any field like 'VBAK'
Hi,
How to concatenate single quote with any fields.
say for example I have table name as MARA, I have to pass that table name to other fields with single quote , like I have to pass that as
tab name = 'MARA'.
but how to do this,
below statement will not work
concatenate ''' 'MARA' ''' into string.. it's giving syntax error...
Regards,
Mrunalgv_name = 'MARA'.
gc_quote = '''.
CONCATENATE gc_quote gv_name gc_quote INTO value.
Pushpraj -
How to get string value from xml in JSF??
In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF
Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization. -
How to delete string or line from unix file(dataset) of application server
Hi All,
After transfer workarea information or all records into dataset(unix file). When I see the file in application server automatically the last line is shown a blank line. I am not passing any blank line.
I have tried for single record than also the file generates the last line(2nd line) also a blank line.
When I m reading the dataset, it is not reading the last blank line but why it is showing the last blank line?
How to delete string or line from unix file(dataset) of application server?
Please give your comments to resolve this.
Thanks
Tirumula Rao ChinniHi Rio,
I faced similar kind of issue working with files on UNIX platform.
The line is a line feed to remove it use
DATA : lv_carr_linefd TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf.
DATA : lv_carr_return TYPE char1,
lv_line_feed TYPE char1.
lv_line_feed = lv_carr_linefd(1).
lv_carr_return = lv_carr_linefd+1(1).
Note: IMP: The character in ' ' is not space but is a special
character set by pressing ALT and +255 simultaneosly
REPLACE ALL OCCURRENCES OF lv_line_feed IN l_string WITH ' '.
REPLACE ALL OCCURRENCES OF lv_carr_return IN l_string WITH ' '. -
How to convert string to an integer in SQL Server 2008
Hi All,
How to convert string to an integer in sql server,
Input : string str="1,2,3,5"
Output would be : 1,2,3,5
Thanks in advance.
Regards,
SunilNo, you cannot convert to INT and get 1,2,3 BUT you can get
1
2
3
Is it ok?
CREATE FUNCTION [dbo].[SplitString]
@str VARCHAR(MAX)
RETURNS @ret TABLE (token VARCHAR(MAX))
AS
BEGIN
DECLARE @x XML
SET @x = '<t>' + REPLACE(@str, ',', '</t><t>') + '</t>'
INSERT INTO @ret
SELECT x.i.value('.', 'VARCHAR(MAX)') AS token
FROM @x.nodes('//t') x(i)
RETURN
END
----Usage
SELECT * FROM SplitString ('1,2,3')
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to display string with XML content in 4.6?
Hi,
I`d like to know how to display string with XML content in it for 4.6.
4.6 has not method parse_string.
And example like this is not helpful:
DATA: lo_mxml TYPE REF TO cl_xml_document.
CREATE OBJECT lo_mxml.
CALL METHOD lo_mxml->parse_string
EXPORTING
stream = gv_xml_string.
CALL METHOD lo_mxml->display.
Thank you.Hi,
May be you can use fm SAP_CONVERT_TO_XML_FORMAT. But it have some issues with memory usage, the program consumed tons of memory during convert.
a®
Maybe you are looking for
-
Expand a SAN partition under Solaris 10
Hi! I am using Solaris 10 hook up a SAN partition through SAN network. Now I want to expand the original SAN partition, with data on it, from 100GB to 200GB. We tried to expand it. On the SAN management side, it was expanded to 200GB. However, I am n
-
Apps missing in appworld online when BB connected
I recently installed a bunch of apps (mostly the free before 12/31 ones) via the Apps web site. The apps installed properly and showed in my Installed apps tab in My World online on my PC. Now when I log in online on my PC to my world I see all the a
-
Hello, I am using the motion assistant with labview 2013 and NI motion driver 8.1. I followed the first tutorial to create my first project (using the virtual friver). But when genrating a labview code, I could not execute the VI was created since th
-
PrivilegedActionException using On Demand Dataloader
Hello. While updating Account data in CRM On Demand, I am getting the below error. While inserting, I got no error. And while updating Custom Object, I got no error. It seems while updating Account. Does anyone know how to solve this error? *Import R
-
What is the best forum for speech recognition. I wanted to ask questions related integration with microsoft speech engine, not about basic wsr usage?