How to get only updated records for a column using loading type INSERT
Hi,
Good morning all,
I have source1 containg 3 columns bill_cd,bill_desc,bill_date and
source2 has the columns bill_cd,bill_key,source_id.
My target has the columns bill_cd,bill_date,bill_desc .
Now the requirement is, bill_cd in target should not repeated when we run the mapping more than one thime. it should get only updated records not the previous records using only INSERT Loading type(for target) not to use update/insert.
How can we achieve this logic in mapping level.
Anybody Please give me some solution immediately.
Thanks in Advance,
Siv
Thanks Herzog for your reply,
Here bill_cd is not unique. Yes,I want only new records using INSERT as loading type. Suppose when the map runs for the first time, bill_cd is loaded with values 1 to 5.
Now, in the source I have got new records 6 to 10 for bill_cd and when I run the mapping again I need to get only records for bill_cd from 6 to 10 using INSERT as loading type.
Is it possible to achieve this at mapping level?
Regards,
Siv.
Similar Messages
-
How to get only the record which is different by outer join
Hi,
how to get the values Existing in table A which are not existing in table B by using left outer join, In this example only the record '3' should display. thanks
the requirementment is like
Table A.Number Table B.Number
1 1
2 2
3 4
4 5
output
3SQL> with a as (
select 1 a from dual union all
select 2 a from dual union all
select 3 a from dual union all
select 4 a from dual
b as (
select 1 a from dual union all
select 2 a from dual union all
select 4 a from dual union all
select 5 a from dual
select a.*
from a left outer join b on (a.a = b.a)
where b.a is null
A
3 -
GP :How to get only those WorkItems for a particular Process Instance ID
Hi,
I have to get only those work items for a particular Process Instance ID.
Currently I am able to get all gp workitems of a status, for a user.
IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(epUser1);
IGPWorkItem[] openItems = rtm.getWorkItems(GPWorkItemStatus.WORKITEM_STATUS_OPEN, userContext);
Now I want to get the gp work items for a particualr process instance ID. Is it possible?
Please help me.
Thanks and regards
SmithaHi Smitha,
Can you share with us how did you solve your problem?
I also encountered the same requirement.
Ashish -
Get only one record for an id for a date if multiple record exists
Hi,
I need help with below mentioned scenario.
DB Version: 11.2.0.3.0.
Requirement:
Fetch account records that were created after last run of program
Get latest record for an account on a given date if there are multiple records for same account.
If there is a gap of more than 1 day from last run of program, then get latest record for an account for each date if there are multiple records for same account.
Create table t_test
Id number not null,
cust_id number not null,
cust_Acct_id number not null,
ins_date date not null
insert into t_test values
(1, 12345, 678905, to_date('05/31/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(2, 12345, 678905, to_date('05/31/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(3, 12345, 678905, to_date('05/31/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(4, 12345, 678905, to_date('06/01/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(5, 12345, 678905, to_date('06/01/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(6, 12345, 678905, to_date('06/01/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(7, 12345, 678905, to_date('06/02/2012 12:05:10 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(8, 12345, 678905, to_date('06/02/2012 05:25:46 PM','MM/DD/YYYY HH:MI:SS PM'));
insert into t_test values
(9, 12345, 678905, to_date('06/02/2012 11:48:00 PM','MM/DD/YYYY HH:MI:SS PM'));
create table t_log
id number not null,
prgrm_id number not null,
last_run_date date not null
insert into t_log values
(1,1009,to_date('5/30/2012 07:05:12 AM','MM/DD/YYYY HH:MI:SS PM'));Result required:
id cust_id cust_acct_id ins_date
3 12345 678905 '05/31/2012 11:48:00 PM'
6 12345 678905 '06/01/2012 11:48:00 PM'
9 12345 678905 '06/02/2012 11:48:00 PM'
I tried below sql but it will return only id 9 record.
select
id,
cust_id,
cust_acct_id,
ins_date
from
select
id,
cust_id,
cust_acct_id,
ins_date,
row_number() over (partition by cust_acct_id order by ins_date desc) rn
from
t_test t
where
t.ins_date > (
select
last_run_date
from
t_log l
where
l.prgrm_id = 1009
where rn = 1;Thanks in advance.Try:
SQL> select
2 id,
3 cust_id,
4 cust_acct_id,
5 ins_date
6 from
7 (
8 select
9 t.id,
10 t.cust_id,
11 t.cust_acct_id,
12 t.ins_date,
13 row_number() over (partition by cust_acct_id, trunc(ins_date) order by ins_date desc) r
n
14 from
15 t_test t
16 , t_log l
17 where
18 t.ins_date >= l.last_run_date
19 and l.prgrm_id = 1009
20 )
21 where rn = 1;
ID CUST_ID CUST_ACCT_ID INS_DATE
3 12345 678905 31-05-2012 23:48:00
6 12345 678905 01-06-2012 23:48:00
9 12345 678905 02-06-2012 23:48:00But I now see that Bob already nailed it, while I was testing it ;) -
How to get only active records from MDM.
Hi all,
How can i get only the active records from MDM table.Now i am getting all the records in MDM table in my Master Report Iview.Only some of the records r active.can i get just the active records.If yes,how can i do that.
regards
kukkuclosing
-
How to get top 10 records for each option in table prompt?
Hi,
I have created one report in which my requirement is to get top 10 highest salaries for each departments. I have created one table prompt which contains the names of all departments. On the salary column I have applied one filter i.e. TOP 10. Currently I am having 3 departments. I want to show the top 10 salaries for each department, but I am getting top 3 from first, 4 from second and 3 from third.They are calculating top 10 salaries based on all departments, not on individual department. How can I get top 10 salaries for each department?Hi,
Use TopN function in your column formula.
Ex: TOPN("Sales ,5 BY department)
Thanks,
Satya -
How to get first 10 records from the database using JSP
i want ot get first 10 records from the database and then after clicking the next button in the page,it must show the next precceding 10 records from the database.i am getting the first 10 records .but how to post to the same page to get another preceeding 10 record.
Search the forums - this has been asked a lot. I usually recommend experimenting with tops and order bys until you're satisfied.
Kind regards,
Levi -
How to get the F4 help for table columns ..
Dear All,
Here I have created table with cell editors of INPUT FIELD .
And I would like to provide the f4 help for those columns .
Here I have checked the node , which i have binded to the table, there input help mode is set to Automatic and search helps are also attached for that node .
But in the table I am not getting the F4 help . Where as if i create the input fields invidually i am able to see the F4 help .
But for table column I am unable to find..
Help me regard this...
Thanks & regards,
Veerednra NathHi,
In debugging , the I have seen the node info attributes list ( VALUE_HELP_ID and VALUE_HELP_MODE ) .
For you understanding, Here I am giving the values which contains ,
VALUE_HELP_ID contains the AUTO:VBUK
AUTO:VBUP
AUTO:MAT1
AUTO:H_T023
and
VALUE_HELP_MODE contains the all Zeros for all the four attributes .
Hope I have given correct inputs .
Thanks & Regards,
Veerendra Nath -
How to have a common value for a column using sql loader
Hi Have a sql loader file which looks like below. But I am not getting how insert the same value for the column in all rows.
id,
crt_user_id
BEGINDATA
1;"system"
2;"system"
3;"system"
So, instead of entering the crt_user_id as system in all rows, can we place the value at the top after the column name?Thanks Srini. your hint/suggestion helped me in finding the solution.
LOAD DATA
INFILE *
BADFILE './TEST.BAD'
DISCARDFILE './TEST.DSC'
APPEND INTO TABLE TEST_TABLE
Fields terminated by ";" Optionally enclosed by '"'
ID,
crt_user_id CONSTANT 'SOME CONSTANT VALUE'
BEGINDATA
1
2
3
so by using CONSTANT key word, we can avoid tying the same value in the data -
There are links on the pages for various Cummulative Updates for SQL Compact v3.5 SP2 which look to relate to the desktop version, but are these also available for Windows Mobile devices? If so, what is the process to get hold of them?
We are seeing intermittent problems with corrupted databases on devices which are using SQL Compact v3.5 SP2 and have seen that some of the Cumulative Updates do relate to corruption and would like to see if these can help to solve the issue.Just select the KB article, at the top of each there is a link to request a hotfix, you will then get a email with a download link. The 8088 and 8109 hotfixes also apply to Windows Mobile.
http://erikej.blogspot.dk/2010/08/sql-server-compact-35-sp2-downloadable.html
Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com -
How to get count of records for each type from internal table
Hi Guys,
I want to implement a logic to find out the count of records in a internal table.
Assume my internal table have one field having the entries as shown below.
Internal table Entries
10
10
10
11
11
12
12
12
12
13
14
14
15
15
15
15
15
16
16
17
18
19
20
20
20
....... etc....
I should get an output as below
10's - 3
11's -2 ,
12's - 4.... etc..
Could any one help me how to do this.
Thanx,
KumarREPORT zzz.
DATA: i(100),
t(100),
j TYPE n.
TYPES: BEGIN OF gt_int_type,
linex(100) TYPE c,
END OF gt_int_type.
DATA: gt_int TYPE STANDARD TABLE OF gt_int_type,
wa_int LIKE LINE OF gt_int.
START-OF-SELECTION.
wa_int-linex = '10'.
APPEND wa_int TO gt_int.
wa_int-linex = '10'.
APPEND wa_int TO gt_int.
wa_int-linex = '10'.
APPEND wa_int TO gt_int.
wa_int-linex = '11'.
APPEND wa_int TO gt_int.
wa_int-linex = '11'.
APPEND wa_int TO gt_int.
wa_int-linex = '12'.
APPEND wa_int TO gt_int.
wa_int-linex = '12'.
APPEND wa_int TO gt_int.
wa_int-linex = '12'.
APPEND wa_int TO gt_int.
wa_int-linex = '12'.
APPEND wa_int TO gt_int.
wa_int-linex = '13'.
APPEND wa_int TO gt_int.
wa_int-linex = '14'.
APPEND wa_int TO gt_int.
wa_int-linex = '14'.
APPEND wa_int TO gt_int.
wa_int-linex = '15'.
APPEND wa_int TO gt_int.
wa_int-linex = '15'.
APPEND wa_int TO gt_int.
wa_int-linex = '15'.
APPEND wa_int TO gt_int.
wa_int-linex = '15'.
APPEND wa_int TO gt_int.
wa_int-linex = '15'.
APPEND wa_int TO gt_int.
wa_int-linex = '16'.
APPEND wa_int TO gt_int.
wa_int-linex = '16'.
APPEND wa_int TO gt_int.
wa_int-linex = '17'.
APPEND wa_int TO gt_int.
wa_int-linex = '18'.
APPEND wa_int TO gt_int.
wa_int-linex = '19'.
APPEND wa_int TO gt_int.
wa_int-linex = '20'.
APPEND wa_int TO gt_int.
wa_int-linex = '20'.
APPEND wa_int TO gt_int.
wa_int-linex = '20'.
APPEND wa_int TO gt_int.
LOOP AT gt_int INTO wa_int.
WRITE:/ wa_int-linex.
ENDLOOP.
ULINE.
SKIP 3.
SORT gt_int BY linex.
READ TABLE gt_int INDEX 1 INTO i.
j = 0.
LOOP AT gt_int INTO wa_int.
IF wa_int-linex EQ i.
j = j + 1.
ELSE.
WRITE:/ i,'''s = ', j.
j = 1.
i = wa_int-linex.
ENDIF.
ENDLOOP.
WRITE:/ i,'''s = ', j.
consider clearing leading/trainling spaces... -
How to get only one record per machine
I have this SQL statement that works.
SELECT
cn.Name0 AS [Computer Name],
cn.Model0 AS [Model],
cn.Manufacturer0 AS [Manufacturer],
bios.SerialNumber0 AS [Serial Number],
rs.Operating_System_Name_and0 AS [OS Type],
--ld.FreeSpace0 AS [Free Disk Space],
--ld.Size0 AS [Actual Disk Size],
x86.TotalPhysicalMemory0 AS [Total Memory],
aa.SMS_Assigned_Sites0 AS [Assigned Site]
FROM
v_GS_COMPUTER_SYSTEM cn INNER JOIN v_GS_LOGICAL_DISK ld on cn.ResourceID = ld.ResourceID
INNER JOIN v_GS_PARTITION gs ON cn.ResourceID = gs.ResourceID
INNER JOIN v_GS_X86_PC_MEMORY x86 ON gs.ResourceID = x86.ResourceID
INNER JOIN v_R_System rs ON gs.ResourceID = rs.resourceID
INNER JOIN v_GS_PC_BIOS bios ON rs.resourceID = bios.ResourceID
INNER JOIN v_RA_System_SMSAssignedSites aa ON bios.ResourceID = aa.ResourceID
WHERE
cn.Model0 LIKE '%780%'
ORDER BY
cn.Name0
The problem is whent his runs it returns multiple rows for each serial number/machine it finds. So I'll have 5 or 6 rows for the exact same machine. How do I make it only give me 1 row for each serial number/machine?
mqh7... because you added v_GS_PARTITION gs (which results in multiple rows per resource) and then you are doing the inner join blues.
This should be better:
SELECT
cn.Name0 AS [Computer Name],
cn.Model0 AS [Model],
cn.Manufacturer0 AS [Manufacturer],
bios.SerialNumber0 AS [Serial Number],
rs.Operating_System_Name_and0 AS [OS Type],
--ld.FreeSpace0 AS [Free Disk Space],
--ld.Size0 AS [Actual Disk Size],
x86.TotalPhysicalMemory0 AS [Total Memory],
aa.SMS_Assigned_Sites0 AS [Assigned Site]
FROM
v_GS_COMPUTER_SYSTEM cn
-- INNER JOIN v_GS_LOGICAL_DISK ld on cn.ResourceID = ld.ResourceID
--INNER JOIN v_GS_PARTITION gs ON cn.ResourceID = gs.ResourceID
INNER JOIN v_GS_X86_PC_MEMORY x86 ON x86.ResourceID = cn.ResourceID
INNER JOIN v_R_System rs ON rs.ResourceID = cn.resourceID
INNER JOIN v_GS_PC_BIOS bios ON bios.resourceID = cn.ResourceID
INNER JOIN v_RA_System_SMSAssignedSites aa ON aa.ResourceID = cn.ResourceID
WHERE cn.Model0 LIKE '%780%'
ORDER BY
cn.Name0
Torsten Meringer | http://www.mssccmfaq.de -
How to get Sharepoint OAuth clientId for Java application used in any tenant
I'm developing a web application for Office365 using the SharePoint 2013 REST service.
This app is hosted by my web server. The development language is Java.
I plan that users in any tenant use my app via OAuth.
How can I register my app to get clientId for OAuth?
I attempted to register my app by seller dashboard, but it seemed like register applications
to seller dashboard should be developed by .NET. And I couldn't use appregnew.aspx
because cilentId from appregnew.aspx could use only in one tenant.
Please let me know any better way to register my app.
Thanks,
TarouHi,
SharePoint 2013 provide three types of app, SharePoint-hosted app, Provider-hosted app and Autohosted app. Which one do you used?
Here is an article from MSDN for your reference:
Guidelines for registering apps for SharePoint 2013
http://msdn.microsoft.com/en-us/library/office/jj687469(v=office.15).aspx
Best Regards
Dennis Guo
TechNet Community Support -
How to get only mandatory elements of BO schema using XAI Inbound service
Hi Folks,
I create a XAI Inbound service for a BO and I just want to generate the WSDL xml request schema with only mandatory fields of that BO.
How to acheive this? Is it possible and is there any solution already for this?Hi Folks,
I create a XAI Inbound service for a BO and I just want to generate the WSDL xml request schema with only mandatory fields of that BO.
How to acheive this? Is it possible and is there any solution already for this? -
How to get a week number for the year using oracle sql query?
hi everyone,
i have the requirement to find the week number for the calender..
so that week number should start with 01 when the year starts and it should end with week end date(that is first saturday of the january month).. so next week number starts with sunday and ends with saturday ,continously.. in the end date of the year it should not be 'saturday' but week number should end with last date of the year.. again in the next year it should start with '01'.
for example:
01-JAN-13 tuesday 01
02-JAN-13 wednesday 01
03-JAN-13 thursday 01
04-JAN-13 friday 01
05-JAN-13 saturday 01
06-JAN-13 sunday 02
07-JAN-13 monday 02
26-DEC-13 thursday 52
27-DEC-13 friday 52
28-DEC-13 saturday 52
29-DEC-13 sunday 53
30-DEC-13 monday 53
31-DEC-13 tuesday 53
01-JAN-14 wednesday 01
02-JAN-14 thursday 01
how can i achieve this, can anyone please help me out on this..
i have a query that starts with 01 when year starts but it gives problem in the end of the year .. described below with a query..
select mydate,
to_char(mydate,'day') as weekday,
to_char(next_day(mydate,'sunday'),'iw') as week_num
FROM ( SELECT TRUNC (SYSDATE, 'yy') - 1 + LEVEL AS mydate
FROM dual
CONNECT BY LEVEL <= (SELECT TRUNC (ADD_MONTHS (SYSDATE, 24), 'yy')
- TRUNC (SYSDATE, 'yy')
FROM DUAL))
this query gives date, weekday and week_num for 2 years 2013 and 2014,
when i run this query ,at the end of the 2013 it gives the result as,
26-DEC-13 thursday 52
27-DEC-13 friday 52
28-DEC-13 saturday 52
29-DEC-13 sunday 01
30-DEC-13 monday 01
31-DEC-13 tuesday 01
01-JAN-14 wednesday 01
02-JAN-14 thursday 01
for dates 29 ,30,31st it should give 53 .. how can i achieve that using this this query .. can any one help me out on this please...
thanks,
pradeepI tried with the IW ...
it is giving week_id for the year.
select
mydate,
to_char(mydate,'day'),
case when mydate between trunc(mydate,'yyyy') and next_day(trunc(mydate,'yyyy'),'saturday')
then to_number(to_char(mydate,'yyyy')||to_char(trunc(mydate,'yyyy'),'iw'))
when mydate between next_day(trunc(mydate,'yyyy'),'saturday') and trunc(add_months(trunc(mydate,'yyyy'),12)-1,'d')-1
then to_number(to_char(mydate,'yyyy')||to_char(next_day(mydate,'sunday'),'iw'))
when mydate between trunc(add_months(trunc(mydate,'yyyy'),12)-1,'d') and add_months(trunc(mydate,'yyyy'),12)-1
then to_number(to_char(mydate,'yyyy')||to_char(trunc(add_months(trunc(mydate,'yyyy'),12)-1,'d')-1,'iw')+1) end as WEEK_ID
FROM ( SELECT TRUNC (SYSDATE, 'yy') - 1 + LEVEL AS mydate
FROM dual
CONNECT BY LEVEL <= (SELECT TRUNC (ADD_MONTHS (SYSDATE, 24), 'yy')
- TRUNC (SYSDATE, 'yy')
FROM DUAL
))
Maybe you are looking for
-
Re install Adobe Photoshop CS2
31/05/2013. The question is for someone with Photoshop CS2 on Windows 7. I presently had to reformat my hard drive to get rid of a bug that left me with a black screen. After all is reset started to ri install my old programs. One of them is Adobe Ph
-
i have a table that is used by different users at the same time for updation & query only. What is the best locking sequence that can i use to update the record, or how can i know that table/row is locked so that the message can be displayed on the s
-
Camera roll not reducing size after deleting photos
My camera roll stays the same size even after deleting 600 photos - I'm trying to still keep the roll included in my iCloud backup but had to size it down because the backups were too large and stopped without upgrading my storage. Why is this happen
-
ADD-ON XL Reporter: Error installing XL Reporter in various PCs
Hi, I went to a customer yesterday install XL Reporter and some templates. The customer has 3 PCs in a workgroup. I install XL on the first PC and works without problems. On the others, the PC frozes and i received the following error: Error Preparin
-
I'm using a Dynex Mini DisplayPort to DVI Adaptor to use a second display (an older display, I'll admit). After I have unplugged the adaptor, my MacBook still tries to read the second display, and switches back-and-forth between a blue screen & my de