GaWill
Member
Hi im currently trying to pull some data out of a few tables and i want to merge 2 of the fields so that they become one in my data grid i.e) Firstname and Lastname to become on field name.
I can pull the data in fine just need to know how to make it one field in the datagrid instead of the 2.
My Query is:
Dim cmd As New SqlClient.SqlCommand("SELECT dbo.CLINIC.CLINICNO, dbo.CLINIC.BOOKED_DATE, dbo.CLINIC.BOOKED_TIME, dbo.STAFF.NAME, dbo.PATIENT.FIRSTNAME, dbo.PATIENT.LASTNAME, dbo.PATIENT.DOB, dbo.PATIENT.PEDNO, dbo.PATIENT.REGNO FROM (dbo.CLINIC INNER JOIN dbo.PATIENT ON dbo.CLINIC.INTID = dbo.PATIENT.INTID) INNER JOIN dbo.STAFF ON dbo.CLINIC.STAFF_CODE_1 = dbo.STAFF.STAFF_CODE WHERE (((dbo.CLINIC.COMPLETE)='booked'AND BOOKED_DATE = @BOOKED_DATE ))", cs)
So i want to merge dbo.PATIENT.FIRSTNAME and dbo.PATIENT.LASTNAME so they both fill one new field called name in my datagrid.
Im using VB 2005 .
I can pull the data in fine just need to know how to make it one field in the datagrid instead of the 2.
My Query is:
Dim cmd As New SqlClient.SqlCommand("SELECT dbo.CLINIC.CLINICNO, dbo.CLINIC.BOOKED_DATE, dbo.CLINIC.BOOKED_TIME, dbo.STAFF.NAME, dbo.PATIENT.FIRSTNAME, dbo.PATIENT.LASTNAME, dbo.PATIENT.DOB, dbo.PATIENT.PEDNO, dbo.PATIENT.REGNO FROM (dbo.CLINIC INNER JOIN dbo.PATIENT ON dbo.CLINIC.INTID = dbo.PATIENT.INTID) INNER JOIN dbo.STAFF ON dbo.CLINIC.STAFF_CODE_1 = dbo.STAFF.STAFF_CODE WHERE (((dbo.CLINIC.COMPLETE)='booked'AND BOOKED_DATE = @BOOKED_DATE ))", cs)
So i want to merge dbo.PATIENT.FIRSTNAME and dbo.PATIENT.LASTNAME so they both fill one new field called name in my datagrid.
Im using VB 2005 .