top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to update data in a non primary key table

+1 vote
1,823 views

I have one table - TableA. This is source and target also. Table doesn't have any primary key. I am fetching data from TableA, then doing some calculation on some fields and updating them in same tableA. Now how can I update data when it doesn't have any primary key or composite key? Second question - If joining two columns make a record unique then how can I use it in informatica?

Plz help

posted May 12, 2014 by Pooja Bhanout

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

You can define the update statement in the target. There is that properties. Still you have to make informatica to perform an update, not insert. To do that you need to use the update strategy. I think you don't need in this solution to make any PK on that table, because you will use your own update statement, but please verify this.

To set the fields and make proper where condition for update you need to use :TU alias in the code. TU -> means the update strategy before the target.

Example:

update t_table set field1 = :TU.f1 where key_field = :TU.f5
answer May 13, 2014 by Shweta Singh
0 votes

To update the record you have to define the record uniquely.
Either you can create primary key at the database level or you can define it at Informatica level. After that you can update the record through Update Strategy Transformation or you can use session level properties to do the same.

answer May 27, 2014 by Shatark Bajpai
Similar Questions
+2 votes

I have one table - TableA. This is source and target also. Table doesn't have any primary key. I am fetching data from TableA, then doing some calculation on some fields and updating them in same tableA. Now how can I update data when it doesn't have any primary key or composite key? Second question - If joining two columns make a record unique then how can I use it in informatica?Plz help

+2 votes

My question is very similar to the one below, but on a informatica environment:

Retrieving the index of an inserted row

Here is a brief summary of the issue: I'm trying to figure out how I can insert a row into a table and then find out what the value of the auto_incremented id column was set to so that I can insert additional data into another table. Our target is SQL server 2008. We have a table which has to be populated by informatica ETLs and the application is also using the same table - so, we can't use informatica sequence generator.

In the past when I have used Oracle database, there was a Oracle sequence generator transformation available in Informatica - but for SQL server, I am not sure.

Any solutions please?

+2 votes

Couple of tables in our Database doesm't has any key. However, key was created in target table at informatica level.

Now my need is, need to identify informatica metadata table where I can find tgt table and corresponding column name marked as key.

Kindly suggest

0 votes

Couple of tables in our Database doesn't has any key. However, key was created in target table at informatica level.

Now my need is, need to identify informatica metadata table where I can find tgt table and corresponding column name marked as key.

Kindly suggest

+1 vote

Couple of tables in our Database doesm't have any key. However, key was created in target table at informatica level.

Now my need is,I want to identify informatica metadata table where I can find target table and corresponding column name marked as key.

These tables are created long back,not sure why it was created like that. We planed to add primary key at database level so to identify the primary key .I want to look for informatica metadata tables

Kindly suggest

...