USE [qw2021]
GO

/****** Object:  Table [dbo].[_tmpres]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[_tmpres](
	[Rang] [int] NULL,
	[name] [varchar](101) NULL,
	[Jahrgang] [varchar](50) NULL,
	[Lizenz] [varchar](50) NULL,
	[Verein] [varchar](50) NULL,
	[Kategorie_kurzname] [varchar](50) NULL,
	[Kategorie] [varchar](50) NULL,
	[Disziplin] [varchar](50) NULL,
	[F0] [varchar](50) NULL,
	[F1] [varchar](50) NULL,
	[F2] [varchar](50) NULL,
	[F3] [varchar](50) NULL,
	[F4] [varchar](50) NULL,
	[F5] [varchar](50) NULL,
	[F6] [varchar](50) NULL,
	[F7] [varchar](50) NULL,
	[F8] [varchar](50) NULL,
	[Best] [varchar](50) NULL,
	[BestPunkte] [int] NULL,
	[Land] [varchar](50) NULL,
	[hochversuch] [varchar](50) NULL,
	[hochbest] [varchar](50) NULL,
	[team] [varchar](50) NULL
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Disziplin_Mapping]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Disziplin_Mapping](
	[DisziplinMappingNr] [int] IDENTITY(1,1) NOT NULL,
	[Kategorie] [varchar](max) NULL,
	[QW] [varchar](max) NULL,
	[Rangliste] [varchar](max) NULL,
	[Resulttype] [varchar](max) NULL,
	[Leistungsrechnerformel] [varchar](max) NULL,
 CONSTRAINT [PK_Disziplin_Mapping] PRIMARY KEY CLUSTERED 
(
	[DisziplinMappingNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Res_Disziplin_Select]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Res_Disziplin_Select](
	[Res_Diszipllin_SelectNr] [int] IDENTITY(1,1) NOT NULL,
	[OrtNr] [int] NULL,
	[Kategorie] [varchar](50) NULL,
	[Disziplin] [varchar](50) NULL,
	[QW] [bit] NULL,
	[EG] [bit] NULL,
	[Bestenliste] [bit] NULL,
 CONSTRAINT [PK_Res_Disziplin_Select] PRIMARY KEY CLUSTERED 
(
	[Res_Diszipllin_SelectNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Res_Ort]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Res_Ort](
	[OrtNr] [int] IDENTITY(1,1) NOT NULL,
	[Ort] [varchar](50) NULL,
	[Sort] [int] NULL,
 CONSTRAINT [PK_Res_Ort] PRIMARY KEY CLUSTERED 
(
	[OrtNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Res_Resultat_Komplett]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Res_Resultat_Komplett](
	[EintragNr] [int] IDENTITY(1,1) NOT NULL,
	[Nachname] [varchar](50) NULL,
	[Vorname] [varchar](50) NULL,
	[Jahrgang] [varchar](50) NULL,
	[Land] [varchar](50) NULL,
	[Verein] [varchar](50) NULL,
	[Lizenz] [varchar](50) NULL,
	[Kategorie_Kurzname] [varchar](50) NULL,
	[Kategorie] [varchar](50) NULL,
	[Disziplin] [varchar](50) NULL,
	[ort1] [int] NULL,
	[ort2] [int] NULL,
	[ort3] [int] NULL,
	[ort4] [int] NULL,
	[ort5] [int] NULL,
	[ort6] [int] NULL,
	[ort7] [int] NULL,
	[ort8] [int] NULL,
	[ort9] [int] NULL,
	[ort10] [int] NULL,
	[Best] [varchar](50) NULL,
	[Rang] [int] NULL,
	[BestPunkte] [int] NULL,
	[HochVersuch] [varchar](50) NULL,
	[Hochbest] [varchar](50) NULL,
	[Team] [varchar](50) NULL,
	[SL] [int] NULL,
PRIMARY KEY CLUSTERED 
(
	[EintragNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[RES_RESULTATE]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[RES_RESULTATE](
	[EintragNr] [int] IDENTITY(1,1) NOT NULL,
	[OrtNr] [int] NULL,
	[Rang] [varchar](50) NOT NULL,
	[Nachname] [varchar](50) NULL,
	[Vorname] [varchar](50) NULL,
	[Jahrgang] [varchar](50) NULL,
	[Land] [varchar](50) NULL,
	[Verein] [varchar](50) NULL,
	[Lizenz] [varchar](50) NULL,
	[Kategorie_kurzname] [varchar](50) NULL,
	[Kategorie] [varchar](50) NULL,
	[Position] [varchar](50) NULL,
	[Bahn] [varchar](50) NULL,
	[Qualifikation] [varchar](50) NULL,
	[Serie] [varchar](50) NULL,
	[Disziplin] [varchar](50) NULL,
	[Leistung] [varchar](50) NULL,
	[Info] [varchar](50) NULL,
	[Punkte] [float] NULL,
	[Wind] [varchar](50) NULL,
	[Nicht_Beruecksichtigen] [bit] NULL,
	[Nur_Erdgas] [bit] NULL,
	[Team] [varchar](50) NULL,
 CONSTRAINT [PK_RES_RESULTATE_1] PRIMARY KEY CLUSTERED 
(
	[EintragNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Res_Resultate_neu]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Res_Resultate_neu](
	[EintragNr] [int] IDENTITY(1,1) NOT NULL,
	[OrtNr] [int] NULL,
	[Rang] [varchar](50) NOT NULL,
	[Nachname] [varchar](50) NULL,
	[Vorname] [varchar](50) NULL,
	[Jahrgang] [varchar](50) NULL,
	[Land] [varchar](50) NULL,
	[Verein] [varchar](50) NULL,
	[Lizenz] [varchar](50) NULL,
	[Kategorie_kurzname] [varchar](50) NULL,
	[Kategorie] [varchar](50) NULL,
	[Position] [varchar](50) NULL,
	[Bahn] [varchar](50) NULL,
	[Qualifikation] [varchar](50) NULL,
	[Serie] [varchar](50) NULL,
	[Disziplin] [varchar](50) NULL,
	[Leistung] [varchar](50) NULL,
	[Info] [varchar](50) NULL,
	[Punkte] [float] NULL,
	[Wind] [varchar](50) NULL,
	[Nicht_Beruecksichtigen] [bit] NULL,
	[Nur_Erdgas] [bit] NULL,
	[Team] [varchar](50) NULL,
 CONSTRAINT [PK_Res_Resultate] PRIMARY KEY CLUSTERED 
(
	[EintragNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[Res_TAF_Import]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Res_TAF_Import](
	[type] [varchar](max) NULL,
	[bib] [varchar](max) NULL,
	[code] [varchar](max) NULL,
	[firstname] [varchar](max) NULL,
	[lastname] [varchar](max) NULL,
	[yob] [varchar](max) NULL,
	[gender] [varchar](max) NULL,
	[relaynumber] [varchar](max) NULL,
	[relayname] [varchar](max) NULL,
	[nation] [varchar](max) NULL,
	[clubname] [varchar](max) NULL,
	[clubcode] [varchar](max) NULL,
	[clubnation] [varchar](max) NULL,
	[event] [varchar](max) NULL,
	[eventinfo] [varchar](max) NULL,
	[class] [varchar](max) NULL,
	[notcompletet] [varchar](max) NULL,
	[result] [varchar](max) NULL,
	[wind] [varchar](max) NULL,
	[heatrank] [varchar](max) NULL,
	[roundrank] [varchar](max) NULL,
	[heatnr] [varchar](max) NULL,
	[lane] [varchar](max) NULL,
	[SinglePoints] [varchar](max) NULL,
	[OrtNr] [varchar](max) NULL,
	[Leistung] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Table [dbo].[res_temportdaten]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[res_temportdaten](
	[EintragNr] [int] IDENTITY(1,1) NOT NULL,
	[EintragParent] [int] NULL,
	[Position] [varchar](50) NULL,
	[Bahn] [varchar](50) NULL,
	[Qualifikation] [varchar](50) NULL,
	[Serie] [varchar](50) NULL,
	[Leistung] [varchar](50) NULL,
	[Info] [varchar](50) NULL,
	[Punkte] [varchar](50) NULL,
	[Wind] [varchar](50) NULL,
	[Leistung_Aufbereitet] [varchar](50) NULL,
PRIMARY KEY CLUSTERED 
(
	[EintragNr] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

/****** Object:  Table [dbo].[WerteTabelle]    Script Date: 26.05.2021 06:54:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[WerteTabelle](
	[Disziplin] [varchar](max) NULL,
	[AWert] [float] NULL,
	[BWert] [float] NULL,
	[CWert] [float] NULL,
	[Gender] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

