How to generate a dynamic update query to update error flag in a mapping?
i have a mapping in which i m loading log table through generated parameter file.But i want to update the error flag using dynamic update query.for that i have to generate a query and use update sqloverridw in target instances.but i m not getting how to implement it.Please help..!!
Hi All, I have a scenario. Below is the source record. field1|field2|field3|field4|field5|field6|field7
5|20150329|1|980100001|500|My name is Lalita|25
5|20150329|1|303444442|200|My name is |Lalita.I work in TCS|26
5|20150329|1|442101001|1000|My name is Lalita.I worked Syntel|56
5|20150329|1|446788900|300|My name|67 My source file is | separator. But for field6 the data might come with '|'.
So I want to import the data along with '|' after separating all field in Informatica Layer. Source team is not going to preformat the file. Please suggest how to achive this.
Similar Messages
-
give me some points on how to generate the dynamic Alv using RTTS and why it is useful to generate this way
Hi ,
Please follow this link
RTTS question
problem with coloring cells in dynamic fieldcatalog
Regards,
Pravin -
example of generating excel dynamically in ssis? geting error [Excel Destination [190]] Error: Opening a rowset for "Excel_Destination$" failed. Check that the object exists in the database.
Hi Vijay
Can you be little bit more specific, did you receive this error when you are designing this pacakge using BIDS
Becuase when you are designing this pacakge in BIDS, you need to manaually create a excel sheet manually for the first time you run,
are you creating excel sheet using execute sql task and excel connection with input from a variable?
Did you receive this error in validation phase or execution phase ?
Can you share your query to create table in excel ?
http://sqljunkieshare.com/2012/02/28/how-to-create-and-map-excel-destination-dynamically-in-ssis/
Use the above post -
How to generate a dynamic selection-screen
Hi folks,
I have a itab with all fields and descriptions of a database-table. Now i want to generate a selection screen dynamically. I want to create a select-option for every field of the table.
First I read all fields of a database table into my intern table:
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = 'database_tabname'
TABLES
dfies_tab = it_tabname_fields.
Then I tried to generate a dynamic selection-screen with a select-options statement per field of the itab, but it doesn't work:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 NO INTERVALS.
LOOP AT it_tabname_fields INTO s_tabname_fields. "should be 14 loops and 14 lines
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (25) s_tabname_fields-SCRTEXT_S FOR FIELD var1. "the name of the field should be set dynamically from the itab
SELECT-OPTIONS var1 FOR tabname-s_tabname_fields-fieldname. "s_tabname_fields-fieldname should be set dynamically for each line
SELECTION-SCREEN END OF LINE.
ENDLOOP.
SELECTION-SCREEN END OF BLOCK b2.
I know that this doesn't work but it should help you to understand what i want to do. It doesn't create more than one select-option (it should be 14 because there are 14 lines in the table) and it doesn't get the values from the table.
I hope you can help me...
Regards,
Sebastianhi
Firstly, have a look at the following code to see how this can be implemented -
REPORT ZTEST.
perform test.
class test definition.
public section.
methods: create_screen.
endclass.
class test implementation.
method create_screen.
data: report_line(72),
report_source like table of report_line.
data: err_message(240),
err_line type i,
err_word(100).
report_line = 'REPORT TEST.'.
append report_line to report_source.
report_line = 'PARAMETERS: P_TEST TYPE I.'.
append report_line to report_source.
report_line = 'START-OF-SELECTION.'.
append report_line to report_source.
report_line = 'WRITE : P_TEST.'.
append report_line to report_source.
syntax-check for report_source message err_message
line err_line
word err_word.
if err_message is initial.
INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
endif.
endmethod.
endclass.
form test.
data test type ref to test.
CREATE OBJECT TEST.
call method test->create_screen.
endform.
As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
Regards,
ravish
<b>plz dont forget to reward points if helpful</b> -
How to generate XML from SQL query
possible ways to generate XML from SQL qury.
i want to generate XML of following query. "Select * from emp,dep wher emp.deptno=dept.deptno"Hello.
Can you try:
SQL> set pages 0
SQL> set linesize 150
SQL> set long 9999999
SQL> set head off
SQL> select dbms_xmlgen.getxml('Select * from emp,dep wher emp.deptno=dept.deptno') from dual;
It works fine for me.
Octavio -
How to generate a View from Query
Hi
How to save a Query as a view....that to be used in web templates
I had a query with 20 diff columns and 20 free chars in it.
My requirment is to generate 5 to 8 different views for the same query with diff combinations KF's & CHAR's and same them and then assign then to users according to their requirment
That will make easy to maintain the Query
ThanksHi,
1) Execute the query in BEx analyser and set/Define the report as you want.
2) In BEx tool bar click SAVE AS Views and save it.
3) This view can be used in WAD.
The Problem with the View is that, whenever there is change in the query, you must regenerate the view.
Regards,
Kams -
How to generate reportdesign dynamically using java with out xml file
hi
how can i generate a reportdesign dynamically using java with out passing xml file to jasperDesign , i want to create my reportdesign with out xml file
how can i ,please help
thanksLiveCycle does provide a Java API to forms; LiveCycle is in fact a suite of programs, mostly enterprise level for running on server (next to which the cost of the master suite is a drop in the ocean). LiveCycle Designer is perhaps the only end user tool, and it is not for server use and doesn't have an API.
Are you looking for a server solution? If so, nothing in the master suite can help, it isn't for server use. -
How to generate controls dynamically based on value stored in database using mvc4?
In my database, i have a field called control_ids corresponding to text box, dropdownlist, radiobuttonlist etc. My goal is to
create controls dynamically based on value of control_id-field in table. Anybody please help me how to create the controls dynamically in MVC 4 for this scenario.In your view you could do something like that:
foreach (var field in Model.FormStruture.fields)
<div class="editor-label">
<label for="@field.Name">@field.Descricao</label>
</div>
<div class="editor-field">
<input class="text-box single-line" id="@field.Name" name="@field.Name" type="text" value="@field.Valor" data-rules-required="@field.Mandatory.ToString().ToLower()" data-rule-number="@field.Tipo.Equals(SiB.OCR.Documentos.Modelo.TipofieldDocumento.Numerico).ToString().ToLower()" title="@field.Descricao" />
</div>
if (!String.IsNullOrEmpty(field.Format))
@:<script type="text/javascript">$("[email protected]").mask("@field.Format");</script> -
How to Create a Dynamic Crosstab Query?
Hi friends,
I have a table like:
DateOfSale SalesPerson SalesAmount
Which may have
any number of sales' staff (old/new workers) who have sold goods on different dates which may range at
any length of time.
Any suggestion for an appropriate query / method to derive a crosstab / pivot result as
SalesPerson Year1 Year2 Year3
With field SalesPerson representing
each of the staff member and all the amounts added
in terms of years, whatever the range may exist in time, instead of providing names and years in a hard-coded manner?
Looking forward for your expert advices.
Thanx in advance.
Best Regards, Faraz A Qureshilike this
;With CTE
AS
SELECT ROW_NUMBER() OVER (PARTITION BY SalesPerson ORDER BY DATEDIFF(yy,0,DateOfSale)) AS Seq,
DATEADD(yy,DATEDIFF(yy,0,DateOfSale),0) AS YrDate,
SalesPerson,
SUM(SalesAmount) AS SalesAmount
FROM Table
GROUP BY DATEDIFF(yy,0,DateOfSale),SalesPerson
SELECT SalesPerson,
[1] AS Year1,
[2] AS Year2,
[3] AS Year3,
[4] AS Year4
FROM CTE
PIVOT (MAX(SalesAmount) FOR Seq IN ([1],[2],[3],[4]))p
if you want to make this dynamic see
http://beyondrelational.com/modules/2/blogs/70/posts/10840/dynamic-pivot-in-sql-server-2005.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to generate a dynamic column with unique value in AMDP
Hi Collegue,
For AMDP I have a table with material plant,i have to assign a unique number to each unique combination of material,plants into a dynamic column say sequence.
Please suggest me how to proceed.
Regards,
Saurabhhi
Firstly, have a look at the following code to see how this can be implemented -
REPORT ZTEST.
perform test.
class test definition.
public section.
methods: create_screen.
endclass.
class test implementation.
method create_screen.
data: report_line(72),
report_source like table of report_line.
data: err_message(240),
err_line type i,
err_word(100).
report_line = 'REPORT TEST.'.
append report_line to report_source.
report_line = 'PARAMETERS: P_TEST TYPE I.'.
append report_line to report_source.
report_line = 'START-OF-SELECTION.'.
append report_line to report_source.
report_line = 'WRITE : P_TEST.'.
append report_line to report_source.
syntax-check for report_source message err_message
line err_line
word err_word.
if err_message is initial.
INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
endif.
endmethod.
endclass.
form test.
data test type ref to test.
CREATE OBJECT TEST.
call method test->create_screen.
endform.
As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
Regards,
ravish
<b>plz dont forget to reward points if helpful</b> -
How to generate fields dynamically
I have the following in application.java.
public void addWaterCraft(WaterCraft newCraft) { waterCraftList.add(newCraft); }
if the user clicks " add watercraft endorsement" , it takes him to another screen where it has various fields like
1. watercraft make
2. watercraft length
3.watercraft type
under watercraft heading.
What i want is the user should be able to enter unlimited watercraft endorsements. That means if the user clicks " add watercraft endorsement" second time, automatically, second row of fields should be generated.What code should i add to
public void addWaterCraft(WaterCraft newCraft) { waterCraftList.add(newCraft); } to generate unlimited number of watercrafts?
thanksAdd them to a List, Set, or Map.
http://java.sun.com/docs/books/tutorial/collections/ -
How to generate screen dynamically ?
My requirement is to get the customers informations but the case is according to the number of the customers to generate the tab screen automatically (ex: 5 customers should be 5 tabs )and each tab screen to layout the information of the customer.
the title of the tab should be the customer name.
any suggestion?
many thanks~hi
good
try this code
FUNCTION z_change_screen_field_position.
Code Devlioped in version 4.5B
""Local interface:
*" IMPORTING
*" VALUE(PROG) LIKE D020S-PROG DEFAULT SY-REPID
*" VALUE(DNUM) LIKE D020S-DNUM DEFAULT SY-DYNNR
*" VALUE(FNAM) LIKE D021S-FNAM
*" VALUE(LINE_NUM)
*" VALUE(COLN_NUM)
DATA: h LIKE d020s,
f LIKE d021s OCCURS 0 WITH HEADER LINE,
e LIKE d022s OCCURS 0 WITH HEADER LINE,
m LIKE d023s OCCURS 0 WITH HEADER LINE,
f1(100), f2(100), f3(100), dynpro_id(44).
Format Screen ID
dynpro_id = prog.
dynpro_id+40(4) = dnum.
Import Screen data in tables
IMPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Modify Screen Data
LOOP AT f WHERE fnam EQ fnam.
f-line = line_num.
f-coln = coln_num.
MODIFY f.
ENDLOOP.
CHECK sy-subrc EQ 0.
Export Screen Data
EXPORT DYNPRO h f e m ID dynpro_id.
CHECK sy-subrc EQ 0.
Generate Screen for changes to take effect
GENERATE DYNPRO h f e m ID dynpro_id MESSAGE f1 LINE f2 WORD f3.
ENDFUNCTION.
thanks
mrutyun^ -
How to have a dynamic sql query clause as a bind var ?
Hi Folks ,
I need to set up a bind variable something like so
i_name in varchar(10);
begin
select * from tablename where col1 == :i_name
end
any ideas ?Hi,
Here's an example of using a bind variable in SQL*Plus:
SET SERVEROUTPUT ON SIZE 10000
VARIABLE target_job VARCHAR2 (10)
EXECUTE :target_job := 'CLERK';
BEGIN
FOR emp_rec IN (
SELECT ename
, job
FROM scott.emp
WHERE job = :target_job
LOOP
dbms_output.put_line (emp_rec.ename
|| ', '
|| emp_rec.job
END LOOP;
END;
/What are you trying to do? -
How to speed up SQL spatial query (spatial index error)
Hi,
Im trying to split polylines by points which have a small buffer around them. Currently i have over 370,000 lines and 320,000 nodes and the query is running really slowly (ive left it for 3 days and it still hasnt completed). I have tried forcing a spatial
index using with (Index(SI_tempPD)) but i get the following error:
"The query processor could not produce a query plan for a query with a spatial index hint. Reason: Could not find required binary spatial method in a condition. Try removing the index hints or removing SET FORCEPLAN."
below is the snippet of code that im trying to run when i get the error:
BEGIN INSERT INTO TempLines ( [linenum] ,[ogr_geometry] ) SELECT lines.[linenum] ,lines.[ogr_geometry].STDifference(points.[ogr_geometry].STBuffer(0.005)) AS ogr_geometry FROM dbo.TemplineData AS lines with(Index(SI_tempPD)) INNER JOIN dbo.[TemplineNodes] AS points ON lines.[ogr_geometry].STIntersection(points.[ogr_geometry]).STDistance(points.[ogr_geometry]) < 1 WHERE (lines.[linenum] <> points.[linenum]) END
is there anyway i can speed up the query? (I also have a clustered primary key) the execution plan shows that a filter takes up 36% of the cost and the insert takes up 64%
Any help would be greatly appreciated! (im using SQL Server 2008 (SQL server Management studio 10.50.1600.1))SQL Server spatial indexes don't support STDifference or STIntersection, see
https://technet.microsoft.com/en-us/library/bb895373(v=SQL.105).aspx, which is why you get the error.
Your query is doing multiple expensive spatial operations against some fairly good-size tables in a join. You might get better results by either breaking the query into multiple simpler queries (SELECT into a temporary table and move the STDifference and
STBuffer and INSERT off to a separate statement), and (if possible) rearchitecting the query to use STIntersects (which does support spatial index) rather than STIntersection.
Hope this helps, Bob -
Can I write a single update query to update Data of one table to another
<Table1>
ID number
fname varchar2(10)
lname varchar2(10)
<Table2>
ID number
fname2 varchar2(10)
lname2 varchar2(10)
Both the table contains data, and I want to write a single query to update fname and lname from <Table2> to <Table1>
Note: ID contains common valuehere we go.
SQL> create table table_1
2 (id number
3 ,fname varchar2(32)
4 ,lname varchar2(32))
5 /
Table created.
SQL>
SQL> create table table_2
2 (id number
3 ,fname varchar2(32)
4 ,lname varchar2(32))
5 /
Table created.
SQL>
SQL> insert into table_1 values(1, 'Scott', 'Tiger')
2 /
1 row created.
SQL> insert into table_1 values(2, 'Tiger', 'Scott')
2 /
1 row created.
SQL>
SQL> insert into table_2 values(1, NULL, NULL)
2 /
1 row created.
SQL> insert into table_2 values(2, NULL, NULL)
2 /
1 row created.
SQL>
SQL> select * from table_1
2 /
ID FNAME LNAME
1 Scott Tiger
2 Tiger Scott
SQL> select * from table_2
2 /
ID FNAME LNAME
1
2
SQL>
SQL> update table_2 a
2 set fname = (select fname from table_1 where id=a.id)
3 ,lname = (select lname from table_1 where id=a.id)
4 where id = id
5 /
2 rows updated.
SQL>
SQL> select * from table_2
2 /
ID FNAME LNAME
1 Scott Tiger
2 Tiger Scott
Maybe you are looking for
-
Problem with Ukrainean , Russian , English language Route Description
Hi All, I have come across a very much unique situation out here as below: 1. I have created a Route in Development server {English as logon language} with English description. 2. Then maintained the Translation for this English description into Ukra
-
Java 3D a problem with switching appearances
I'm writing an application which allows to change primitive objects' ( sphere, box and cone- objects are changed with JComboBox) properties via user interface. It has a few panels each for different attributes group ( on the basis of Appearance class
-
Hi I have the connectivity from my java servlet to oracle database for changing the password on a series of servers. If the user can not login to the server or for any other reason there is a problem , there are 2 messages that are shown, one the mes
-
Computer authorization / deauthorization
I've just installed Mountain Lion on my iMac - previously i've been using home sharing, but after the upgrade iTunes ask for computer authorization. When I'm trying to authorize - i get the message that "either my credentials are wrong or I do not ha
-
Online help vi in Windows 98 and 2000
Hello: I'm using LabView's ControlOnLineHelp.vi to view a compiled help file (.chm). It works fine on my XP system but it doesn't work under Windows 2000 or 98. Has anyone else found this? Mike