以下はmtデータベーステーブルです
CREATE TABLE [dbo].[mtblLog_Book](
[Logbook_Number] [int] IDENTITY(1,1) NOT NULL,
[Sno] [int] NULL,
[Vehicle_Number] [nvarchar](100) NULL,
[Vehicle_Booking_Date] [datetime] NULL,
[Time_From] [datetime] NULL,
[Time_To] [datetime] NULL,
[KM_Start] [int] NULL,
[KM_End] [int] NULL,
[Total] [int] NULL,
[Vehicle_Used_By] [varchar](100) NULL,
[Cost_Code] [nvarchar](50) NULL,
[Budget_Line] [nvarchar](50) NULL,
[Entry_Date] [datetime] NULL
) ON [PRIMARY]
重複がありますCost_Code
。以下の形式でデータを取得できるようにクエリが必要です
CostCode1
......................
All data which belong to CostCode1
......................
CostCode2
......................
All data which belong to CostCode2
......................
CostCode3
......................
All data which belong to CostCode3
......................
続き....コストコードへ* n *
ありがとう