Query as follows
SELECT A._id,B.firstname + '' '' + B.lastname + '' '' + B.surname
as name,A.details
FROM dbo.tbl_farmer_farmdetails_' + @originname + ' A
INNER JOIN dbo.tbl_farmerregistration_' + @originname + ' B ON B.farmerctscode = A.farmer_id
WHERE B.farmerseason = '2018'
When i run the above code i get output as follows
id Name Details
1 Test1 "Product1":"Cilo","Product2":"Zilo"
i want the output as follows
id Name Product1 Product2
1 Test1 Cilo Zilo
from my above sql query what changes i have to made to get the above output
SELECT A._id,B.firstname + '' '' + B.lastname + '' '' + B.surname
as name,A.details
FROM dbo.tbl_farmer_farmdetails_' + @originname + ' A
INNER JOIN dbo.tbl_farmerregistration_' + @originname + ' B ON B.farmerctscode = A.farmer_id
WHERE B.farmerseason = '2018'
When i run the above code i get output as follows
id Name Details
1 Test1 "Product1":"Cilo","Product2":"Zilo"
i want the output as follows
id Name Product1 Product2
1 Test1 Cilo Zilo
from my above sql query what changes i have to made to get the above output
Sankara Krishnan VenugopalPosted May 21, 2018, 2:30 AM
Posted May 20, 2018, 11:57 PM
Sankara Krishnan VenugopalPosted May 20, 2018, 12:24 PM