Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Combining data from two tables

$
0
0

Hi all,

I have database with two different tables BaseData and QualityDetails as given below with ID as the Primary key

BaseData

Sent_to_Client  NameID
1/2/2015  ABC1 1000000
2/24/2015  ABC2 1000001
5/24/2015  ABC3 1000002
3/24/2015  ABC4 1000003

QualityDetails

IDError
1000000   1
1000001   2
1000002   0
1000003   3

I want to write an SQL Query to get the data by combining both the tables by dates from 2/1/2015 to 5/30/2015 in BaseData table.

My table after executing the query should be

IDNameError
1000001 ABC2   2
1000002 ABC3   0
1000003 ABC4   3

Please provide asap.

Thanks,

Jimmit Raval


Jimmit Raval


Viewing all articles
Browse latest Browse all 7129

Trending Articles