Insert the data from Old table to new table, ID from new table and update for the corresponding row in old table. Most optimized way?



Category : Databases

I have two table. OLDTABLE and NEWTABLE.
I need to insert some data from oldtable to newtable and the get the ID from new table and update in the oldtable for that corresponding row. the newtable ID has seperate column in oldtable which is null by default.


One way is to get the ID from both table while inserting the data in new table and then later find the data in oldtable and update it. Which is simpler way.


Can anyone suggest some optimized way to do so?


View Replies

Related to : Insert the data from Old table to new table, ID from new table and update for the corresponding row in old table. Most optimized way?


insert data from one table to another table table name genrated runtime without declaring the table fields
Category : Databases

I have two table say table1 and table2 all the columns in both table are same but table2 has some extra column in which i want to insert a some default value and name of table is generated runtime so table name can be changed so i cant declare the field of table.


View Replies


Creating SQL Trigger (insert or update) which will take data from one table and will put to another database table
Category : Databases

I have got one table with name Links with fields


[PUBLICATION_ID],
[PAGE_ID],
[COMPONENT_ID],
[COMPONENT_TEMPLATE_ID],
[COMPONENT_TEMPLATE_PRIORITY],
[COMPONENT_POSITION],[URL]

in database Tridion_Broker


View Replies


MySQL INSERT into new table, SELECT from old table, UPDATE old table with new key
Category : Databases

Okay, here goes...

Code:

INSERT INTO retailers
(retailername, retailerdesc, retailerwebsite, retailerurl, active)
SELECT
datasource_retailername,
dataso

View Replies


SSIS: How to transfer data from table A to table B and then update table A flag column for each row
Category : Databases

I need to crate a package in SSIS which will selectively transfer data from Table A to table B based on a flag in Table A and after the transfer update the flag in Table A.


Please advice on the approach to this scenario and the different ways in which this can be done effectively.


View Replies


SQL Update and Insert: Inserting a whole data table into another table
Category : ASP & ASP.net

Hello,

If I create a data tabe in C# like so:

datatable t = new DataTable;

DataColum C1 = new DataColum;//ID column

t.Columns.Add(C1);

//the same with column C2

Then I fill up the table with some data.

Then the goal is to either insert this data or up


View Replies


Update table while insert data to another table
Category : Programming Languages

it seem like mine coding din work..
[php]
<?
include("checkin.html");
$conn=mysql_connect('localhost','root',') or die ('Could not connect to server');
$today = date("Y.m.d");
mysql_select_db('hms', $conn);
$ok = mysql_query("

View Replies


php mysql if data exist update else insert data from one table to another table :- -
Category : Development
Good day!
I got a problem in updating my data where the data came from other table.
this is the scenario..
i have 3 tables:
1. other_deductions
2 . deductions
3. test_other_deductions //combination of other_deductions and deductions data
I want to happen is when I

View Replies


php mysql if data exist update else insert data from one table to another table :-
Category : Development
Good day!
I got a problem in updating my data where the data came from other table.
this is the scenario..
i have 3 tables:
1. other_deductions
2 . deductions
3. test_other_deductions //combination of other_deductions and deductions data
I want to happen is when I

View Replies


php mysql if data exist update else insert data from one table to another table
Category : Webmasters
Good day!
I got a problem in updating my data where the data came from other table.
this is the scenario..
i have 3 tables:
1. other_deductions
2 . deductions
3. test_other_deductions //combination of other_deductions and deductions data
I want to happen is when I

View Replies


I have created a table Table with name as Varchar and id as int. Now i have started inserting the rows like, insert into Table values ('arun',20).
Category : ASP & ASP.net
I have created a table Table with name as Varchar and id as int. Now i have started inserting the rows like,insert into Table values ('arun',20).Yes i have inserted a row in the tab

View Replies


2012 / 2017 Copyrights BigHow , All Rights Reserved .