TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Priyanka Singh
667
1.4k
660.1k
Join two tables in sql server
Oct 17 2019 2:28 AM
I have to fetch a value from two tables as a single result. But I am unable to join it. Please help me.
select
Constituent_Indices
from
ListingInfo A
where
comp_code=
'C0000578'
--tbl one
--table two
DECLARE
@index_name
VARCHAR
(500)
SELECT
@index_name =
COALESCE
(@index_name +
', '
,
''
) + index_name
FROM
MasterTables..indices_master B
where
comp_code=
'C0000578'
SELECT
LEFT
(RTRIM(@index_name), ( LEN(RTRIM(@index_name))))
as
Constituent_Indices
Reply
Answers (
1
)
Update a table column value with a value which is unique
Connect SQL Server from Server Object => Linked Servers