Compare Two Tables and insert Record Source Table With Increment ID
Increment ID using Row Number in Sql Server for Compare Two Tables
Source table has two Records ..and Destination table has 5 Records..now we get record from destination table ..but its not in source table ..that records inserted to source table.
now we dont using auto increment in source table,use this
Query for get the last ID of sourctable,then auomatically incremented the ID and get all except records from Destination table and
inserted Records to Souce table with incremented ID.
Source Table :categorymaster
Destination Table :categorymaster1
INSERT INTO categorymaster(CategoryCode,Description)
SELECT
ROW_NUMBER() OVER(ORDER BY (SELECT TOP 1 CategoryCode from CategoryMaster ORDER BY CategoryCode DESC )) + X.MaxID,
Description
FROM
( SELECT Description from categorymaster1 where description not in
( SELECT description from categorymaster)) AS MyTable
CROSS JOIN ( SELECT MAX (CategoryCode) AS MaxID FROM CategoryMaster) X
I have been garnisheeing on the best ways to invest our money but, I have not heard anything about a stock picks. Actually my friend told me about stock picks. I just want to know, is it a good way to invest our money in stock business?