the reports needs to be in a specific column order:
SOWTracker,Vendor,ResourceLastName,ResourceFirstName, etc
But they want unique records for each person so I am putting ResourceLastName first with distinct.
I created a Grid and fill it with data but of course SOWTracker is not first.
If change my SQL string to: Select SOWTracker, Vendor, Distinct ResourceLastName ,
I get an error: Incorrect syntax near the keyword 'Distinct'.
The AS.NET GridView has no columns, its unbound, the columns are created by passing a SQL string to a data adaptor:
Is there a way to switch it so lastname is unique or distinct but SOWtracker is first on the left hand side?
Any ideas?
TIA
DougP
SOWTracker,Vendor,ResourceLastName,ResourceFirstName, etc
But they want unique records for each person so I am putting ResourceLastName first with distinct.
I created a Grid and fill it with data but of course SOWTracker is not first.
If change my SQL string to: Select SOWTracker, Vendor, Distinct ResourceLastName ,
I get an error: Incorrect syntax near the keyword 'Distinct'.
The AS.NET GridView has no columns, its unbound, the columns are created by passing a SQL string to a data adaptor:
Is there a way to switch it so lastname is unique or distinct but SOWtracker is first on the left hand side?
Any ideas?
Code:
SQLStatement = "Select Distinct ResourceLastName,ResourceFirstName,
SOWTracker,Vendor,ePrizeID,
convert(nvarchar(12),cast(StartDate as date), 101) as StartDate,
convert(nvarchar(12),cast(EndDate as date), 101) as EndDate,
CostCenter,Manager,
ResourceType,[Offshore-OnShore] as OffshoreOnShore
from SOWResources
Where [Vendor] like '%somedatahere%'"
Dim daTrans As New SqlDataAdapter
Dim dtTrans As New DataTable
daTrans.SelectCommand = New SqlCommand(SQLStatement, Conn)
daTrans.Fill(dtTrans)
TIA
DougP