From what you have said, yes, you can make that into one table. Since TpNo is not available for all FinId, you would need to make the column TpNo nullable.
can we merge one to one table in sql server?
hi
I have this data in excel.now I have created two tables in the sql server one for left side of my data and one for last column (TpNo).
FinId is my primary key in both table.
one TpNo has one FinId but each fin has not a TpNo some of them has and some of them has not.
now my question is can I merge two tables in on table to reduce join in my query?
SQL Server Other
-
Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
2024-08-11T09:03:34.68+00:00
1 additional answer
Sort by: Most helpful
-
LiHongMSFT-4306 31,566 Reputation points
2024-08-12T01:57:50.6533333+00:00 Hi @Farshad Valizade
can I merge two tables in on table
Yes, since you have
FinID
in both tables.However, why not just import the whole excel file to another new table?
Best regards,
Cosmog
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".