Procedures

Procedure List

Name

Code

Func

sp_Add_Enzyme

sp_Add_Enzyme

No

sp_Add_Group

sp_Add_Group

No

sp_Add_Locus

sp_Add_Locus

No

sp_Add_Locus_Groups

sp_Add_Locus_Groups

No

sp_Add_MapIDP

sp_Add_MapIDP

No

sp_Add_MapIDP_Err

sp_Add_MapIDP_Err

No

sp_Add_MapIDP_Person

sp_Add_MapIDP_Person

No

sp_Add_MapIDP_Vfy

sp_Add_MapIDP_Vfy

No

sp_Add_MapRFLP

sp_Add_MapRFLP

No

sp_Add_MapRFLP_Comment

sp_Add_MapRFLP_Comment

No

sp_Add_MapRFLP_Err

sp_Add_MapRFLP_Err

No

sp_Add_MapRFLP_Person

sp_Add_MapRFLP_Person

No

sp_Add_MapSNP

sp_Add_MapSNP

No

sp_Add_MapSNP_Err

sp_Add_MapSNP_Err

No

sp_Add_MapSNP_Person

sp_Add_MapSNP_Person

No

sp_Add_MapSNP_Vfy

sp_Add_MapSNP_Vfy

No

sp_Add_MapSSR

sp_Add_MapSSR

No

sp_Add_MapSSR_Err

sp_Add_MapSSR_Err

No

sp_Add_MapSSR_Person

sp_Add_MapSSR_Person

No

sp_Add_MapSSR_Vfy

sp_Add_MapSSR_Vfy

No

sp_Add_Password

sp_Add_Password

No

sp_Add_Plate_Stocks

sp_Add_Plate_Stocks

No

sp_Add_PlateLayout

sp_Add_PlateLayout

No

sp_Add_Pop_Samples

sp_Add_Pop_Samples

No

sp_Add_Population

sp_Add_Population

No

sp_Add_Primer

sp_Add_Primer

No

sp_Add_Primer_Groups

sp_Add_Primer_Groups

No

sp_Add_Probe

sp_Add_Probe

No

sp_Add_Probe_Groups

sp_Add_Probe_Groups

No

sp_Add_Sample

sp_Add_Sample

No

sp_Add_Sample_Groups

sp_Add_Sample_Groups

No

sp_Add_SNP_Colors

sp_Add_SNP_Colors

No

sp_Add_SNP_Template

sp_Add_SNP_Template

No

sp_Add_Stock

sp_Add_Stock

No

sp_Add_Template_Values

sp_Add_Template_Values

No

sp_Add_User

sp_Add_User

No

sp_Add_Users_Priv

sp_Add_Users_Priv

No

sp_Count_AtlanticLegend

sp_Count_AtlanticLegend

No

sp_Count_Big12LegendPrimers

sp_Count_Big12LegendPrimers

No

sp_Count_CIMDE_ALL_IDP

sp_Count_CIMDE_ALL_IDP

No

sp_Count_CIMDE_ALL_RFLP

sp_Count_CIMDE_ALL_RFLP

No

sp_Count_CIMDE_ALL_SNP

sp_Count_CIMDE_ALL_SNP

No

sp_Count_CIMDE_ALL_SSR

sp_Count_CIMDE_ALL_SSR

No

sp_Count_CIMDE_Indiv_IDP

sp_Count_CIMDE_Indiv_IDP

No

sp_Count_CIMDE_Indiv_RFLP

sp_Count_CIMDE_Indiv_RFLP

No

sp_Count_CIMDE_Indiv_SNP

sp_Count_CIMDE_Indiv_SNP

No

sp_Count_CIMDE_Indiv_SSR

sp_Count_CIMDE_Indiv_SSR

No

sp_Count_ClusterTable

sp_Count_ClusterTable

No

sp_Count_DesignedPrimers

sp_Count_DesignedPrimers

No

sp_Count_Enzyme_Values

sp_Count_Enzyme_Values

No

sp_Count_Locus

sp_Count_Locus

No

sp_Count_Locus_Groups

sp_Count_Locus_Groups

No

sp_Count_Locus_MapRFLP

sp_Count_Locus_MapRFLP

No

sp_Count_Locus_Values

sp_Count_Locus_Values

No

sp_Count_MapIDP_Values

sp_Count_MapIDP_Values

No

sp_Count_MapMaker_RFLP_Values

sp_Count_MapMaker_RFLP_Values

No

sp_Count_MapMaker_SSR_Values

sp_Count_MapMaker_SSR_Values

No

sp_Count_MapRFLP_Values

sp_Count_MapRFLP_Values

No

sp_Count_MapSNP_Values

sp_Count_MapSNP_Values

No

sp_Count_MapSSR_Values

sp_Count_MapSSR_Values

No

sp_Count_NotMissing_IDPValues

sp_Count_NotMissing_IDPValues

No

sp_Count_NotMissing_SNPValues

sp_Count_NotMissing_SNPValues

No

sp_Count_NotMissing_SSRValues

sp_Count_NotMissing_SSRValues

No

sp_Count_PlateLayout_Locked

sp_Count_PlateLayout_Locked

No

sp_Count_Population_Locked

sp_Count_Population_Locked

No

sp_Count_Population_Values

sp_Count_Population_Values

No

sp_Count_Primer_Groups

sp_Count_Primer_Groups

No

sp_Count_Primer_Values

sp_Count_Primer_Values

No

sp_Count_Primer_Values_IDP

sp_Count_Primer_Values_IDP

No

sp_Count_Primer_Values_SNP

sp_Count_Primer_Values_SNP

No

sp_Count_Probe_Groups

sp_Count_Probe_Groups

No

sp_Count_Probe_Values

sp_Count_Probe_Values

No

sp_Count_ProbeLocus_Values

sp_Count_ProbeLocus_Values

No

sp_Count_Sample_Groups

sp_Count_Sample_Groups

No

sp_Count_Sample_PopValues

sp_Count_Sample_PopValues

No

sp_Count_Sample_ValuesIDP

sp_Count_Sample_ValuesIDP

No

sp_Count_Sample_ValuesRFLP

sp_Count_Sample_ValuesRFLP

No

sp_Count_Sample_ValuesSNP

sp_Count_Sample_ValuesSNP

No

sp_Count_Sample_ValuesSSR

sp_Count_Sample_ValuesSSR

No

sp_Count_SequenceCluster

sp_Count_SequenceCluster

No

sp_Count_SequencePrimers

sp_Count_SequencePrimers

No

sp_Count_SNP_Template_Records

sp_Count_SNP_Template_Records

No

sp_Count_Stock_PlateValues

sp_Count_Stock_PlateValues

No

sp_Count_UmcssrnumberPrimers

sp_Count_UmcssrnumberPrimers

No

sp_Count_User_Values

sp_Count_User_Values

No

sp_Delete_Enzyme

sp_Delete_Enzyme

No

sp_Delete_Locus

sp_Delete_Locus

No

sp_Delete_Locus_Group

sp_Delete_Locus_Group

No

sp_Delete_MapIDP_Set

sp_Delete_MapIDP_Set

No

sp_Delete_MapIDP_Vfy_Set

sp_Delete_MapIDP_Vfy_Set

No

sp_Delete_MapMaker_IDP

sp_Delete_MapMaker_IDP

No

sp_Delete_MapMaker_RFLP

sp_Delete_MapMaker_RFLP

No

sp_Delete_MapMaker_SNP

sp_Delete_MapMaker_SNP

No

sp_Delete_MapMaker_SSR

sp_Delete_MapMaker_SSR

No

sp_Delete_MapRFLP_Comment

sp_Delete_MapRFLP_Comment

No

sp_Delete_MapRFLP_Person

sp_Delete_MapRFLP_Person

No

sp_Delete_MapRFLP_Set

sp_Delete_MapRFLP_Set

No

sp_Delete_MapSNP_Set

sp_Delete_MapSNP_Set

No

sp_Delete_MapSNP_Vfy_Set

sp_Delete_MapSNP_Vfy_Set

No

sp_Delete_MapSSR_Set

sp_Delete_MapSSR_Set

No

sp_Delete_MapSSR_Vfy_Set

sp_Delete_MapSSR_Vfy_Set

No

sp_Delete_Plate_Stocks

sp_Delete_Plate_Stocks

No

sp_Delete_PlateLayout

sp_Delete_PlateLayout

No

sp_Delete_Pop_Samples

sp_Delete_Pop_Samples

No

sp_Delete_Populations

sp_Delete_Populations

No

sp_Delete_Primer

sp_Delete_Primer

No

sp_Delete_Primer_Group

sp_Delete_Primer_Group

No

sp_Delete_Privileges

sp_Delete_Privileges

No

sp_Delete_Probe

sp_Delete_Probe

No

sp_Delete_Probe_Group

sp_Delete_Probe_Group

No

sp_Delete_Sample

sp_Delete_Sample

No

sp_Delete_Sample_Group

sp_Delete_Sample_Group

No

sp_Delete_SNP_Colors

sp_Delete_SNP_Colors

No

sp_Delete_SNP_Template

sp_Delete_SNP_Template

No

sp_Delete_SSRUMC

sp_Delete_SSRUMC

No

sp_Delete_Stock

sp_Delete_Stock

No

sp_Delete_Template_Group

sp_Delete_Template_Group

No

sp_Delete_User

sp_Delete_User

No

sp_Dump_Info_ToMaizeDB

sp_Dump_Info_ToMaizeDB

No

sp_Excel_Report

sp_Excel_Report

No

sp_Exptort_Info_ToMaizeDB

sp_Exptort_Info_ToMaizeDB

No

sp_Get_All_Enzymes

sp_Get_All_Enzymes

No

sp_Get_All_Groups

sp_Get_All_Groups

No

sp_Get_All_Groups2

sp_Get_All_Groups2

No

sp_Get_All_Individuals

sp_Get_All_Individuals

No

sp_Get_All_Individuals_AFLP

sp_Get_All_Individuals_AFLP

No

sp_Get_All_Individuals_IDP

sp_Get_All_Individuals_IDP

No

sp_Get_All_Individuals_RFLP

sp_Get_All_Individuals_RFLP

No

sp_Get_All_Individuals_SNP

sp_Get_All_Individuals_SNP

No

sp_Get_All_Individuals_SSR

sp_Get_All_Individuals_SSR

No

sp_Get_All_Locus

sp_Get_All_Locus

No

sp_Get_All_Locus_to_Update

sp_Get_All_Locus_to_Update

No

sp_Get_All_MapIDP

sp_Get_All_MapIDP

No

sp_Get_All_MapRFLP

sp_Get_All_MapRFLP

No

sp_Get_All_MapSNP

sp_Get_All_MapSNP

No

sp_Get_All_MapSSR

sp_Get_All_MapSSR

No

sp_Get_All_Objects

sp_Get_All_Objects

No

sp_Get_All_Plates

sp_Get_All_Plates

No

sp_Get_All_Populations

sp_Get_All_Populations

No

sp_Get_All_Primers

sp_Get_All_Primers

No

sp_Get_All_Probes

sp_Get_All_Probes

No

sp_Get_All_Samples

sp_Get_All_Samples

No

sp_Get_All_Users

sp_Get_All_Users

No

sp_Get_Both_MapIDP

sp_Get_Both_MapIDP

No

sp_Get_Both_MapSNP

sp_Get_Both_MapSNP

No

sp_Get_Both_MapSSR

sp_Get_Both_MapSSR

No

sp_Get_Enzyme_Rec

sp_Get_Enzyme_Rec

No

sp_Get_GelTier_MapIDP

sp_Get_GelTier_MapIDP

No

sp_Get_GelTier_MapRFLP

sp_Get_GelTier_MapRFLP

No

sp_Get_GelTier_MapSNP

sp_Get_GelTier_MapSNP

No

sp_Get_GelTier_MapSSR

sp_Get_GelTier_MapSSR

No

sp_Get_GelTier_Selected

sp_Get_GelTier_Selected

No

sp_Get_GelTier_Selected_IDP

sp_Get_GelTier_Selected_IDP

No

sp_Get_GelTier_Selected_SNP

sp_Get_GelTier_Selected_SNP

No

sp_Get_IDP_Records

sp_Get_IDP_Records

No

sp_Get_Individuals

sp_Get_Individuals

No

sp_Get_Individuals_AFLP

sp_Get_Individuals_AFLP

No

sp_Get_Individuals_IDP

sp_Get_Individuals_IDP

No

sp_Get_Individuals_RFLP

sp_Get_Individuals_RFLP

No

sp_Get_Individuals_SNP

sp_Get_Individuals_SNP

No

sp_Get_Individuals_SSR

sp_Get_Individuals_SSR

No

sp_Get_Locus_Groups

sp_Get_Locus_Groups

No

sp_Get_Locus_MapMaker

sp_Get_Locus_MapMaker

No

sp_Get_Locus_ProbeEnzyme_Open

sp_Get_Locus_ProbeEnzyme_Open

No

sp_Get_Locus_Rec

sp_Get_Locus_Rec

No

sp_Get_LocusProbeEnzyme_Verify

sp_Get_LocusProbeEnzyme_Verify

No

sp_Get_MapIDP_Rec

sp_Get_MapIDP_Rec

No

sp_Get_MapIDP_Sample_Values

sp_Get_MapIDP_Sample_Values

No

sp_Get_MapIDP_Value

sp_Get_MapIDP_Value

No

sp_Get_MapIDP_Values

sp_Get_MapIDP_Values

No

sp_Get_MapIDP_Vfy_Values

sp_Get_MapIDP_Vfy_Values

No

sp_Get_MapMaker_IDP

sp_Get_MapMaker_IDP

No

sp_Get_MapMaker_RFLP

sp_Get_MapMaker_RFLP

No

sp_Get_MapMaker_SNP

sp_Get_MapMaker_SNP

No

sp_Get_MapMaker_SSR

sp_Get_MapMaker_SSR

No

sp_Get_MapRFLP

sp_Get_MapRFLP

No

sp_Get_MapRFLP_Comment

sp_Get_MapRFLP_Comment

No

sp_Get_MapRFLP_Locus

sp_Get_MapRFLP_Locus

No

sp_Get_MapRFLP_Person

sp_Get_MapRFLP_Person

No

sp_Get_MapRFLP_Probes

sp_Get_MapRFLP_Probes

No

sp_Get_MapRFLP_Rec

sp_Get_MapRFLP_Rec

No

sp_Get_MapRFLP_Values

sp_Get_MapRFLP_Values

No

sp_Get_MapSNP_Rec

sp_Get_MapSNP_Rec

No

sp_Get_MapSNP_Sample_Values

sp_Get_MapSNP_Sample_Values

No

sp_Get_MapSNP_Value

sp_Get_MapSNP_Value

No

sp_Get_MapSNP_Values

sp_Get_MapSNP_Values

No

sp_Get_MapSNP_Vfy_Values

sp_Get_MapSNP_Vfy_Values

No

sp_Get_MapSSR

sp_Get_MapSSR

No

sp_Get_MapSSR_Rec

sp_Get_MapSSR_Rec

No

sp_Get_MapSSR_Sample_Values

sp_Get_MapSSR_Sample_Values

No

sp_Get_MapSSR_Value

sp_Get_MapSSR_Value

No

sp_Get_MapSSR_Values

sp_Get_MapSSR_Values

No

sp_Get_MapSSR_ValuesT

sp_Get_MapSSR_ValuesT

No

sp_Get_MapSSR_Vfy_Values

sp_Get_MapSSR_Vfy_Values

No

sp_Get_New_Primers

sp_Get_New_Primers

No

sp_Get_Plates_Stocks

sp_Get_Plates_Stocks

No

sp_Get_Populations

sp_Get_Populations

No

sp_Get_Primer_Groups

sp_Get_Primer_Groups

No

sp_Get_Primer_Person

sp_Get_Primer_Person

No

sp_Get_Primer_Rec

sp_Get_Primer_Rec

No

sp_Get_Primer_Unregistered

sp_Get_Primer_Unregistered

No

sp_Get_Primers_MapMaker

sp_Get_Primers_MapMaker

No

sp_Get_Primers_to_Open

sp_Get_Primers_to_Open

No

sp_Get_Primers_to_Verify

sp_Get_Primers_to_Verify

No

sp_Get_PrimersSamples_MapIDP

sp_Get_PrimersSamples_MapIDP

No

sp_Get_PrimersSamples_MapRFLP

sp_Get_PrimersSamples_MapRFLP

No

sp_Get_PrimersSamples_MapSNP

sp_Get_PrimersSamples_MapSNP

No

sp_Get_PrimersSamples_MapSSR

sp_Get_PrimersSamples_MapSSR

No

sp_Get_Probe_Groups

sp_Get_Probe_Groups

No

sp_Get_Probe_MapRFLP

sp_Get_Probe_MapRFLP

No

sp_Get_Probe_Rec

sp_Get_Probe_Rec

No

sp_Get_ProbeLocus_MapRFLP

sp_Get_ProbeLocus_MapRFLP

No

sp_Get_ProbeLocus_MapRFLP_Err

sp_Get_ProbeLocus_MapRFLP_Err

No

sp_Get_ProbeLocus_MapRFLPT

sp_Get_ProbeLocus_MapRFLPT

No

sp_Get_Qry_Groups

sp_Get_Qry_Groups

No

sp_Get_Remote_Users

sp_Get_Remote_Users

No

sp_Get_RFLP_Markers

sp_Get_RFLP_Markers

No

sp_Get_RFLP_Records

sp_Get_RFLP_Records

No

sp_Get_Sample_Groups

sp_Get_Sample_Groups

No

sp_Get_Sample_Groups2

sp_Get_Sample_Groups2

No

sp_Get_Sample_Populations

sp_Get_Sample_Populations

No

sp_Get_samples_MapIDP

sp_Get_samples_MapIDP

No

sp_Get_samples_MapRFLP

sp_Get_samples_MapRFLP

No

sp_Get_samples_MapSNP

sp_Get_samples_MapSNP

No

sp_Get_samples_MapSSR

sp_Get_samples_MapSSR

No

sp_Get_Samples_Not_Populated

sp_Get_Samples_Not_Populated

No

sp_Get_SamplesPrimers_IDP

sp_Get_SamplesPrimers_IDP

No

sp_Get_SamplesPrimers_MapIDP

sp_Get_SamplesPrimers_MapIDP

No

sp_Get_SamplesPrimers_MapRFLP

sp_Get_SamplesPrimers_MapRFLP

No

sp_Get_SamplesPrimers_MapSNP

sp_Get_SamplesPrimers_MapSNP

No

sp_Get_SamplesPrimers_MapSSR

sp_Get_SamplesPrimers_MapSSR

No

sp_Get_SamplesPrimers_RFLP

sp_Get_SamplesPrimers_RFLP

No

sp_Get_SamplesPrimers_SNP

sp_Get_SamplesPrimers_SNP

No

sp_Get_SamplesPrimers_SSR

sp_Get_SamplesPrimers_SSR

No

sp_Get_selected_MapIDP

sp_Get_selected_MapIDP

No

sp_Get_selected_MapSNP

sp_Get_selected_MapSNP

No

sp_Get_selected_MapSSR

sp_Get_selected_MapSSR

No

sp_Get_SNP_ColorP1

sp_Get_SNP_ColorP1

No

sp_Get_SNP_ColorP2

sp_Get_SNP_ColorP2

No

sp_Get_SNP_Colors

sp_Get_SNP_Colors

No

sp_Get_SNP_Parents

sp_Get_SNP_Parents

No

sp_Get_SNP_Records

sp_Get_SNP_Records

No

sp_Get_SSR_Records

sp_Get_SSR_Records

No

sp_Get_Stocks

sp_Get_Stocks

No

sp_Get_Template

sp_Get_Template

No

sp_Get_Template_MaxID

sp_Get_Template_MaxID

No

sp_Get_Template_Values

sp_Get_Template_Values

No

sp_Get_UMCMAX

sp_Get_UMCMAX

No

sp_Get_User_Rec

sp_Get_User_Rec

No

sp_Get_Users_Priv

sp_Get_Users_Priv

No

sp_logdump

sp_logdump

No

sp_Register_Primer

sp_Register_Primer

No

sp_Update_ATLegend

sp_Update_ATLegend

No

sp_Update_Big12LegendPrimer

sp_Update_Big12LegendPrimer

No

sp_Update_Color_Order

sp_Update_Color_Order

No

sp_Update_DesignedPrimers

sp_Update_DesignedPrimers

No

sp_Update_Enzyme

sp_Update_Enzyme

No

sp_Update_Group

sp_Update_Group

No

sp_Update_Locus

sp_Update_Locus

No

sp_Update_Locus_Global

sp_Update_Locus_Global

No

sp_Update_Locus_Name

sp_Update_Locus_Name

No

sp_Update_MapIDP

sp_Update_MapIDP

No

sp_Update_MapRFLP

sp_Update_MapRFLP

No

sp_Update_MapSNP

sp_Update_MapSNP

No

sp_Update_MapSNP_Value

sp_Update_MapSNP_Value

No

sp_Update_MapSSR

sp_Update_MapSSR

No

sp_Update_PlateLayout

sp_Update_PlateLayout

No

sp_Update_Population

sp_Update_Population

No

sp_Update_Primer_Comment

sp_Update_Primer_Comment

No

sp_Update_Primer_CommReg

sp_Update_Primer_CommReg

No

sp_Update_Primer_Name

sp_Update_Primer_Name

No

sp_Update_Primers

sp_Update_Primers

No

sp_Update_Primers_Info

sp_Update_Primers_Info

No

sp_Update_Probe

sp_Update_Probe

No

sp_Update_Sample_Populated

sp_Update_Sample_Populated

No

sp_Update_Samples

sp_Update_Samples

No

sp_Update_SequencePrimers

sp_Update_SequencePrimers

No

sp_Update_SNP_Color1

sp_Update_SNP_Color1

No

sp_Update_SNP_Color2

sp_Update_SNP_Color2

No

sp_Update_SNP_Colors

sp_Update_SNP_Colors

No

sp_Update_SNP_Template

sp_Update_SNP_Template

No

sp_Update_Stocks

sp_Update_Stocks

No

sp_Update_UMCMAX

sp_Update_UMCMAX

No

sp_Update_UmcssrNumberPrimers

sp_Update_UmcssrNumberPrimers

No

sp_Update_User

sp_Update_User

No

sp_Write_MapMaker_IDP

sp_Write_MapMaker_IDP

No

sp_Write_MapMaker_RFLP

sp_Write_MapMaker_RFLP

No

sp_Write_MapMaker_SNP

sp_Write_MapMaker_SNP

No

sp_Write_MapMaker_SSR

sp_Write_MapMaker_SSR

No

sp_Write_SamplesPrimers_IDP

sp_Write_SamplesPrimers_IDP

No

sp_Write_SamplesPrimers_RFLP

sp_Write_SamplesPrimers_RFLP

No

sp_Write_SamplesPrimers_SNP

sp_Write_SamplesPrimers_SNP

No

sp_Write_SamplesPrimers_SSR

sp_Write_SamplesPrimers_SSR

No

sp_Write_To_SSRUMC

sp_Write_To_SSRUMC

No

Procedure sp_Add_Enzyme

Name: sp_Add_Enzyme
Code: sp_Add_Enzyme
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Enzyme;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_No integer = NULL ,
@Enzyme_Name nvarchar(20) ,
@Enzyme_Comment nvarchar(100) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)


As
Begin Transaction

select @Enzyme_No = Max(Enzymes.Enzyme_No)+1 from Enzymes
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()

insert Enzymes
values(@Enzyme_No ,
@Enzyme_Name ,
@Enzyme_Comment ,
@Date_Created ,
@Date_Updated ,
@Person)


Commit Transaction
go

Procedure sp_Add_Group

Name: sp_Add_Group
Code: sp_Add_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer = NULL ,
@Group_Name nvarchar(20) ,
@Group_Primer nvarchar(20)


As
Begin Transaction

select @Group_No = Max(Groups.Group_No)+1 from Groups


insert Groups
values(@Group_No ,
@Group_Name ,
@Group_Primer)


Commit Transaction
go

Procedure sp_Add_Locus

Name: sp_Add_Locus
Code: sp_Add_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Locus;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer = NULL ,
@Probe_No integer ,
@Enzyme_No integer ,
@Locus_Name nvarchar(20) ,
@Locus_Comment nvarchar(100) ,
@Map_Marker_No integer ,
@Chromosome integer ,
@Bin float ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)


As
Begin Transaction

select @Locus_No = Max(Locus.Locus_No)+1 from Locus
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()

insert Locus
values(@Locus_No ,
@Probe_No ,
@Locus_Name ,
@Locus_Comment ,
@Map_Marker_No,
@Date_Created ,
@Date_Updated ,
@Person ,
@Enzyme_No ,
@Chromosome ,
@Bin)


Commit Transaction
go

Procedure sp_Add_Locus_Groups

Name: sp_Add_Locus_Groups
Code: sp_Add_Locus_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Locus_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Locus_No integer


As
Begin Transaction


insert Locus_Groups
values(@Group_No ,
@Locus_No )


Commit Transaction
go

Procedure sp_Add_MapIDP

Name: sp_Add_MapIDP
Code: sp_Add_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int


As
Begin Transaction
select @MapIDP_No = Max(MapIDP.MapIDP_No)+1 from MapIDP
insert MapIDP
values(@MapIDP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_MapIDP_Err

Name: sp_Add_MapIDP_Err
Code: sp_Add_MapIDP_Err
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapIDP_Err;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int ,
@Person varchar(20)

As
Begin Transaction
select @MapIDP_No = Max(MapIDP_Err.MapIDP_No)+1 from MapIDP_Err
insert MapIDP_Err
values(@MapIDP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapIDP_Person

Name: sp_Add_MapIDP_Person
Code: sp_Add_MapIDP_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapIDP_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_P_No int = NULL,
@Marker_No int ,
@Person varchar(20)

As
Begin Transaction
select @MapIDP_P_No = Max(MapIDP_Person.MapIDP_P_No)+1 from MapIDP_Person
insert MapIDP_Person
values(@MapIDP_P_No,
@Marker_No ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapIDP_Vfy

Name: sp_Add_MapIDP_Vfy
Code: sp_Add_MapIDP_Vfy
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapIDP_Vfy;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int

As
Begin Transaction
select @MapIDP_No = Max(MapIDP_Vfy.MapIDP_No)+1 from MapIDP_Vfy
insert MapIDP_Vfy
values(@MapIDP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_MapRFLP

Name: sp_Add_MapRFLP
Code: sp_Add_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapRFLP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Enzyme_No int ,
@Locus_No int ,
@Probe_No int ,
@Value char(1) ,
@Sample_no int

As
Begin Transaction
select @MapRFLP_No = Max(MapRFLP.MapRFLP_No)+1 from MapRFLP
insert MapRFLP
values(@MapRFLP_No,
@gel ,
@tier ,
@lane ,
@Enzyme_No ,
@Locus_No ,
@Probe_No ,
@Value ,
@Sample_no)


Commit Transaction
go

Procedure sp_Add_MapRFLP_Comment

Name: sp_Add_MapRFLP_Comment
Code: sp_Add_MapRFLP_Comment
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapRFLP_Comment;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapRFLP_C_No int = NULL,
@Probe_No int ,
@Locus_No int ,
@Enzyme_No int ,
@Comment varchar(255)

As
Begin Transaction
select @MapRFLP_C_No = Max(MapRFLP_Comments.MapRFLP_C_No)+1 from MapRFLP_Comments
insert MapRFLP_Comments
values(@MapRFLP_C_No,
@Probe_No ,
@Locus_No ,
@Enzyme_No ,
@Comment)


Commit Transaction
go

Procedure sp_Add_MapRFLP_Err

Name: sp_Add_MapRFLP_Err
Code: sp_Add_MapRFLP_Err
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapRFLP_Err;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapRFLP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Enzyme_No int ,
@Locus_No int ,
@Probe_No int ,
@Value char(1) ,
@Sample_no int ,
@Person varchar(20)

As
Begin Transaction
select @MapRFLP_No = Max(MapRFLP_Err.MapRFLP_No)+1 from MapRFLP_Err
insert MapRFLP_Err
values(@MapRFLP_No,
@gel ,
@tier ,
@lane ,
@Enzyme_No ,
@Locus_No ,
@Probe_No ,
@Value ,
@Sample_no ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapRFLP_Person

Name: sp_Add_MapRFLP_Person
Code: sp_Add_MapRFLP_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapRFLP_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapRFLP_P_No int = NULL,
@Probe_No int ,
@Locus_No int ,
@Enzyme_No int ,
@Person varchar(20)

As
Begin Transaction
select @MapRFLP_P_No = Max(MapRFLP_Person.MapRFLP_P_No)+1 from MapRFLP_Person
insert MapRFLP_Person
values(@MapRFLP_P_No,
@Probe_No ,
@Locus_No ,
@Enzyme_No ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapSNP

Name: sp_Add_MapSNP
Code: sp_Add_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int

As
Begin Transaction
select @MapSNP_No = Max(MapSNP.MapSNP_No)+1 from MapSNP
insert MapSNP
values(@MapSNP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_MapSNP_Err

Name: sp_Add_MapSNP_Err
Code: sp_Add_MapSNP_Err
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSNP_Err;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int ,
@Person varchar(20)

As
Begin Transaction
select @MapSNP_No = Max(MapSNP_Err.MapSNP_No)+1 from MapSNP_Err
insert MapSNP_Err
values(@MapSNP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapSNP_Person

Name: sp_Add_MapSNP_Person
Code: sp_Add_MapSNP_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSNP_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_P_No int = NULL,
@Marker_No int ,
@Person varchar(20)

As
Begin Transaction
select @MapSNP_P_No = Max(MapSNP_Person.MapSNP_P_No)+1 from MapSNP_Person
insert MapSNP_Person
values(@MapSNP_P_No,
@Marker_No ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapSNP_Vfy

Name: sp_Add_MapSNP_Vfy
Code: sp_Add_MapSNP_Vfy
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSNP_Vfy;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int

As
Begin Transaction
select @MapSNP_No = Max(MapSNP_Vfy.MapSNP_No)+1 from MapSNP_Vfy
insert MapSNP_Vfy
values(@MapSNP_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_MapSSR

Name: sp_Add_MapSSR
Code: sp_Add_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int

As
Begin Transaction
select @MapSSR_No = Max(MapSSR.MapSSR_No)+1 from MapSSR
insert MapSSR
values(@MapSSR_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_MapSSR_Err

Name: sp_Add_MapSSR_Err
Code: sp_Add_MapSSR_Err
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSSR_Err;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int ,
@Person varchar(20)

As
Begin Transaction
select @MapSSR_No = Max(MapSSR_Err.MapSSR_No)+1 from MapSSR_Err
insert MapSSR_Err
values(@MapSSR_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapSSR_Person

Name: sp_Add_MapSSR_Person
Code: sp_Add_MapSSR_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSSR_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_P_No int = NULL,
@Marker_No int ,
@Person varchar(20)

As
Begin Transaction
select @MapSSR_P_No = Max(MapSSR_Person.MapSSR_P_No)+1 from MapSSR_Person
insert MapSSR_Person
values(@MapSSR_P_No,
@Marker_No ,
@Person)


Commit Transaction
go

Procedure sp_Add_MapSSR_Vfy

Name: sp_Add_MapSSR_Vfy
Code: sp_Add_MapSSR_Vfy
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_MapSSR_Vfy;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample_no int

As
Begin Transaction
select @MapSSR_No = Max(MapSSR_Vfy.MapSSR_No)+1 from MapSSR_Vfy
insert MapSSR_Vfy
values(@MapSSR_No,
@sample_no ,
@gel ,
@tier ,
@lane ,
@Marker_No ,
@Value)


Commit Transaction
go

Procedure sp_Add_Password

Name: sp_Add_Password
Code: sp_Add_Password
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Password;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer = NULL ,
@Password nvarchar(15) ,
@ControlsPassed char(1)

As
Begin Transaction

insert UsrPasswd values(@User_ID, @Password, @ControlsPassed)

Commit Transaction
go

Procedure sp_Add_Plate_Stocks

Name: sp_Add_Plate_Stocks
Code: sp_Add_Plate_Stocks
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Plate_Stocks

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer ,
@Stock_ID integer ,
@Position integer

As
Begin Transaction


insert PlateStocks
values(@PlateLayoutID ,
@Stock_ID ,
@Position )


Commit Transaction
go

Procedure sp_Add_PlateLayout

Name: sp_Add_PlateLayout
Code: sp_Add_PlateLayout
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_PlateLayout

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer = NULL ,
@PlateType nvarchar(3) ,
@TemplateID nvarchar(10) ,
@PositionNos integer ,
@Orientation nvarchar(60) ,
@TemplateName nvarchar(50) ,
@Locked char(1) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL


As
Begin Transaction

select @PlateLayoutID = Max(PlateLayoutID)+1 from PlateLayout
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()

insert PlateLayout
values(@PlateLayoutID ,
@PlateType ,
@TemplateID ,
@PositionNos ,
@Orientation ,
@TemplateName ,
@Locked ,
@Person ,
@Date_Created ,
@Date_Updated )

Commit Transaction
go

Procedure sp_Add_Pop_Samples

Name: sp_Add_Pop_Samples
Code: sp_Add_Pop_Samples
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Pop_Samples;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer ,
@Sample_No integer


As
Begin Transaction


insert Pop_Samples
values(@Pop_No ,
@Sample_No )


Commit Transaction
go

Procedure sp_Add_Population

Name: sp_Add_Population
Code: sp_Add_Population
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Population;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer = NULL ,
@Pop_Name nvarchar(20) ,
@Pop_Comment nvarchar(100) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20) ,
@Locked char(1) = NULL

As
Begin Transaction

select @Pop_No = Max(Populations.Pop_No)+1 from Populations
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()
select @Locked = 'N'

insert Populations
values(@Pop_No ,
@Pop_Name ,
@Pop_Comment ,
@Date_Created ,
@Date_Updated ,
@Person ,
@Locked)


Commit Transaction
go

Procedure sp_Add_Primer

Name: sp_Add_Primer
Code: sp_Add_Primer
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Primer;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer = NULL ,
@Primer_Name nvarchar(20) ,
@Primer_Comment nvarchar(100) ,
@Bank_Acc_No nvarchar(20) ,
@Map_Maker_No integer ,
@Chromosome integer ,
@Bin float ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Registered char(1) = NULL,
@Scored integer = NULL,
@Primer_Type char(1)


As
Begin Transaction

select @Primer_No = Max(Primers.Marker_No)+1 from Primers
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()
select @Registered = "N"
select @Scored = 0

insert Primers
values(@Primer_No ,
@Primer_Name ,
@Primer_Comment ,
@Person,
@Date_Created ,
@Date_Updated ,
@Registered ,
@Bank_Acc_No ,
@Map_Maker_No ,
@Chromosome ,
@Bin ,
@Scored ,
@Primer_Type)


Commit Transaction
go

Procedure sp_Add_Primer_Groups

Name: sp_Add_Primer_Groups
Code: sp_Add_Primer_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Primer_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Primer_No integer


As
Begin Transaction


insert Primer_Groups
values(@Group_No ,
@Primer_No )


Commit Transaction
go

Procedure sp_Add_Probe

Name: sp_Add_Probe
Code: sp_Add_Probe
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Probe;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer = NULL ,
@Probe_Name nvarchar(20) ,
@Probe_Comment nvarchar(100) ,
@Bank_Acc_No nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)

As
Begin Transaction

select @Probe_No = Max(Probes.Probe_No)+1 from Probes
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()


insert Probes
values(@Probe_No ,
@Probe_Name ,
@Probe_Comment ,
@Bank_Acc_No,
@Date_Created ,
@Date_Updated ,
@Person)


Commit Transaction
go

Procedure sp_Add_Probe_Groups

Name: sp_Add_Probe_Groups
Code: sp_Add_Probe_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Probe_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Probe_No integer


As
Begin Transaction


insert Probe_Groups
values(@Group_No ,
@Probe_No )


Commit Transaction
go

Procedure sp_Add_Sample

Name: sp_Add_Sample
Code: sp_Add_Sample
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Sample;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer = NULL ,
@Sample_Name nvarchar(10) ,
@Sample_Comments nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Populated char(1) = NULL


As
Begin Transaction

select @Sample_No = Max(Samples.Sample_No)+1 from Samples
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()
select @Populated = 'N'

insert Samples
values(@Sample_No ,
@Sample_Name ,
@Sample_Comments ,
@Person,
@Date_Created ,
@Date_Updated ,
@Populated )


Commit Transaction
go

Procedure sp_Add_Sample_Groups

Name: sp_Add_Sample_Groups
Code: sp_Add_Sample_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Sample_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Sample_No integer


As
Begin Transaction


insert Sample_Groups
values(@Group_No ,
@Sample_No )


Commit Transaction
go

Procedure sp_Add_SNP_Colors

Name: sp_Add_SNP_Colors
Code: sp_Add_SNP_Colors
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_SNP_Colors

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer = NULL ,
@SNP_Color nvarchar(10) ,
@SNP_Place integer




As
Begin Transaction

select @SNP_TemplateID = Max(SNP_Template.SNP_TemplateID) from SNP_Template

insert SNP_Colors
values(@SNP_TemplateID ,
@SNP_Color ,
@SNP_Place)


Commit Transaction
go

Procedure sp_Add_SNP_Template

Name: sp_Add_SNP_Template
Code: sp_Add_SNP_Template
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_SNP_Template

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer = NULL ,
@SNP_Name nvarchar(20) ,
@SNP_ColorP1 nvarchar(10) ,
@SNP_bPairP1 integer ,
@SNP_ColorP2 nvarchar(10) ,
@SNP_bPairP2 integer ,
@SNP_JoinP1 nvarchar(10) ,
@SNP_JoinP2 nvarchar(10) ,
@SNP_Comment nvarchar(40)




As
Begin Transaction

select @SNP_TemplateID = Max(SNP_Template.SNP_TemplateID)+1 from SNP_Template

insert SNP_Template
values(@SNP_TemplateID ,
@SNP_Name ,
@SNP_ColorP1 ,
@SNP_bPairP1 ,
@SNP_ColorP2 ,
@SNP_bPairP2 ,
@SNP_JoinP1 ,
@SNP_JoinP2 ,
NULL ,
NULL ,
@SNP_Comment)


Commit Transaction
go

Procedure sp_Add_Stock

Name: sp_Add_Stock
Code: sp_Add_Stock
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Stock

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Stock_ID integer = NULL ,
@Stock_Name nvarchar(10) ,
@Stock_Comments nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL


As
Begin Transaction

select @Stock_ID = Max(Stocks.Stock_ID)+1 from Stocks
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()

insert Stocks
values(@Stock_ID ,
@Stock_Name ,
@Stock_Comments ,
@Person,
@Date_Created ,
@Date_Updated )


Commit Transaction
go

Procedure sp_Add_Template_Values

Name: sp_Add_Template_Values
Code: sp_Add_Template_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Template_Values

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Template_No integer ,
@Sample_No integer ,
@Gel char(1) ,
@Tier integer ,
@Lane integer ,
@Group_No integer


As
Begin Transaction


insert Templates
values(@Template_No,
@Sample_No,
@Gel,
@Tier,
@Lane,
@Group_No )


Commit Transaction
go

Procedure sp_Add_User

Name: sp_Add_User
Code: sp_Add_User
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_User;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer = NULL ,
@User_Name nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20) ,
@First_Name nvarchar(30) ,
@Last_Name nvarchar(30) ,
@Institution nvarchar(60) ,
@Email nvarchar(60) ,
@Street nvarchar(100) ,
@City nvarchar(60) ,

@State nvarchar(2) ,
@Zip nvarchar(12) ,
@Country nvarchar(30) ,
@Phone nvarchar(30) ,
@Fax nvarchar(30) ,
@User_Type char

As
Begin Transaction

select @User_ID = Max(Users.User_ID)+1 from Users
select @Date_Created = GETDATE()
select @Date_Updated = GETDATE()

insert Users
values(@User_ID ,
@User_Name ,
@Date_Created ,
@Date_Updated ,
@Person ,
      @First_Name ,
      @Last_Name ,
      @Institution ,
      @Email ,
      @Street ,
      @City ,
      @State ,
      @Zip ,
      @Country ,
      @Phone ,
      @Fax ,
@User_Type)


Commit Transaction
go

Procedure sp_Add_Users_Priv

Name: sp_Add_Users_Priv
Code: sp_Add_Users_Priv
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Add_Users_Priv;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer ,
@Object_ID integer


As
Begin Transaction


insert Permissions
values(@User_ID ,
@Object_ID)


Commit Transaction
go

Procedure sp_Count_AtlanticLegend

Name: sp_Count_AtlanticLegend
Code: sp_Count_AtlanticLegend
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_AtlanticLegend

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from ATLegend

END
go

Procedure sp_Count_Big12LegendPrimers

Name: sp_Count_Big12LegendPrimers
Code: sp_Count_Big12LegendPrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Big12LegendPrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from newTable
where PrimerDesign <> 0 and Screening <> 0

END
go

Procedure sp_Count_CIMDE_ALL_IDP

Name: sp_Count_CIMDE_ALL_IDP
Code: sp_Count_CIMDE_ALL_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_ALL_IDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

Begin

select count(*) from Individuals
where Marker_Type = "I"

end
go

Procedure sp_Count_CIMDE_ALL_RFLP

Name: sp_Count_CIMDE_ALL_RFLP
Code: sp_Count_CIMDE_ALL_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_ALL_RFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

Begin

select count(*) from Individuals
where Marker_Type = "R"

end
go

Procedure sp_Count_CIMDE_ALL_SNP

Name: sp_Count_CIMDE_ALL_SNP
Code: sp_Count_CIMDE_ALL_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_ALL_SNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

Begin

select count(*) from Individuals
where Marker_Type = "N"

end
go

Procedure sp_Count_CIMDE_ALL_SSR

Name: sp_Count_CIMDE_ALL_SSR
Code: sp_Count_CIMDE_ALL_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_ALL_SSR

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

Begin

select count(*) from Individuals
where Marker_Type = "S"

end
go

Procedure sp_Count_CIMDE_Indiv_IDP

Name: sp_Count_CIMDE_Indiv_IDP
Code: sp_Count_CIMDE_Indiv_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_Indiv_IDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

Begin

select count(*) from Individuals
where Individuals.User_ID = @User_ID and Marker_Type = "I"

end
go

Procedure sp_Count_CIMDE_Indiv_RFLP

Name: sp_Count_CIMDE_Indiv_RFLP
Code: sp_Count_CIMDE_Indiv_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_Indiv_RFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

Begin

select count(*) from Individuals
where Individuals.User_ID = @User_ID and Marker_Type = "R"

end
go

Procedure sp_Count_CIMDE_Indiv_SNP

Name: sp_Count_CIMDE_Indiv_SNP
Code: sp_Count_CIMDE_Indiv_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_Indiv_SNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

Begin

select count(*) from Individuals
where Individuals.User_ID = @User_ID and Marker_Type = "N"

end
go

Procedure sp_Count_CIMDE_Indiv_SSR

Name: sp_Count_CIMDE_Indiv_SSR
Code: sp_Count_CIMDE_Indiv_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_CIMDE_Indiv_SSR

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

Begin

select count(*) from Individuals
where Individuals.User_ID = @User_ID and Marker_Type = "S"

end
go

Procedure sp_Count_ClusterTable

Name: sp_Count_ClusterTable
Code: sp_Count_ClusterTable
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_ClusterTable

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from ClusterTable

END
go

Procedure sp_Count_DesignedPrimers

Name: sp_Count_DesignedPrimers
Code: sp_Count_DesignedPrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_DesignedPrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from newTable
where PrimerDesign <> 0

END
go

Procedure sp_Count_Enzyme_Values

Name: sp_Count_Enzyme_Values
Code: sp_Count_Enzyme_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Enzyme_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_No integer

AS

Begin

select count(*) from MapRFLP
where MapRFLP.Enzyme_No = @Enzyme_No

end
go

Procedure sp_Count_Locus

Name: sp_Count_Locus
Code: sp_Count_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Locus

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from Locus

END
go

Procedure sp_Count_Locus_Groups

Name: sp_Count_Locus_Groups
Code: sp_Count_Locus_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Locus_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

Begin

select count(*) from Locus_Groups
where Locus_Groups.Group_No = @Group_No

END
go

Procedure sp_Count_Locus_MapRFLP

Name: sp_Count_Locus_MapRFLP
Code: sp_Count_Locus_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Locus_MapRFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_Name char(20)

AS

BEGIN
select count(*) from MapMaker_RFLP
where Locus_Name = @Locus_Name

END
go

Procedure sp_Count_Locus_Values

Name: sp_Count_Locus_Values
Code: sp_Count_Locus_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Locus_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer

AS

Begin

select count(*) from MapRFLP
where MapRFLP.Locus_No = @Locus_No

end
go

Procedure sp_Count_MapIDP_Values

Name: sp_Count_MapIDP_Values
Code: sp_Count_MapIDP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapIDP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapIDP
where MapIDP.Marker_No = @Primer_No

end
go

Procedure sp_Count_MapMaker_RFLP_Values

Name: sp_Count_MapMaker_RFLP_Values
Code: sp_Count_MapMaker_RFLP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapMaker_RFLP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select count(*) from MapMaker_RFLP

END
go

Procedure sp_Count_MapMaker_SSR_Values

Name: sp_Count_MapMaker_SSR_Values
Code: sp_Count_MapMaker_SSR_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapMaker_SSR_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN

select count(*) from MapMaker_SSR

END
go

Procedure sp_Count_MapRFLP_Values

Name: sp_Count_MapRFLP_Values
Code: sp_Count_MapRFLP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapRFLP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer ,
@Value char(1)

AS

Begin

select count(*) from MapRFLP
where MapRFLP.Sample_No = @Sample_No and MapRFLP.Value = @Value

end
go

Procedure sp_Count_MapSNP_Values

Name: sp_Count_MapSNP_Values
Code: sp_Count_MapSNP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapSNP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapSNP
where MapSNP.Marker_No = @Primer_No

end
go

Procedure sp_Count_MapSSR_Values

Name: sp_Count_MapSSR_Values
Code: sp_Count_MapSSR_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_MapSSR_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapSSR
where MapSSR.Marker_No = @Primer_No

end
go

Procedure sp_Count_NotMissing_IDPValues

Name: sp_Count_NotMissing_IDPValues
Code: sp_Count_NotMissing_IDPValues
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_NotMissing_IDPValues;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Primer_No integer

AS

Begin

select count(*) from MapIDP
where MapIDP.Marker_No = @Primer_No and MapIDP.Value <> "-"

END
go

Procedure sp_Count_NotMissing_SNPValues

Name: sp_Count_NotMissing_SNPValues
Code: sp_Count_NotMissing_SNPValues
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_NotMissing_SNPValues;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Primer_No integer

AS

Begin

select count(*) from MapSNP
where MapSNP.Marker_No = @Primer_No and MapSNP.Value <> "-"

END
go

Procedure sp_Count_NotMissing_SSRValues

Name: sp_Count_NotMissing_SSRValues
Code: sp_Count_NotMissing_SSRValues
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_NotMissing_SSRValues;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapSSR
where MapSSR.Marker_No = @Primer_No and MapSSR.Value <> "-"

END
go

Procedure sp_Count_PlateLayout_Locked

Name: sp_Count_PlateLayout_Locked
Code: sp_Count_PlateLayout_Locked
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_PlateLayout_Locked

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer

AS

Begin

select count(*) from PlateLayout
where PlateLayoutID = @PlateLayoutID and Locked = 'Y'

end
go

Procedure sp_Count_Population_Locked

Name: sp_Count_Population_Locked
Code: sp_Count_Population_Locked
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Population_Locked;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer

AS

Begin

select count(*) from Populations
where Populations.Pop_No = @Pop_No and Locked = 'Y'

end
go

Procedure sp_Count_Population_Values

Name: sp_Count_Population_Values
Code: sp_Count_Population_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Population_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer

AS

Begin

select count(*) from Pop_Samples
where Pop_Samples.Pop_No = @Pop_No

end
go

Procedure sp_Count_Primer_Groups

Name: sp_Count_Primer_Groups
Code: sp_Count_Primer_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Primer_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

Begin

select count(*) from Primer_Groups
where Primer_Groups.Group_No = @Group_No

END
go

Procedure sp_Count_Primer_Values

Name: sp_Count_Primer_Values
Code: sp_Count_Primer_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Primer_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapSSR
where MapSSR.Marker_No = @Primer_No

END
go

Procedure sp_Count_Primer_Values_IDP

Name: sp_Count_Primer_Values_IDP
Code: sp_Count_Primer_Values_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Primer_Values_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapIDP
where MapIDP.Marker_No = @Primer_No

END
go

Procedure sp_Count_Primer_Values_SNP

Name: sp_Count_Primer_Values_SNP
Code: sp_Count_Primer_Values_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Primer_Values_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

Begin

select count(*) from MapSNP
where MapSNP.Marker_No = @Primer_No

END
go

Procedure sp_Count_Probe_Groups

Name: sp_Count_Probe_Groups
Code: sp_Count_Probe_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Probe_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

Begin

select count(*) from Probe_Groups
where Probe_Groups.Group_No = @Group_No

END
go

Procedure sp_Count_Probe_Values

Name: sp_Count_Probe_Values
Code: sp_Count_Probe_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Probe_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer

AS

Begin

select count(*) from MapRFLP
where MapRFLP.Probe_No = @Probe_No

end
go

Procedure sp_Count_ProbeLocus_Values

Name: sp_Count_ProbeLocus_Values
Code: sp_Count_ProbeLocus_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_ProbeLocus_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer

AS

Begin

select count(*) from Locus
where Locus.Probe_No = @Probe_No

end
go

Procedure sp_Count_Sample_Groups

Name: sp_Count_Sample_Groups
Code: sp_Count_Sample_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

Begin

select count(*) from Sample_Groups
where Sample_Groups.Group_No = @Group_No

END
go

Procedure sp_Count_Sample_PopValues

Name: sp_Count_Sample_PopValues
Code: sp_Count_Sample_PopValues
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_PopValues;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

Begin

select count(*) from Pop_Samples
where Pop_Samples.Sample_No = @Sample_No

end
go

Procedure sp_Count_Sample_ValuesIDP

Name: sp_Count_Sample_ValuesIDP
Code: sp_Count_Sample_ValuesIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_ValuesIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

Begin

select count(*) from MapIDP
where MapIDP.Sample_No = @Sample_No

end
go

Procedure sp_Count_Sample_ValuesRFLP

Name: sp_Count_Sample_ValuesRFLP
Code: sp_Count_Sample_ValuesRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_ValuesRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

Begin

select count(*) from MapRFLP
where MapRFLP.Sample_No = @Sample_No

end
go

Procedure sp_Count_Sample_ValuesSNP

Name: sp_Count_Sample_ValuesSNP
Code: sp_Count_Sample_ValuesSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_ValuesSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

Begin

select count(*) from MapSNP
where MapSNP.Sample_No = @Sample_No

end
go

Procedure sp_Count_Sample_ValuesSSR

Name: sp_Count_Sample_ValuesSSR
Code: sp_Count_Sample_ValuesSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Sample_ValuesSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

Begin

select count(*) from MapSSR
where MapSSR.Sample_No = @Sample_No

end
go

Procedure sp_Count_SequenceCluster

Name: sp_Count_SequenceCluster
Code: sp_Count_SequenceCluster
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_SequenceCluster

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from SCLBig12

END
go

Procedure sp_Count_SequencePrimers

Name: sp_Count_SequencePrimers
Code: sp_Count_SequencePrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_SequencePrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from newTable

END
go

Procedure sp_Count_SNP_Template_Records

Name: sp_Count_SNP_Template_Records
Code: sp_Count_SNP_Template_Records
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_SNP_Template_Records

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select count(*) from SNP_Template
END
go

Procedure sp_Count_Stock_PlateValues

Name: sp_Count_Stock_PlateValues
Code: sp_Count_Stock_PlateValues
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_Stock_PlateValues

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer

AS

Begin

select count(*) from PlateStocks
where PlateLayoutID = @PlateLayoutID

end
go

Procedure sp_Count_UmcssrnumberPrimers

Name: sp_Count_UmcssrnumberPrimers
Code: sp_Count_UmcssrnumberPrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_UmcssrnumberPrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

Begin

select count(*) from newTable
where PrimerDesign <> 0 and Screening <> 0 and Accepted <> 0

END
go

Procedure sp_Count_User_Values

Name: sp_Count_User_Values
Code: sp_Count_User_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Count_User_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

Begin

select count(*) from Permissions
where Permissions.User_ID = @User_ID

end
go

Procedure sp_Delete_Enzyme

Name: sp_Delete_Enzyme
Code: sp_Delete_Enzyme
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Enzyme;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_No integer = NULL ,
@Enzyme_Name nvarchar(20) = NULL ,
@Enzyme_Comment nvarchar(100) = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar = NULL

As
Begin Transaction

delete Enzymes
where Enzyme_No = @Enzyme_No
Commit Transaction
go

Procedure sp_Delete_Locus

Name: sp_Delete_Locus
Code: sp_Delete_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Locus;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer ,
@Probe_No integer = NULL ,
@Locus_Name nvarchar = NULL ,
@Locus_Comment nvarchar = NULL ,
@Map_Marker_No integer = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar = NULL

As
Begin Transaction


delete Locus
where Locus_No = @Locus_No
Commit Transaction
go

Procedure sp_Delete_Locus_Group

Name: sp_Delete_Locus_Group
Code: sp_Delete_Locus_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Locus_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer = NULL ,
@Group_No integer

As
Begin Transaction


delete Locus_Groups
where Group_No = @Group_No
Commit Transaction
go

Procedure sp_Delete_MapIDP_Set

Name: sp_Delete_MapIDP_Set
Code: sp_Delete_MapIDP_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapIDP_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapIDP
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_MapIDP_Vfy_Set

Name: sp_Delete_MapIDP_Vfy_Set
Code: sp_Delete_MapIDP_Vfy_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapIDP_Vfy_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapIDP_Vfy
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_MapMaker_IDP

Name: sp_Delete_MapMaker_IDP
Code: sp_Delete_MapMaker_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapMaker_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

As
Begin Transaction

delete MapMaker_IDP

Commit Transaction
go

Procedure sp_Delete_MapMaker_RFLP

Name: sp_Delete_MapMaker_RFLP
Code: sp_Delete_MapMaker_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapMaker_RFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

As
Begin Transaction

delete MapMaker_RFLP

Commit Transaction
go

Procedure sp_Delete_MapMaker_SNP

Name: sp_Delete_MapMaker_SNP
Code: sp_Delete_MapMaker_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapMaker_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

As
Begin Transaction

delete MapMaker_SNP

Commit Transaction
go

Procedure sp_Delete_MapMaker_SSR

Name: sp_Delete_MapMaker_SSR
Code: sp_Delete_MapMaker_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapMaker_SSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

As
Begin Transaction

delete MapMaker_SSR

Commit Transaction
go

Procedure sp_Delete_MapRFLP_Comment

Name: sp_Delete_MapRFLP_Comment
Code: sp_Delete_MapRFLP_Comment
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapRFLP_Comment;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer ,
@Locus_No integer ,
@Enzyme_No integer

As
Begin Transaction


delete MapRFLP_Comments
where Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

Commit Transaction
go

Procedure sp_Delete_MapRFLP_Person

Name: sp_Delete_MapRFLP_Person
Code: sp_Delete_MapRFLP_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapRFLP_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer ,
@Locus_No integer ,
@Enzyme_No integer

As
Begin Transaction


delete MapRFLP_Person
where Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

Commit Transaction
go

Procedure sp_Delete_MapRFLP_Set

Name: sp_Delete_MapRFLP_Set
Code: sp_Delete_MapRFLP_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapRFLP_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer ,
@Locus_No integer ,
@Enzyme_No integer

As
Begin Transaction


delete MapRFLP
where Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

Commit Transaction
go

Procedure sp_Delete_MapSNP_Set

Name: sp_Delete_MapSNP_Set
Code: sp_Delete_MapSNP_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapSNP_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapSNP
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_MapSNP_Vfy_Set

Name: sp_Delete_MapSNP_Vfy_Set
Code: sp_Delete_MapSNP_Vfy_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapSNP_Vfy_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapSNP_Vfy
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_MapSSR_Set

Name: sp_Delete_MapSSR_Set
Code: sp_Delete_MapSSR_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapSSR_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapSSR
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_MapSSR_Vfy_Set

Name: sp_Delete_MapSSR_Vfy_Set
Code: sp_Delete_MapSSR_Vfy_Set
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_MapSSR_Vfy_Set;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Marker_No integer

As
Begin Transaction


delete MapSSR_Vfy
where Marker_No = @Marker_No

Commit Transaction
go

Procedure sp_Delete_Plate_Stocks

Name: sp_Delete_Plate_Stocks
Code: sp_Delete_Plate_Stocks
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Plate_Stocks

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer

As
Begin Transaction


delete PlateStocks
where PlateLayoutID = @PlateLayoutID
Commit Transaction
go

Procedure sp_Delete_PlateLayout

Name: sp_Delete_PlateLayout
Code: sp_Delete_PlateLayout
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_PlateLayout

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer

As
Begin Transaction


delete PlateLayout
where PlateLayoutID = @PlateLayoutID
Commit Transaction
go

Procedure sp_Delete_Pop_Samples

Name: sp_Delete_Pop_Samples
Code: sp_Delete_Pop_Samples
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Pop_Samples;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer = NULL ,
@Pop_No integer

As
Begin Transaction


delete Pop_Samples
where Pop_No = @Pop_No
Commit Transaction
go

Procedure sp_Delete_Populations

Name: sp_Delete_Populations
Code: sp_Delete_Populations
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Populations;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer

As
Begin Transaction


delete Populations
where Pop_No = @Pop_No
Commit Transaction
go

Procedure sp_Delete_Primer

Name: sp_Delete_Primer
Code: sp_Delete_Primer
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Primer;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Name nvarchar(20) = NULL ,
@Primer_Comment nvarchar(100) = NULL ,
@Person nvarchar(20) = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

delete Primers
where Marker_No = @Primer_No
Commit Transaction
go

Procedure sp_Delete_Primer_Group

Name: sp_Delete_Primer_Group
Code: sp_Delete_Primer_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Primer_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer = NULL ,
@Group_No integer

As
Begin Transaction


delete Primer_Groups
where Group_No = @Group_No
Commit Transaction
go

Procedure sp_Delete_Privileges

Name: sp_Delete_Privileges
Code: sp_Delete_Privileges
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Privileges;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

As
Begin Transaction

delete Permissions
where User_ID = @User_ID

Commit Transaction
go

Procedure sp_Delete_Probe

Name: sp_Delete_Probe
Code: sp_Delete_Probe
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Probe;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer ,
@Probe_Name nvarchar(20) = NULL ,
@Probe_Comment nvarchar(100) = NULL ,
@Bank_Acc_No nvarchar(20) = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20) = NULL

As
Begin Transaction

delete Probes
where Probe_No = @Probe_No
Commit Transaction
go

Procedure sp_Delete_Probe_Group

Name: sp_Delete_Probe_Group
Code: sp_Delete_Probe_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Probe_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer = NULL ,
@Group_No integer

As
Begin Transaction


delete Probe_Groups
where Group_No = @Group_No
Commit Transaction
go

Procedure sp_Delete_Sample

Name: sp_Delete_Sample
Code: sp_Delete_Sample
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Sample;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer ,
@Sample_Name nvarchar(10) = NULL ,
@Sample_Comments nvarchar(100) = NULL ,
@Person nvarchar(20) = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL

As
Begin Transaction

delete Samples
where Sample_No = @Sample_No
Commit Transaction
go

Procedure sp_Delete_Sample_Group

Name: sp_Delete_Sample_Group
Code: sp_Delete_Sample_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Sample_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer = NULL ,
@Group_No integer

As
Begin Transaction


delete Sample_Groups
where Group_No = @Group_No
Commit Transaction
go

Procedure sp_Delete_SNP_Colors

Name: sp_Delete_SNP_Colors
Code: sp_Delete_SNP_Colors
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_SNP_Colors

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer


As
Begin Transaction


Delete SNP_Colors

where SNP_TemplateID = @SNP_TemplateID

Commit Transaction
go

Procedure sp_Delete_SNP_Template

Name: sp_Delete_SNP_Template
Code: sp_Delete_SNP_Template
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_SNP_Template

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer


As
Begin Transaction


Delete SNP_Template

where SNP_TemplateID = @SNP_TemplateID

Commit Transaction
go

Procedure sp_Delete_SSRUMC

Name: sp_Delete_SSRUMC
Code: sp_Delete_SSRUMC
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_SSRUMC

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

As
Begin Transaction

delete SSRUMC

Commit Transaction
go

Procedure sp_Delete_Stock

Name: sp_Delete_Stock
Code: sp_Delete_Stock
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Stock

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Stock_ID integer

As
Begin Transaction

delete Stocks
where Stock_ID = @Stock_ID
Commit Transaction
go

Procedure sp_Delete_Template_Group

Name: sp_Delete_Template_Group
Code: sp_Delete_Template_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_Template_Group

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

As
Begin Transaction


delete Templates
where Group_No = @Group_No

Commit Transaction
go

Procedure sp_Delete_User

Name: sp_Delete_User
Code: sp_Delete_User
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Delete_User;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

As
Begin Transaction

delete Users
where User_ID = @User_ID

Commit Transaction
go

Procedure sp_Dump_Info_ToMaizeDB

Name: sp_Dump_Info_ToMaizeDB
Code: sp_Dump_Info_ToMaizeDB
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Dump_Info_ToMaizeDB

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Filename char(100) ,
@Username char(30) ,
@Password char(30) ,
@Info char(255)

AS

Select @Info = "bcp LabTucker..SSRUMC out " + @Filename + " /c /r \n /SlabdbDev /U" + @Username + " /P" + @Password + " /e C:\test.log /m 10"
BEGIN

exec master..xp_cmdshell @Info

END
go

Procedure sp_Excel_Report

Name: sp_Excel_Report
Code: sp_Excel_Report
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Excel_Report;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int,
@gel1 char(1),
@gel2 char(1),
@gel3 char(1),
@gel4 char(1)


AS

BEGIN

select Value, MapSSR_No from MapSSR
where ((gel = @gel1 or gel = @gel2 or gel = @gel3 or gel = @gel4) and
(Marker_No = @MapSSR_No))
order by MapSSR_No

END
go

Procedure sp_Exptort_Info_ToMaizeDB

Name: sp_Exptort_Info_ToMaizeDB
Code: sp_Exptort_Info_ToMaizeDB
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Exptort_Info_ToMaizeDB

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN

insert into SSRUMC select convert(char,DBID), sequence, umcdesignation, GenBanknumber, image + ".tif" + "/" + lanetier, convert(char,convert(numeric(5,2),bin)), convert(char,convert(numeric(5,2),secondbin)), "(" + RepeatUnit + ")" + convert(char,Length) "Repeat Unit", Forwardprimerseq, convert(char,convert(numeric(5,2),TmFor)), Reverseprimerseq, convert(char,convert(numeric(5,2),TmRev)), convert(char,convert(numeric(5,0),RefAlleleSize))
from newTable
where umcdesignation <> NULL

END
go

Procedure sp_Get_All_Enzymes

Name: sp_Get_All_Enzymes
Code: sp_Get_All_Enzymes
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Enzymes;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

as

BEGIN

select Enzyme_No,Enzyme_Name,Enzyme_Comment,Date_Created,Date_Updated,Person
from Enzymes
order by Enzyme_Name

END
go

Procedure sp_Get_All_Groups

Name: sp_Get_All_Groups
Code: sp_Get_All_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_Primer nvarchar(20)

AS

BEGIN
select Group_No, Group_Name, Group_Primer from Groups
where Group_Primer = @Group_Primer
order by Group_No

END
go

Procedure sp_Get_All_Groups2

Name: sp_Get_All_Groups2
Code: sp_Get_All_Groups2
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Groups2;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_Primer nvarchar(20)

AS

BEGIN
select Group_No, Group_Name, Group_Primer from Groups
where Group_Primer = @Group_Primer and Group_No > 3
order by Group_No

END
go

Procedure sp_Get_All_Individuals

Name: sp_Get_All_Individuals
Code: sp_Get_All_Individuals
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals order by User_ID

END
go

Procedure sp_Get_All_Individuals_AFLP

Name: sp_Get_All_Individuals_AFLP
Code: sp_Get_All_Individuals_AFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals_AFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals
where Marker_Type = "A"
order by User_ID

END
go

Procedure sp_Get_All_Individuals_IDP

Name: sp_Get_All_Individuals_IDP
Code: sp_Get_All_Individuals_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals_IDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals
where Marker_Type = "I"
order by User_ID

END
go

Procedure sp_Get_All_Individuals_RFLP

Name: sp_Get_All_Individuals_RFLP
Code: sp_Get_All_Individuals_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals_RFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals
where Marker_Type = "R"
order by User_ID

END
go

Procedure sp_Get_All_Individuals_SNP

Name: sp_Get_All_Individuals_SNP
Code: sp_Get_All_Individuals_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals_SNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals
where Marker_Type = "N"
order by User_ID

END
go

Procedure sp_Get_All_Individuals_SSR

Name: sp_Get_All_Individuals_SSR
Code: sp_Get_All_Individuals_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Individuals_SSR

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals
where Marker_Type = "S"
order by User_ID

END
go

Procedure sp_Get_All_Locus

Name: sp_Get_All_Locus
Code: sp_Get_All_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Locus;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
Select Locus_No, Probe_No, Locus_Name, Locus_Comment, Map_Maker_No, Date_Created, Date_Updated, Person, Enzyme_No, Chromosome, Bin
from Locus
order by Locus_Name

End
go

Procedure sp_Get_All_Locus_to_Update

Name: sp_Get_All_Locus_to_Update
Code: sp_Get_All_Locus_to_Update
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Locus_to_Update

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
Select Locus_No, Probe_No, Locus_Name, Locus_Comment, Map_Maker_No, Person, Chromosome, Bin
from Locus
order by Locus_Name

End
go

Procedure sp_Get_All_MapIDP

Name: sp_Get_All_MapIDP
Code: sp_Get_All_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP.Sample_No
from MapIDP, Primers, Samples
where MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, MapIDP.Sample_No

END
go

Procedure sp_Get_All_MapRFLP

Name: sp_Get_All_MapRFLP
Code: sp_Get_All_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name, Enzymes.Enzyme_No, Probes.Probe_No, Locus.Locus_No, Samples.Sample_No
from MapRFLP, Enzymes, Locus, Probes, Samples
where MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Enzyme_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_All_MapSNP

Name: sp_Get_All_MapSNP
Code: sp_Get_All_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP.Sample_No
from MapSNP, Primers, Samples
where MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, MapSNP.Sample_No

END
go

Procedure sp_Get_All_MapSSR

Name: sp_Get_All_MapSSR
Code: sp_Get_All_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from MapSSR, Primers, Samples
where MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, MapSSR.Sample_No

END
go

Procedure sp_Get_All_Objects

Name: sp_Get_All_Objects
Code: sp_Get_All_Objects
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Objects;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

as

BEGIN

select Object_ID,Object_Name
from Objects

END
go

Procedure sp_Get_All_Plates

Name: sp_Get_All_Plates
Code: sp_Get_All_Plates
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Plates

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select PlateLayoutID, TemplateName, Orientation from PlateLayout
order by PlateLayoutID

END
go

Procedure sp_Get_All_Populations

Name: sp_Get_All_Populations
Code: sp_Get_All_Populations
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Populations;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Pop_No, Pop_Name, Pop_Comment from Populations
order by Pop_No

END
go

Procedure sp_Get_All_Primers

Name: sp_Get_All_Primers
Code: sp_Get_All_Primers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Primers;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Type char(1)

AS

BEGIN
select Marker_No, Primer_Name, Primer_Comment, Person, Date_Created, Date_Updated, Registered, Bank_Acc_No, Map_Maker_No, Chromosome, Bin, Primer_Type
from Primers
where Primer_Type = @Primer_Type
order by Marker_No

END
go

Procedure sp_Get_All_Probes

Name: sp_Get_All_Probes
Code: sp_Get_All_Probes
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Probes;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
Select Probe_No, Probe_Name, Probe_Comment, Bank_Acc_No, Date_Created, Date_Updated, Person
from Probes
order by Probe_Name

End
go

Procedure sp_Get_All_Samples

Name: sp_Get_All_Samples
Code: sp_Get_All_Samples
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Samples;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN
Select Sample_No, Sample_Name, Sample_Comments, Person, Date_Created, Date_Updated from Samples
order by Sample_No

End
go

Procedure sp_Get_All_Users

Name: sp_Get_All_Users
Code: sp_Get_All_Users
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_All_Users;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

as

BEGIN

select User_ID,User_Name from Users where User_Name <> "admin"

END
go

Procedure sp_Get_Both_MapIDP

Name: sp_Get_Both_MapIDP
Code: sp_Get_Both_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Both_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapIDP_No, gel, tier, lane, " ", Primer_Name, Primer_Name, Value, Sample_Name
from Sample_Groups, MapIDP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapIDP.Sample_No and
MapIDP.Marker_No = Primers.Marker_No and
MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_Both_MapSNP

Name: sp_Get_Both_MapSNP
Code: sp_Get_Both_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Both_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapSNP_No, gel, tier, lane, " ", Primer_Name, Primer_Name, Value, Sample_Name
from Sample_Groups, MapSNP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSNP.Sample_No and
MapSNP.Marker_No = Primers.Marker_No and
MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_Both_MapSSR

Name: sp_Get_Both_MapSSR
Code: sp_Get_Both_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Both_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapSSR_No, gel, tier, lane, " ", Primer_Name, Primer_Name, Value, Sample_Name
from Sample_Groups, MapSSR, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSSR.Sample_No and
MapSSR.Marker_No = Primers.Marker_No and
MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_Enzyme_Rec

Name: sp_Get_Enzyme_Rec
Code: sp_Get_Enzyme_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Enzyme_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_Name nvarchar(20)

as

BEGIN

select Enzyme_No,Enzyme_Name,Enzyme_Comment,Date_Created,Date_Updated,Person
from Enzymes
where Enzymes.Enzyme_Name = @Enzyme_Name

END
go

Procedure sp_Get_GelTier_MapIDP

Name: sp_Get_GelTier_MapIDP
Code: sp_Get_GelTier_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2)

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from MapIDP, Primers, Samples
where gel = @gel and tier = @tier and MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_GelTier_MapRFLP

Name: sp_Get_GelTier_MapRFLP
Code: sp_Get_GelTier_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2)

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name
from MapRFLP, Probes, Enzymes, Locus, Samples
where gel = @gel and tier = @tier and MapRFLP.Enzyme_No = Enzymes.Enzyme_No and
MapRFLP.Locus_No = Locus.Locus_No and MapRFLP.Probe_No = Probes.Probe_No and
MapRFLP.Sample_No = Samples.Sample_No
order by gel, tier, lane

END
go

Procedure sp_Get_GelTier_MapSNP

Name: sp_Get_GelTier_MapSNP
Code: sp_Get_GelTier_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2)

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from MapSNP, Primers, Samples
where gel = @gel and tier = @tier and MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_GelTier_MapSSR

Name: sp_Get_GelTier_MapSSR
Code: sp_Get_GelTier_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2)

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name from MapSSR, Primers, Samples
where gel = @gel and tier = @tier and MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_GelTier_Selected

Name: sp_Get_GelTier_Selected
Code: sp_Get_GelTier_Selected
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_Selected;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2) ,
@Group_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Primer_Groups, MapSSR, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSSR.Marker_No and
gel = @gel and tier = @tier and MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_GelTier_Selected_IDP

Name: sp_Get_GelTier_Selected_IDP
Code: sp_Get_GelTier_Selected_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_Selected_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2) ,
@Group_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Primer_Groups, MapIDP, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapIDP.Marker_No and
gel = @gel and tier = @tier and MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_GelTier_Selected_SNP

Name: sp_Get_GelTier_Selected_SNP
Code: sp_Get_GelTier_Selected_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_GelTier_Selected_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1) ,
@tier varchar(2) ,
@Group_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Primer_Groups, MapSNP, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSNP.Marker_No and
gel = @gel and tier = @tier and MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_IDP_Records

Name: sp_Get_IDP_Records
Code: sp_Get_IDP_Records
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_IDP_Records

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select distinct Primer_Name from MapIDP, Primers
where MapIDP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%"
order by Primer_Name

END
go

Procedure sp_Get_Individuals

Name: sp_Get_Individuals
Code: sp_Get_Individuals
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID

END
go

Procedure sp_Get_Individuals_AFLP

Name: sp_Get_Individuals_AFLP
Code: sp_Get_Individuals_AFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals_AFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID and Marker_Type = "A"

END
go

Procedure sp_Get_Individuals_IDP

Name: sp_Get_Individuals_IDP
Code: sp_Get_Individuals_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals_IDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID and Marker_Type = "I"

END
go

Procedure sp_Get_Individuals_RFLP

Name: sp_Get_Individuals_RFLP
Code: sp_Get_Individuals_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals_RFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID and Marker_Type = "R"

END
go

Procedure sp_Get_Individuals_SNP

Name: sp_Get_Individuals_SNP
Code: sp_Get_Individuals_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals_SNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID and Marker_Type = "N"

END
go

Procedure sp_Get_Individuals_SSR

Name: sp_Get_Individuals_SSR
Code: sp_Get_Individuals_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Individuals_SSR

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name varchar(20)

AS

BEGIN
select Marker_Name,M0001,M0005,M0007,M0008,M0010,M0012,M0014,M0015,M0016,M0017,M0021,M0022,M0023,M0024,M0025,M0027,M0028,
M0029,M0030,M0031,M0032,M0033,M0034,M0035,M0039,M0040,M0043,M0044,M0045,M0046,M0048,M0051,M0052,M0054,M0055,M0057,M0058,
M0060,M0061,M0062,M0063,M0066,M0067,M0074,M0075,M0076,M0077,M0079,M0262,M0264,M0265,M0266,M0267,M0269,M0272,M0275,M0276,
M0281,M0284,M0287,M0288,M0296,M0297,M0298,M0309,M0310,M0311,M0315,M0317,M0321,M0322,M0323,M0325,M0326,M0328,M0337,M0341,
M0344,M0345,M0346,M0352,M0354,M0355,M0357,M0360,M0364,M0365,M0368,M0369,M0378,M0379,M0382,M0383,M0384
from Individuals, Users
where Users.User_Name = @User_Name and Users.User_ID = Individuals.User_ID and Marker_Type = "S"

END
go

Procedure sp_Get_Locus_Groups

Name: sp_Get_Locus_Groups
Code: sp_Get_Locus_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Locus_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select Locus_Groups.Locus_No, Locus_Name, Groups.Group_No, Group_Name from Locus_Groups, Locus, Groups
where Locus_Groups.Group_No = @Group_No and Locus_Groups.Group_No = Groups.Group_No
and Locus_Groups.Locus_No = Locus.Locus_No
order by Locus_Name

END
go

Procedure sp_Get_Locus_MapMaker

Name: sp_Get_Locus_MapMaker
Code: sp_Get_Locus_MapMaker
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Locus_MapMaker;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Locus_No, Locus_Name, Locus_Comment, Person, Date_Created, Date_Updated from Locus
where Locus_Name LIKE "*%" and Enzyme_No <> 0
order by Locus_Name

END
go

Procedure sp_Get_Locus_ProbeEnzyme_Open

Name: sp_Get_Locus_ProbeEnzyme_Open
Code: sp_Get_Locus_ProbeEnzyme_Open
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Locus_ProbeEnzyme_Open;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

as

Begin

select Locus_No, Locus.Probe_No, Locus.Enzyme_No, Locus_Name, Probe_Name, Enzyme_Name from Locus, Probes, Enzymes
where Locus_Name LIKE "*%" and Locus.Probe_No = Probes.Probe_No and Locus.Enzyme_No = Enzymes.Enzyme_No
order by Locus_Name

End
go

Procedure sp_Get_Locus_Rec

Name: sp_Get_Locus_Rec
Code: sp_Get_Locus_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Locus_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_Name nvarchar(20)

as

BEGIN

select Locus_No,Probe_No,Locus_Name,Locus_Comment,Map_Maker_No,Date_Created,Date_Updated,Person,Enzyme_No,Chromosome,Bin
from Locus
where Locus.Locus_Name = @Locus_Name

END
go

Procedure sp_Get_LocusProbeEnzyme_Verify

Name: sp_Get_LocusProbeEnzyme_Verify
Code: sp_Get_LocusProbeEnzyme_Verify
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_LocusProbeEnzyme_Verify;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


as

Begin

select Locus_No, Locus.Probe_No, Locus.Enzyme_No, Locus_Name, Probe_Name, Enzyme_Name from Locus, Probes, Enzymes
where Locus_Name not LIKE "*%" and Locus.Probe_No = Probes.Probe_No and Locus.Enzyme_No = Enzymes.Enzyme_No
order by Locus_Name

End
go

Procedure sp_Get_MapIDP_Rec

Name: sp_Get_MapIDP_Rec
Code: sp_Get_MapIDP_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapIDP_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample nvarchar(10) ,
@sample_no int

AS

Begin

select MapIDP_No from MapIDP
where gel = @gel and tier = @tier and lane = @lane and Marker_No = @Marker_No and
Sample_No = @sample_no

END
go

Procedure sp_Get_MapIDP_Sample_Values

Name: sp_Get_MapIDP_Sample_Values
Code: sp_Get_MapIDP_Sample_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapIDP_Sample_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP.Sample_No
from MapIDP, Primers, Samples
where @Sample_No = MapIDP.Sample_No and MapIDP.Marker_No = Primers.Marker_No and
MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapIDP_Value

Name: sp_Get_MapIDP_Value
Code: sp_Get_MapIDP_Value
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapIDP_Value;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer
AS

BEGIN

select Value from MapIDP
where MapIDP.Sample_No = @Sample_No


END
go

Procedure sp_Get_MapIDP_Values

Name: sp_Get_MapIDP_Values
Code: sp_Get_MapIDP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapIDP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP.Sample_No
from MapIDP, Primers, Samples
where @Primer_No = MapIDP.Marker_No and MapIDP.Marker_No = Primers.Marker_No and
MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapIDP_Vfy_Values

Name: sp_Get_MapIDP_Vfy_Values
Code: sp_Get_MapIDP_Vfy_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapIDP_Vfy_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP_Vfy.Sample_No
from MapIDP_Vfy, Primers, Samples
where @Primer_No = MapIDP_Vfy.Marker_No and MapIDP_Vfy.Marker_No = Primers.Marker_No and
MapIDP_Vfy.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapMaker_IDP

Name: sp_Get_MapMaker_IDP
Code: sp_Get_MapMaker_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapMaker_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS
BEGIN
select Primer_Name, Value
from MapMaker_IDP

END
go

Procedure sp_Get_MapMaker_RFLP

Name: sp_Get_MapMaker_RFLP
Code: sp_Get_MapMaker_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapMaker_RFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Locus_Name, Value
from MapMaker_RFLP

END
go

Procedure sp_Get_MapMaker_SNP

Name: sp_Get_MapMaker_SNP
Code: sp_Get_MapMaker_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapMaker_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS
BEGIN
select Primer_Name, Value
from MapMaker_SNP

END
go

Procedure sp_Get_MapMaker_SSR

Name: sp_Get_MapMaker_SSR
Code: sp_Get_MapMaker_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapMaker_SSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS
BEGIN
select Primer_Name, Value
from MapMaker_SSR

END
go

Procedure sp_Get_MapRFLP

Name: sp_Get_MapRFLP
Code: sp_Get_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1)

AS

BEGIN
select MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name
from MapRFLP, Probes, Enzymes, Locus, Samples
where gel = @gel and MapRFLP.Enzyme_No = Enzymes.Enzyme_No and
MapRFLP.Locus_No = Locus.Locus_No and MapRFLP.Probe_No = Probes.Probe_No and
MapRFLP.Sample_No = Samples.Sample_No
order by gel, tier, lane

END
go

Procedure sp_Get_MapRFLP_Comment

Name: sp_Get_MapRFLP_Comment
Code: sp_Get_MapRFLP_Comment
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Comment;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int ,
@Locus_No int ,
@Enzyme_No int

AS

Begin

select MapRFLP_C_No, Comment from MapRFLP_Comments
where Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

END
go

Procedure sp_Get_MapRFLP_Locus

Name: sp_Get_MapRFLP_Locus
Code: sp_Get_MapRFLP_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Locus;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name
from Locus_Groups, MapRFLP, Probes, Enzymes, Locus, Samples
where Locus_Groups.Group_No = @Group_No and Locus_Groups.Locus_No = MapRFLP.Locus_No and
MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_MapRFLP_Person

Name: sp_Get_MapRFLP_Person
Code: sp_Get_MapRFLP_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int ,
@Locus_No int ,
@Enzyme_No int

AS

Begin

select MapRFLP_P_No, Person from MapRFLP_Person
where Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

END
go

Procedure sp_Get_MapRFLP_Probes

Name: sp_Get_MapRFLP_Probes
Code: sp_Get_MapRFLP_Probes
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Probes;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name
from Probe_Groups, MapRFLP, Probes, Enzymes, Locus, Samples
where Probe_Groups.Group_No = @Group_No and Probe_Groups.Probe_No = MapRFLP.Probe_No and
MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_MapRFLP_Rec

Name: sp_Get_MapRFLP_Rec
Code: sp_Get_MapRFLP_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapRFLP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Enzyme_No int ,
@Locus_No int ,
@Probe_No int ,
@Value char(1) ,
@sample_no int

AS

Begin

select MapRFLP_No from MapRFLP
where gel = @gel and tier = @tier and lane = @lane and Enzyme_No = @Enzyme_No and
Locus_No = @Locus_No and Probe_No = @Probe_No and Sample_No = @sample_no

END
go

Procedure sp_Get_MapRFLP_Values

Name: sp_Get_MapRFLP_Values
Code: sp_Get_MapRFLP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapRFLP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer
AS

BEGIN

select Value from MapRFLP
where MapRFLP.Sample_No = @Sample_No


END
go

Procedure sp_Get_MapSNP_Rec

Name: sp_Get_MapSNP_Rec
Code: sp_Get_MapSNP_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSNP_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample nvarchar(10) ,
@sample_no int

AS

Begin

select MapSNP_No from MapSNP
where gel = @gel and tier = @tier and lane = @lane and Marker_No = @Marker_No and
Sample_No = @sample_no

END
go

Procedure sp_Get_MapSNP_Sample_Values

Name: sp_Get_MapSNP_Sample_Values
Code: sp_Get_MapSNP_Sample_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSNP_Sample_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP.Sample_No
from MapSNP, Primers, Samples
where @Sample_No = MapSNP.Sample_No and MapSNP.Marker_No = Primers.Marker_No and
MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSNP_Value

Name: sp_Get_MapSNP_Value
Code: sp_Get_MapSNP_Value
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSNP_Value;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer

AS

BEGIN

select Value from MapSNP
where MapSNP.Sample_No = @Sample_No


END
go

Procedure sp_Get_MapSNP_Values

Name: sp_Get_MapSNP_Values
Code: sp_Get_MapSNP_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSNP_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP.Sample_No
from MapSNP, Primers, Samples
where @Primer_No = MapSNP.Marker_No and MapSNP.Marker_No = Primers.Marker_No and
MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSNP_Vfy_Values

Name: sp_Get_MapSNP_Vfy_Values
Code: sp_Get_MapSNP_Vfy_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSNP_Vfy_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP_Vfy.Sample_No
from MapSNP_Vfy, Primers, Samples
where @Primer_No = MapSNP_Vfy.Marker_No and MapSNP_Vfy.Marker_No = Primers.Marker_No and
MapSNP_Vfy.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSSR

Name: sp_Get_MapSSR
Code: sp_Get_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel varchar(1)

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name from MapSSR, Primers, Samples
where gel = @gel and MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSSR_Rec

Name: sp_Get_MapSSR_Rec
Code: sp_Get_MapSSR_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int = NULL,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@sample nvarchar(10) ,
@sample_no int

AS

Begin

select MapSSR_No from MapSSR
where gel = @gel and tier = @tier and lane = @lane and Marker_No = @Marker_No and
Sample_No = @sample_no

END
go

Procedure sp_Get_MapSSR_Sample_Values

Name: sp_Get_MapSSR_Sample_Values
Code: sp_Get_MapSSR_Sample_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_Sample_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Sample_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from MapSSR, Primers, Samples
where @Sample_No = MapSSR.Sample_No and MapSSR.Marker_No = Primers.Marker_No and
MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSSR_Value

Name: sp_Get_MapSSR_Value
Code: sp_Get_MapSSR_Value
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_Value;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer
AS

BEGIN

select Value from MapSSR
where MapSSR.Sample_No = @Sample_No


END
go

Procedure sp_Get_MapSSR_Values

Name: sp_Get_MapSSR_Values
Code: sp_Get_MapSSR_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from MapSSR, Primers, Samples
where @Primer_No = MapSSR.Marker_No and MapSSR.Marker_No = Primers.Marker_No and
MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSSR_ValuesT

Name: sp_Get_MapSSR_ValuesT
Code: sp_Get_MapSSR_ValuesT
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_ValuesT

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer,
@Group_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from MapSSR, Primers, Samples, Sample_Groups
where @Primer_No = MapSSR.Marker_No and MapSSR.Marker_No = Primers.Marker_No and
MapSSR.Sample_No = Samples.Sample_No and Samples.Sample_No = Sample_Groups.Sample_No and
Sample_Groups.Group_No = @Group_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_MapSSR_Vfy_Values

Name: sp_Get_MapSSR_Vfy_Values
Code: sp_Get_MapSSR_Vfy_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_MapSSR_Vfy_Values;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR_Vfy.Sample_No
from MapSSR_Vfy, Primers, Samples
where @Primer_No = MapSSR_Vfy.Marker_No and MapSSR_Vfy.Marker_No = Primers.Marker_No and
MapSSR_Vfy.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_New_Primers

Name: sp_Get_New_Primers
Code: sp_Get_New_Primers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_New_Primers;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Type char(1)

AS

BEGIN
select Marker_No, Primer_Name, Primer_Comment from Primers
where Registered = "N" and Primer_Type = @Primer_Type

END
go

Procedure sp_Get_Plates_Stocks

Name: sp_Get_Plates_Stocks
Code: sp_Get_Plates_Stocks
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Plates_Stocks

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer

AS

BEGIN
select PlateStocks.Stock_ID, Stock_Name, PlateLayout.PlateLayoutID, TemplateName from PlateStocks, Stocks, PlateLayout
where PlateStocks.PlateLayoutID = @PlateLayoutID and PlateStocks.PlateLayoutID = PlateLayout.PlateLayoutID
and PlateStocks.Stock_ID = Stocks.Stock_ID

END
go

Procedure sp_Get_Populations

Name: sp_Get_Populations
Code: sp_Get_Populations
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Populations;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Pop_No, Pop_Name, Pop_Comment, Person from Populations

END
go

Procedure sp_Get_Primer_Groups

Name: sp_Get_Primer_Groups
Code: sp_Get_Primer_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primer_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select Primer_Groups.Marker_No, Primer_Name, Groups.Group_No, Group_Name, Primer_Type from Primer_Groups, Primers, Groups
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Group_No = Groups.Group_No
and Primer_Groups.Marker_No = Primers.Marker_No

END
go

Procedure sp_Get_Primer_Person

Name: sp_Get_Primer_Person
Code: sp_Get_Primer_Person
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primer_Person;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No int

AS

Begin

select Marker_No, Person, Primer_Name from Primers
where Marker_No = @Primer_No

END
go

Procedure sp_Get_Primer_Rec

Name: sp_Get_Primer_Rec
Code: sp_Get_Primer_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primer_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Name nvarchar(20)

as

BEGIN

select Marker_No,Primer_Name,Primer_Comment,Person,Date_Created,Date_Updated,Registered,Bank_Acc_No,Map_Maker_No,Chromosome,Bin
from Primers
where Primers.Primer_Name = @Primer_Name

END
go

Procedure sp_Get_Primer_Unregistered

Name: sp_Get_Primer_Unregistered
Code: sp_Get_Primer_Unregistered
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primer_Unregistered;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Primer_No integer

AS

BEGIN
select count(*) from Primers
where Registered = "N" and Marker_No = @Primer_No

END
go

Procedure sp_Get_Primers_MapMaker

Name: sp_Get_Primers_MapMaker
Code: sp_Get_Primers_MapMaker
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primers_MapMaker;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Type char(1)

AS

BEGIN
select Marker_No, Primer_Name, Primer_Comment, Person, Date_Created, Date_Updated from Primers
where Primer_Name LIKE "*%" and Primer_Type = @Primer_Type
order by Primer_Name

END
go

Procedure sp_Get_Primers_to_Open

Name: sp_Get_Primers_to_Open
Code: sp_Get_Primers_to_Open
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primers_to_Open;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Type char(1)

AS

BEGIN
select Marker_No, Primer_Name, Primer_Comment, Scored from Primers
where Registered <> "N" and Primer_Type = @Primer_Type

END
go

Procedure sp_Get_Primers_to_Verify

Name: sp_Get_Primers_to_Verify
Code: sp_Get_Primers_to_Verify
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Primers_to_Verify;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_Type char(1)

AS

BEGIN
select Marker_No, Primer_Name, Primer_Comment, Scored from Primers
where Registered = "Y" and Primer_Type = @Primer_Type

END
go

Procedure sp_Get_PrimersSamples_MapIDP

Name: sp_Get_PrimersSamples_MapIDP
Code: sp_Get_PrimersSamples_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_PrimersSamples_MapIDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP.Sample_No
from Sample_Groups, Primer_Groups, MapIDP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapIDP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapIDP.Marker_No and
MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_PrimersSamples_MapRFLP

Name: sp_Get_PrimersSamples_MapRFLP
Code: sp_Get_PrimersSamples_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_PrimersSamples_MapRFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Locus_Name, Value, Sample_Name, Locus.Locus_No, Sample_Groups.Sample_No         
from Sample_Groups, Locus_Groups, MapRFLP, Locus, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapRFLP.Sample_No and
Locus_Groups.Group_No = @Group_No and Locus_Groups.Locus_No = MapRFLP.Locus_No and
MapRFLP.Locus_No = Locus.Locus_No and MapRFLP.Sample_No = Samples.Sample_No
order by Locus_Name, gel, tier, lane

END
go

Procedure sp_Get_PrimersSamples_MapSNP

Name: sp_Get_PrimersSamples_MapSNP
Code: sp_Get_PrimersSamples_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_PrimersSamples_MapSNP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP.Sample_No
from Sample_Groups, Primer_Groups, MapSNP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSNP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSNP.Marker_No and
MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_PrimersSamples_MapSSR

Name: sp_Get_PrimersSamples_MapSSR
Code: sp_Get_PrimersSamples_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_PrimersSamples_MapSSR

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from Sample_Groups, Primer_Groups, MapSSR, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSSR.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSSR.Marker_No and
MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_Probe_Groups

Name: sp_Get_Probe_Groups
Code: sp_Get_Probe_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Probe_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select Probe_Groups.Probe_No, Probe_Name, Groups.Group_No, Group_Name from Probe_Groups, Probes, Groups
where Probe_Groups.Group_No = @Group_No and Probe_Groups.Group_No = Groups.Group_No
and Probe_Groups.Probe_No = Probes.Probe_No
order by Probe_Name

END
go

Procedure sp_Get_Probe_MapRFLP

Name: sp_Get_Probe_MapRFLP
Code: sp_Get_Probe_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Probe_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name, Enzymes.Enzyme_No, Probes.Probe_No, Locus.Locus_No, Samples.Sample_No
from MapRFLP, Enzymes, Locus, Probes, Samples
where MapRFLP.Probe_No = @Probe_No and MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Enzyme_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_Probe_Rec

Name: sp_Get_Probe_Rec
Code: sp_Get_Probe_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Probe_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_Name nvarchar(20)

as

BEGIN

select Probe_No,Probe_Name,Probe_Comment,Bank_Acc_No,Date_Created,Date_Updated,Person
from Probes
where Probes.Probe_Name = @Probe_Name

END
go

Procedure sp_Get_ProbeLocus_MapRFLP

Name: sp_Get_ProbeLocus_MapRFLP
Code: sp_Get_ProbeLocus_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_ProbeLocus_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int,
@Locus_No int

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name, Enzymes.Enzyme_No, Probes.Probe_No, Locus.Locus_No, Samples.Sample_No
from MapRFLP, Enzymes, Locus, Probes, Samples
where MapRFLP.Probe_No = @Probe_No and MapRFLP.Locus_No = @Locus_No and MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Enzyme_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_ProbeLocus_MapRFLP_Err

Name: sp_Get_ProbeLocus_MapRFLP_Err
Code: sp_Get_ProbeLocus_MapRFLP_Err
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_ProbeLocus_MapRFLP_Err;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int,
@Locus_No int

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name, Enzymes.Enzyme_No, Probes.Probe_No, Locus.Locus_No, Samples.Sample_No, MapRFLP_Err.Person
from MapRFLP_Err, Enzymes, Locus, Probes, Samples
where MapRFLP_Err.Probe_No = @Probe_No and MapRFLP_Err.Locus_No = @Locus_No and MapRFLP_Err.Enzyme_No = Enzymes.Enzyme_No and MapRFLP_Err.Locus_No = Locus.Locus_No and
MapRFLP_Err.Probe_No = Probes.Probe_No and MapRFLP_Err.Sample_No = Samples.Sample_No
order by MapRFLP_Err.Probe_No, MapRFLP_Err.Locus_No, MapRFLP_Err.Enzyme_No, MapRFLP_Err.Sample_No

END
go

Procedure sp_Get_ProbeLocus_MapRFLPT

Name: sp_Get_ProbeLocus_MapRFLPT
Code: sp_Get_ProbeLocus_MapRFLPT
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_ProbeLocus_MapRFLPT

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No int,
@Locus_No int,
@Group_No int

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name, Enzymes.Enzyme_No, Probes.Probe_No, Locus.Locus_No, Samples.Sample_No
from MapRFLP, Enzymes, Locus, Probes, Samples, Sample_Groups
where MapRFLP.Probe_No = @Probe_No and MapRFLP.Locus_No = @Locus_No and MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No and Samples.Sample_No = Sample_Groups.Sample_No and Sample_Groups.Group_No = @Group_No
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Enzyme_No, MapRFLP.Sample_No

END
go

Procedure sp_Get_Qry_Groups

Name: sp_Get_Qry_Groups
Code: sp_Get_Qry_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Qry_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Qry_GroupKey, Qry_GroupName from QryGroups

END
go

Procedure sp_Get_Remote_Users

Name: sp_Get_Remote_Users
Code: sp_Get_Remote_Users
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Remote_Users

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

as

BEGIN


select User_ID,User_Name from Users where User_Name <> "admin" and User_Type = "R"

END
go

Procedure sp_Get_RFLP_Markers

Name: sp_Get_RFLP_Markers
Code: sp_Get_RFLP_Markers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_RFLP_Markers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Locus_Name, Probe_Name, Locus.Date_Updated, Locus.Person
from Locus, Probes
where Locus.Probe_No = Probes.Probe_No and Enzyme_No <> 0
order by Locus_Name

END
go

Procedure sp_Get_RFLP_Records

Name: sp_Get_RFLP_Records
Code: sp_Get_RFLP_Records
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_RFLP_Records;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select distinct Locus_Name from MapRFLP, Locus
where MapRFLP.Locus_No = Locus.Locus_No and Locus_Name LIKE "*%"
order by Locus_Name

END
go

Procedure sp_Get_Sample_Groups

Name: sp_Get_Sample_Groups
Code: sp_Get_Sample_Groups
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Sample_Groups;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select Sample_Groups.Sample_No, Sample_Name, Groups.Group_No, Group_Name from Sample_Groups, Samples, Groups
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Group_No = Groups.Group_No
and Sample_Groups.Sample_No = Samples.Sample_No
order by Sample_Groups.Sample_No

END
go

Procedure sp_Get_Sample_Groups2

Name: sp_Get_Sample_Groups2
Code: sp_Get_Sample_Groups2
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Sample_Groups2;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select Sample_Groups.Sample_No, Sample_Name, Groups.Group_No, Group_Name from Sample_Groups, Samples, Groups
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Group_No = Groups.Group_No
and Sample_Groups.Sample_No = Samples.Sample_No

END
go

Procedure sp_Get_Sample_Populations

Name: sp_Get_Sample_Populations
Code: sp_Get_Sample_Populations
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Sample_Populations;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer

AS

BEGIN
select Pop_Samples.Sample_No, Sample_Name, Populations.Pop_No, Pop_Name from Pop_Samples, Samples, Populations
where Pop_Samples.Pop_No = @Pop_No and Pop_Samples.Pop_No = Populations.Pop_No
and Pop_Samples.Sample_No = Samples.Sample_No

END
go

Procedure sp_Get_samples_MapIDP

Name: sp_Get_samples_MapIDP
Code: sp_Get_samples_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_samples_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Sample_Groups, MapIDP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapIDP.Sample_No and
MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_samples_MapRFLP

Name: sp_Get_samples_MapRFLP
Code: sp_Get_samples_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_samples_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Enzyme_Name, Probe_Name, Locus_Name, Value, Sample_Name
from Sample_Groups, MapRFLP, Probes, Enzymes, Locus, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapRFLP.Sample_No and
MapRFLP.Enzyme_No = Enzymes.Enzyme_No and MapRFLP.Locus_No = Locus.Locus_No and
MapRFLP.Probe_No = Probes.Probe_No and MapRFLP.Sample_No = Samples.Sample_No
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Enzyme_No, MapRFLP.Sample_No, gel, tier, lane

END
go

Procedure sp_Get_samples_MapSNP

Name: sp_Get_samples_MapSNP
Code: sp_Get_samples_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_samples_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Sample_Groups, MapSNP, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSNP.Sample_No and
MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_samples_MapSSR

Name: sp_Get_samples_MapSSR
Code: sp_Get_samples_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_samples_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name from Sample_Groups, MapSSR, Primers, Samples
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSSR.Sample_No and
MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_Samples_Not_Populated

Name: sp_Get_Samples_Not_Populated
Code: sp_Get_Samples_Not_Populated
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Samples_Not_Populated;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


AS

BEGIN
Select Sample_No, Sample_Name, Sample_Comments, Person, Date_Created, Date_Updated from Samples
where Populated = 'N'
order by Sample_No

End
go

Procedure sp_Get_SamplesPrimers_IDP

Name: sp_Get_SamplesPrimers_IDP
Code: sp_Get_SamplesPrimers_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Primer_Name, Value
from MapMaker_IDP
order by Primer_Name, Sample_No

END
go

Procedure sp_Get_SamplesPrimers_MapIDP

Name: sp_Get_SamplesPrimers_MapIDP
Code: sp_Get_SamplesPrimers_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_MapIDP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapIDP.MapIDP_No,gel,tier,lane, Sample_Groups.Sample_No,Primers.Marker_No,
          Primer_Name, Value
from Sample_Groups, Primer_Groups, MapIDP, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapIDP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapIDP.Marker_No and
MapIDP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapIDP.Sample_No < 361
order by Primer_Name, Sample_Groups.Sample_No

END
go

Procedure sp_Get_SamplesPrimers_MapRFLP

Name: sp_Get_SamplesPrimers_MapRFLP
Code: sp_Get_SamplesPrimers_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_MapRFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select distinct MapRFLP_No, gel, tier, lane, Sample_Groups.Sample_No,Locus.Locus_No,
          Locus_Name, Value
from Sample_Groups, Locus_Groups, MapRFLP, Locus
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapRFLP.Sample_No and
Locus_Groups.Group_No = @Group_No and Locus_Groups.Locus_No = MapRFLP.Locus_No and
MapRFLP.Locus_No = Locus.Locus_No and Locus_Name Like "*%" and MapRFLP.Sample_No < 361
order by Locus_Name, Sample_Groups.Sample_No

END
go

Procedure sp_Get_SamplesPrimers_MapSNP

Name: sp_Get_SamplesPrimers_MapSNP
Code: sp_Get_SamplesPrimers_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_MapSNP

@Group_No integer

AS

BEGIN
select MapSNP.MapSNP_No,gel,tier,lane, Sample_Groups.Sample_No,Primers.Marker_No,
          Primer_Name, Value
from Sample_Groups, Primer_Groups, MapSNP, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSNP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSNP.Marker_No and
MapSNP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapSNP.Sample_No < 361
order by Primer_Name, Sample_Groups.Sample_No

END
go

Procedure sp_Get_SamplesPrimers_MapSSR

Name: sp_Get_SamplesPrimers_MapSSR
Code: sp_Get_SamplesPrimers_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSSR.MapSSR_No,gel,tier,lane, Sample_Groups.Sample_No,Primers.Marker_No,
          Primer_Name, Value
from Sample_Groups, Primer_Groups, MapSSR, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSSR.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSSR.Marker_No and
MapSSR.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapSSR.Sample_No < 361
order by Primer_Name, Sample_Groups.Sample_No

END
go

Procedure sp_Get_SamplesPrimers_RFLP

Name: sp_Get_SamplesPrimers_RFLP
Code: sp_Get_SamplesPrimers_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_RFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Locus_Name, Value
from MapMaker_RFLP
order by Locus_Name, Sample_No

END
go

Procedure sp_Get_SamplesPrimers_SNP

Name: sp_Get_SamplesPrimers_SNP
Code: sp_Get_SamplesPrimers_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Primer_Name, Value
from MapMaker_SNP
order by Primer_Name, Sample_No

END
go

Procedure sp_Get_SamplesPrimers_SSR

Name: sp_Get_SamplesPrimers_SSR
Code: sp_Get_SamplesPrimers_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SamplesPrimers_SSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
select Primer_Name, Value
from MapMaker_SSR
order by Primer_Name, Sample_No

END
go

Procedure sp_Get_selected_MapIDP

Name: sp_Get_selected_MapIDP
Code: sp_Get_selected_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_selected_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapIDP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapIDP.Sample_No
from Primer_Groups, MapIDP, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapIDP.Marker_No and
MapIDP.Marker_No = Primers.Marker_No and MapIDP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_selected_MapSNP

Name: sp_Get_selected_MapSNP
Code: sp_Get_selected_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_selected_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSNP_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSNP.Sample_No
from Primer_Groups, MapSNP, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSNP.Marker_No and
MapSNP.Marker_No = Primers.Marker_No and MapSNP.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_selected_MapSSR

Name: sp_Get_selected_MapSSR
Code: sp_Get_selected_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_selected_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
select MapSSR_No, gel, tier, lane, Primer_Name, Value, Sample_Name, Primers.Marker_No, MapSSR.Sample_No
from Primer_Groups, MapSSR, Primers, Samples
where Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSSR.Marker_No and
MapSSR.Marker_No = Primers.Marker_No and MapSSR.Sample_No = Samples.Sample_No
order by Primer_Name, gel, tier, lane

END
go

Procedure sp_Get_SNP_ColorP1

Name: sp_Get_SNP_ColorP1
Code: sp_Get_SNP_ColorP1
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SNP_ColorP1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

Select SNP_JoinP1 from SNP_Template order by SNP_JoinP1

END
go

Procedure sp_Get_SNP_ColorP2

Name: sp_Get_SNP_ColorP2
Code: sp_Get_SNP_ColorP2
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SNP_ColorP2

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

Select SNP_JoinP2 from SNP_Template order by SNP_JoinP2

END
go

Procedure sp_Get_SNP_Colors

Name: sp_Get_SNP_Colors
Code: sp_Get_SNP_Colors
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SNP_Colors

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select SNP_TemplateID, SNP_Color, SNP_Place
from SNP_Colors
order by SNP_Color

END
go

Procedure sp_Get_SNP_Parents

Name: sp_Get_SNP_Parents
Code: sp_Get_SNP_Parents
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SNP_Parents

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select SNP_Name, SNP_Comment, SNP_P1, SNP_P2
from SNP_Template
order by SNP_TemplateID

END
go

Procedure sp_Get_SNP_Records

Name: sp_Get_SNP_Records
Code: sp_Get_SNP_Records
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SNP_Records

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select distinct Primer_Name from MapSNP, Primers
where MapSNP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%"
order by Primer_Name

END
go

Procedure sp_Get_SSR_Records

Name: sp_Get_SSR_Records
Code: sp_Get_SSR_Records
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_SSR_Records;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select distinct Primer_Name from MapSSR, Primers
where MapSSR.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%"
order by Primer_Name

END
go

Procedure sp_Get_Stocks

Name: sp_Get_Stocks
Code: sp_Get_Stocks
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Stocks

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
Select Stock_ID, Stock_Name, Stock_Comments, Person, Date_Created, Date_Updated from Stocks
order by Stock_ID

End
go

Procedure sp_Get_Template

Name: sp_Get_Template
Code: sp_Get_Template
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Template

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN

select Sample_Name, Gel, Tier, Lane, Templates.Sample_No
from Templates, Samples
where Group_No = @Group_No and Templates.Sample_No = Samples.Sample_No

END
go

Procedure sp_Get_Template_MaxID

Name: sp_Get_Template_MaxID
Code: sp_Get_Template_MaxID
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Template_MaxID;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

select Max(Templates.Template_No)+1 from Templates

END
go

Procedure sp_Get_Template_Values

Name: sp_Get_Template_Values
Code: sp_Get_Template_Values
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Template_Values

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Sample_No integer

AS

BEGIN
select Gel, Tier, Lane from Templates
where Group_No = @Group_No and Sample_No = @Sample_No

END
go

Procedure sp_Get_UMCMAX

Name: sp_Get_UMCMAX
Code: sp_Get_UMCMAX
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_UMCMAX

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@UMCID integer
AS

BEGIN

select UMCID, UMCDes from UMCMAX
where UMCID = @UMCID

END
go

Procedure sp_Get_User_Rec

Name: sp_Get_User_Rec
Code: sp_Get_User_Rec
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_User_Rec;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_Name nvarchar(20)

as

BEGIN

select User_ID,User_Name,Date_Created,Date_Updated,Person
from Users
where Users.User_Name = @User_Name

END
go

Procedure sp_Get_Users_Priv

Name: sp_Get_Users_Priv
Code: sp_Get_Users_Priv
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Get_Users_Priv;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer

AS

BEGIN

select Permissions.User_ID, Permissions.Object_ID, User_Name, Object_Name
from Permissions, Users, Objects
where Permissions.User_ID = @User_ID and Permissions.User_ID = Users.User_ID and
Permissions.Object_ID = Objects.Object_ID

END
go

Procedure sp_logdump

Name: sp_logdump
Code: sp_logdump
Label:
Type: Procedure

Code

create procedure sp_logdump
@dbname varchar(30),
@segmentname varchar(30),
@space_left int,
@status int

as
dump transaction @dbname with truncate_only
print "LOG DUMP: '%1!' for '%2!' dumped per threshhold action",
@segmentname, @dbname
go

Procedure sp_Register_Primer

Name: sp_Register_Primer
Code: sp_Register_Primer
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Register_Primer;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Name nvarchar(20) = NULL ,
@Primer_Comment nvarchar(100) = NULL ,
@Person nvarchar(20) = NULL ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Registered char(1)

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Registered = @Registered,
Date_Updated = @Date_Updated
where Marker_No = @Primer_No
Commit Transaction
go

Procedure sp_Update_ATLegend

Name: sp_Update_ATLegend
Code: sp_Update_ATLegend
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_ATLegend;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@ATLegend_ID integer ,
@Marker_No integer = NULL ,
@Plate nvarchar(10) ,
@Position integer ,
@Decision nvarchar(10) ,
@Comment nvarchar(60)

As
Begin Transaction


update ATLegend
set ATPlate = @Plate ,
ATPosition = @Position,
ATDecision = @Decision,
ATComment = @Comment
where ATLegend_ID = @ATLegend_ID
Commit Transaction
go

Procedure sp_Update_Big12LegendPrimer

Name: sp_Update_Big12LegendPrimer
Code: sp_Update_Big12LegendPrimer
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Big12LegendPrimer

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@DBID integer ,
@sequence nvarchar(25) = NULL,
@image nvarchar(12) ,
@lanetier nvarchar(3) ,
@bestview nvarchar(12) ,
@IBM nvarchar(5) ,
@IF2 nvarchar(5) ,
@C6 nvarchar(5) ,
@CommentsBig nvarchar(60) ,
@alleles nvarchar(3) ,
@umcdesignation nvarchar(7) ,
@Accepted integer

As
Begin Transaction


update newTable
set image = @image,
lanetier = @lanetier,
bestview = @bestview,
IBM = @IBM,
IF2 = @IF2,
C6 = @C6,
CommentsBig = @CommentsBig,
alleles = @alleles,
umcdesignation = @umcdesignation,
Accepted = @Accepted
where DBID = @DBID
Commit Transaction
go

Procedure sp_Update_Color_Order

Name: sp_Update_Color_Order
Code: sp_Update_Color_Order
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Color_Order

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer ,
@SNP_P1 nvarchar(4) ,
@SNP_P2 nvarchar(4)
AS

Begin Transaction


Update SNP_Template

set SNP_P1 = @SNP_P1 ,
SNP_P2 = @SNP_P2

where SNP_TemplateID = @SNP_TemplateID


Commit Transaction
go

Procedure sp_Update_DesignedPrimers

Name: sp_Update_DesignedPrimers
Code: sp_Update_DesignedPrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_DesignedPrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@DBID integer ,
@sequence nvarchar(25) = NULL,
@image nvarchar(12) ,
@lanetier nvarchar(3) ,
@Comment nvarchar(50) ,
@Screening integer

As
Begin Transaction


update newTable
set image = @image,
lanetier = @lanetier,
Comment = @Comment,
Screening = @Screening
where DBID = @DBID
Commit Transaction
go

Procedure sp_Update_Enzyme

Name: sp_Update_Enzyme
Code: sp_Update_Enzyme
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Enzyme;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_No integer ,
@Enzyme_Name nvarchar(20) ,
@Enzyme_Comment nvarchar(100) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)

As
Begin Transaction

select @Date_Updated = GETDATE()

update Enzymes
set Enzyme_Name = @Enzyme_Name ,
Enzyme_Comment = @Enzyme_Comment,
Person = @Person,
Date_Updated = @Date_Updated
where Enzyme_No = @Enzyme_No
Commit Transaction
go

Procedure sp_Update_Group

Name: sp_Update_Group
Code: sp_Update_Group
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Group;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer ,
@Group_Name nvarchar(20),
@Group_Primer nvarchar(20)

As
Begin Transaction

update Groups
set Group_Name = @Group_Name,
Group_Primer = @Group_Primer
where Group_No = @Group_No
Commit Transaction
go

Procedure sp_Update_Locus

Name: sp_Update_Locus
Code: sp_Update_Locus
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Locus;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer ,
@Probe_No integer ,
@Enzyme_No integer ,
@Locus_Name nvarchar(20) ,
@Locus_Comment nvarchar(100) ,
@Map_Maker_No integer ,
@Chromosome integer ,
@Bin float ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)



As
Begin Transaction

select @Date_Updated = GETDATE()

update Locus
set Probe_No = @Probe_No ,
Locus_Name = @Locus_Name ,
Locus_Comment = @Locus_Comment,
Map_Maker_No = @Map_Maker_No,
Date_Updated = @Date_Updated,
Person = @Person,
Enzyme_No = @Enzyme_No ,
Chromosome = @Chromosome ,
Bin = @Bin
where Locus_No = @Locus_No
Commit Transaction
go

Procedure sp_Update_Locus_Global

Name: sp_Update_Locus_Global
Code: sp_Update_Locus_Global
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Locus_Global

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer ,
@Locus_Name nvarchar(20) ,
@Locus_Comment nvarchar(100) ,
@Map_Maker_No integer ,
@Chromosome integer ,
@Bin float ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)



As
Begin Transaction

select @Date_Updated = GETDATE()

update Locus
set Locus_Name = @Locus_Name ,
Locus_Comment = @Locus_Comment,
Map_Maker_No = @Map_Maker_No,
Date_Updated = @Date_Updated,
Person = @Person,
Chromosome = @Chromosome ,
Bin = @Bin
where Locus_No = @Locus_No
Commit Transaction
go

Procedure sp_Update_Locus_Name

Name: sp_Update_Locus_Name
Code: sp_Update_Locus_Name
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Locus_Name;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Locus_No integer ,
@Locus_Name nvarchar(20) ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)



As
Begin Transaction

select @Date_Updated = GETDATE()

update Locus
set Locus_Name = @Locus_Name ,
Date_Updated = @Date_Updated,
Person = @Person

where Locus_No = @Locus_No
Commit Transaction
go

Procedure sp_Update_MapIDP

Name: sp_Update_MapIDP
Code: sp_Update_MapIDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_MapIDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapIDP_No int,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@Sample_No int

As
Begin Transaction
update MapIDP
set gel = @gel ,
tier = @tier ,
lane = @lane ,
Marker_No = @Marker_No ,
Value = @Value ,
Sample_No = @Sample_No

where MapIDP_No = @MapIDP_No
Commit Transaction
go

Procedure sp_Update_MapRFLP

Name: sp_Update_MapRFLP
Code: sp_Update_MapRFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_MapRFLP

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Enzyme_No int ,
@Locus_No int ,
@Probe_No int ,
@Value char(1) ,
@Sample_No int

As
Begin Transaction
update MapRFLP
set Value = @Value

where Sample_No = @Sample_No and Probe_No = @Probe_No and Locus_No = @Locus_No and Enzyme_No = @Enzyme_No

Commit Transaction
go

Procedure sp_Update_MapSNP

Name: sp_Update_MapSNP
Code: sp_Update_MapSNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_MapSNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSNP_No int,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@Sample_No int

As
Begin Transaction
update MapSNP
set gel = @gel ,
tier = @tier ,
lane = @lane ,
Marker_No = @Marker_No ,
Value = @Value ,
Sample_No = @Sample_No

where MapSNP_No = @MapSNP_No
Commit Transaction
go

Procedure sp_Update_MapSNP_Value

Name: sp_Update_MapSNP_Value
Code: sp_Update_MapSNP_Value
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_MapSNP_Value

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@Sample_No int

As
Begin Transaction
update MapSNP
set Value = @Value
where Marker_No = @Marker_No and Sample_No = @Sample_No and gel = @gel and tier = @tier and lane = @lane
Commit Transaction
go

Procedure sp_Update_MapSSR

Name: sp_Update_MapSSR
Code: sp_Update_MapSSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_MapSSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@MapSSR_No int,
@gel char(1) ,
@tier varchar(2) ,
@lane int ,
@Marker_No int ,
@Value char(1) ,
@Sample_No int

As
Begin Transaction
update MapSSR
set gel = @gel ,
tier = @tier ,
lane = @lane ,
Marker_No = @Marker_No ,
Value = @Value ,
Sample_No = @Sample_No

where MapSSR_No = @MapSSR_No
Commit Transaction
go

Procedure sp_Update_PlateLayout

Name: sp_Update_PlateLayout
Code: sp_Update_PlateLayout
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_PlateLayout

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@PlateLayoutID integer ,
@PlateType nvarchar(3) ,
@TemplateID nvarchar(10) ,
@PositionNos integer ,
@Orientation nvarchar(60) ,
@TemplateName nvarchar(50) ,
@Locked char(1) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update PlateLayout
set PlateType = @PlateType,
TemplateID = @TemplateID,
PositionNos = @PositionNos,
Orientation = @Orientation,
TemplateName = @TemplateName,
Locked = @Locked,
Person = @Person,
Date_Updated = @Date_Updated
where PlateLayoutID = @PlateLayoutID
Commit Transaction
go

Procedure sp_Update_Population

Name: sp_Update_Population
Code: sp_Update_Population
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Population;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Pop_No integer ,
@Pop_Name nvarchar(20) ,
@Pop_Comment nvarchar(100) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)



As
Begin Transaction

select @Date_Updated = GETDATE()

update Populations
set Pop_No = @Pop_No ,
Pop_Name = @Pop_Name ,
Pop_Comment = @Pop_Comment,
Date_Updated = @Date_Updated,
Person = @Person
where Pop_No = @Pop_No
Commit Transaction
go

Procedure sp_Update_Primer_Comment

Name: sp_Update_Primer_Comment
Code: sp_Update_Primer_Comment
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Primer_Comment;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Comment nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Primer_Comment = @Primer_Comment,
Date_Updated = @Date_Updated,
Person = @Person
where Marker_No = @Primer_No
Commit Transaction
go

Procedure sp_Update_Primer_CommReg

Name: sp_Update_Primer_CommReg
Code: sp_Update_Primer_CommReg
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Primer_CommReg;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Comment nvarchar(100) ,
@Person nvarchar(20) ,
@Registered char(1) ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Primer_Comment = @Primer_Comment,
Registered = @Registered,
Date_Updated = @Date_Updated,
Person = @Person
where Marker_No = @Primer_No
Commit Transaction
go

Procedure sp_Update_Primer_Name

Name: sp_Update_Primer_Name
Code: sp_Update_Primer_Name
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Primer_Name;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Name nvarchar(20) ,
@Person nvarchar(20) ,
@Date_Updated datetime = NULL ,
@Registered char(1) ,
@Scores integer

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Primer_Name = @Primer_Name ,
Person = @Person,
Date_Updated = @Date_Updated,
Registered = @Registered,
Scored = @Scores
where Marker_No = @Primer_No

Commit Transaction
go

Procedure sp_Update_Primers

Name: sp_Update_Primers
Code: sp_Update_Primers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Primers;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Name nvarchar(20) ,
@Primer_Comment nvarchar(100) ,
@Bank_Acc_No nvarchar(20) ,
@Map_Maker_No integer ,
@Chromosome integer ,
@Bin float ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Registered char(1) ,
@Primer_Type char(1)

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Primer_Name = @Primer_Name ,
Primer_Comment = @Primer_Comment,
Person = @Person,
Date_Updated = @Date_Updated,
Bank_Acc_No = @Bank_Acc_No,
Map_Maker_No = @Map_Maker_No,
Chromosome = @Chromosome,
Bin = @Bin,
Registered = @Registered,
Primer_Type = @Primer_Type
where Marker_No = @Primer_No
Commit Transaction
go

Procedure sp_Update_Primers_Info

Name: sp_Update_Primers_Info
Code: sp_Update_Primers_Info
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Primers_Info

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Primer_No integer ,
@Primer_Name nvarchar(20) ,
@Primer_Comment nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Registered char(1) ,
@Scores integer

As
Begin Transaction

select @Date_Updated = GETDATE()

update Primers
set Primer_Name = @Primer_Name ,
Primer_Comment = @Primer_Comment,
Person = @Person,
Date_Updated = @Date_Updated,
Registered = @Registered,
Scored = @Scores
where Marker_No = @Primer_No

Commit Transaction
go

Procedure sp_Update_Probe

Name: sp_Update_Probe
Code: sp_Update_Probe
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Probe;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Probe_No integer ,
@Probe_Name nvarchar(20) ,
@Probe_Comment nvarchar(100) ,
@Bank_Acc_No nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20)

As
Begin Transaction

select @Date_Updated = GETDATE()

update Probes
set Probe_Name = @Probe_Name ,
Probe_Comment = @Probe_Comment,
Bank_Acc_No = @Bank_Acc_No,
Person = @Person,
Date_Updated = @Date_Updated
where Probe_No = @Probe_No
Commit Transaction
go

Procedure sp_Update_Sample_Populated

Name: sp_Update_Sample_Populated
Code: sp_Update_Sample_Populated
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Sample_Populated;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer ,
@Person nvarchar(20) ,
@Populated char(1) ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update Samples
set Populated = @Populated ,
Person = @Person,
Date_Updated = @Date_Updated
where Sample_No = @Sample_No
Commit Transaction
go

Procedure sp_Update_Samples

Name: sp_Update_Samples
Code: sp_Update_Samples
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Samples;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Sample_No integer ,
@Sample_Name nvarchar(10) ,
@Sample_Comments nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update Samples
set Sample_Name = @Sample_Name ,
Sample_Comments = @Sample_Comments,
Person = @Person,
Date_Updated = @Date_Updated
where Sample_No = @Sample_No
Commit Transaction
go

Procedure sp_Update_SequencePrimers

Name: sp_Update_SequencePrimers
Code: sp_Update_SequencePrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_SequencePrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@DBID integer ,
@sequence nvarchar(25) = NULL,
@TIFfiles nvarchar(12) ,
@CommentsSeq nvarchar(50) ,
@ABIFilesF nvarchar(25) ,
@ABIFilesR nvarchar(25) ,
@Editing nvarchar(25) ,
@Consensus nvarchar(255) ,
@PrimerDesign integer

As
Begin Transaction


update newTable
set TIFfiles = @TIFfiles,
CommentsSeq = @CommentsSeq,
ABIFilesF = @ABIFilesF,
ABIFilesR = @ABIFilesR,
Editing = @Editing,
Consensus = @Consensus,
PrimerDesign = @PrimerDesign
where DBID = @DBID
Commit Transaction
go

Procedure sp_Update_SNP_Color1

Name: sp_Update_SNP_Color1
Code: sp_Update_SNP_Color1
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_SNP_Color1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer ,
@SNP_P1 nvarchar(4)
AS

Begin Transaction


Update SNP_Template

set SNP_P1 = @SNP_P1

where SNP_TemplateID = @SNP_TemplateID


Commit Transaction
go

Procedure sp_Update_SNP_Color2

Name: sp_Update_SNP_Color2
Code: sp_Update_SNP_Color2
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_SNP_Color2

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer ,
@SNP_P2 nvarchar(4)
AS

Begin Transaction


Update SNP_Template

set SNP_P2 = @SNP_P2

where SNP_TemplateID = @SNP_TemplateID


Commit Transaction
go

Procedure sp_Update_SNP_Colors

Name: sp_Update_SNP_Colors
Code: sp_Update_SNP_Colors
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_SNP_Colors

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@SNP_TemplateID integer ,
@SNP_Color nvarchar(10) ,
@SNP_Place integer


As
Begin Transaction


Update SNP_Colors

set SNP_Color = @SNP_Color ,
SNP_Place = @SNP_Place

where SNP_TemplateID = @SNP_TemplateID and SNP_Place = @SNP_Place


Commit Transaction
go

Procedure sp_Update_SNP_Template

Name: sp_Update_SNP_Template
Code: sp_Update_SNP_Template
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_SNP_Template

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@SNP_TemplateID integer ,
@SNP_Name nvarchar(20) ,
@SNP_ColorP1 nvarchar(10) ,
@SNP_bPairP1 integer ,
@SNP_ColorP2 nvarchar(10) ,
@SNP_bPairP2 integer ,
@SNP_JoinP1 nvarchar(10) ,
@SNP_JoinP2 nvarchar(10) ,
@SNP_Comment nvarchar(40)


As
Begin Transaction


Update SNP_Template

set SNP_Name = @SNP_Name ,
SNP_ColorP1 = @SNP_ColorP1 ,
SNP_bPairP1 = @SNP_bPairP1 ,
SNP_ColorP2 = @SNP_ColorP2 ,
SNP_bPairP2 = @SNP_bPairP2 ,
SNP_JoinP1 = @SNP_JoinP1 ,
SNP_JoinP2 = @SNP_JoinP2 ,
SNP_Comment = @SNP_Comment

where SNP_TemplateID = @SNP_TemplateID


Commit Transaction
go

Procedure sp_Update_Stocks

Name: sp_Update_Stocks
Code: sp_Update_Stocks
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_Stocks

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Stock_ID integer ,
@Stock_Name nvarchar(10) ,
@Stock_Comments nvarchar(100) ,
@Person nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL

As
Begin Transaction

select @Date_Updated = GETDATE()

update Stocks
set Stock_Name = @Stock_Name ,
Stock_Comments = @Stock_Comments,
Person = @Person,
Date_Updated = @Date_Updated
where Stock_ID = @Stock_ID
Commit Transaction
go

Procedure sp_Update_UMCMAX

Name: sp_Update_UMCMAX
Code: sp_Update_UMCMAX
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_UMCMAX

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@UMCID integer ,
@UMCDes integer

As
Begin Transaction

update UMCMAX
set UMCDes = @UMCDes
where UMCID = @UMCID

Commit Transaction
go

Procedure sp_Update_UmcssrNumberPrimers

Name: sp_Update_UmcssrNumberPrimers
Code: sp_Update_UmcssrNumberPrimers
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_UmcssrNumberPrimers

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@DBID integer ,
@sequence nvarchar(25) = NULL,
@bin dec(10,2) ,
@secondbin dec(10,2) ,
@comments nvarchar(20) ,
@umcdesignation nvarchar(7) ,
@GenBanknumber nvarchar(8) ,
@RepeatUnit nvarchar(40) ,
@RepeatType integer ,
@Length integer ,
@OrderofIndividuals nvarchar(255)

As
Begin Transaction


update newTable
set bin = @bin,
secondbin = @secondbin,
comments = @comments,
GenBanknumber = @GenBanknumber,
RepeatUnit = @RepeatUnit,
RepeatType = @RepeatType,
Length = @Length,
OrderofIndividuals = @OrderofIndividuals
where DBID = @DBID
Commit Transaction
go

Procedure sp_Update_User

Name: sp_Update_User
Code: sp_Update_User
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Update_User;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@User_ID integer ,
@User_Name nvarchar(20) ,
@Date_Created datetime = NULL ,
@Date_Updated datetime = NULL ,
@Person nvarchar(20) ,
@First_Name nvarchar(30) ,
@Last_Name nvarchar(30) ,
@Institution nvarchar(60) ,
@Email nvarchar(60) ,
@Street nvarchar(100) ,
@City nvarchar(60) ,
@State nvarchar(2) ,
@Zip nvarchar(12) ,
@Country nvarchar(30) ,
@Phone nvarchar(30) ,
@Fax nvarchar(30) ,
@User_Type char


As
Begin Transaction

select @Date_Updated = GETDATE()

update Users
set User_Name = @User_Name ,
Person = @Person,
Date_Updated = @Date_Updated ,
First_Name = @First_Name ,
Last_Name = @Last_Name ,
Institution = @Institution ,
Email = @Email ,
Street = @Street ,
City = @City ,
State = @State ,
Zip = @Zip ,
Country = @Country ,
Phone = @Phone ,
Fax = @Fax ,
User_Type = @User_Type
where User_ID = @User_ID

Commit Transaction
go

Procedure sp_Write_MapMaker_IDP

Name: sp_Write_MapMaker_IDP
Code: sp_Write_MapMaker_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_MapMaker_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN
insert into MapMaker_IDP (Sample_No, Primer_Name, Value)
select Sample_No, Primer_Name, Value
from MapIDP, Primers
where MapIDP.Marker_No = Primers.Marker_No and Sample_No < 361 and Primer_Name LIKE "*%"
order by Primer_Name, Sample_No

END
go

Procedure sp_Write_MapMaker_RFLP

Name: sp_Write_MapMaker_RFLP
Code: sp_Write_MapMaker_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_MapMaker_RFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
insert into MapMaker_RFLP (Sample_No, Locus_Name, Value)
select distinct MapRFLP.Sample_No, Locus_Name, Value
from MapRFLP, Locus
where MapRFLP.Locus_No = Locus.Locus_No and Locus_Name LIKE "*%"
order by MapRFLP.Probe_No, MapRFLP.Locus_No, MapRFLP.Sample_No

END
go

Procedure sp_Write_MapMaker_SNP

Name: sp_Write_MapMaker_SNP
Code: sp_Write_MapMaker_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_MapMaker_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS


BEGIN
insert into MapMaker_SNP (Sample_No, Primer_Name, Value)
select Sample_No, Primer_Name, Value
from MapSNP, Primers
where MapSNP.Marker_No = Primers.Marker_No and Sample_No < 361 and Primer_Name LIKE "*%"
order by Primer_Name, Sample_No

END
go

Procedure sp_Write_MapMaker_SSR

Name: sp_Write_MapMaker_SSR
Code: sp_Write_MapMaker_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_MapMaker_SSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN
insert into MapMaker_SSR (Sample_No, Primer_Name, Value)
select Sample_No, Primer_Name, Value
from MapSSR, Primers
where MapSSR.Marker_No = Primers.Marker_No and Sample_No < 361 and Primer_Name LIKE "*%"
order by Primer_Name, Sample_No

END
go

Procedure sp_Write_SamplesPrimers_IDP

Name: sp_Write_SamplesPrimers_IDP
Code: sp_Write_SamplesPrimers_IDP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_SamplesPrimers_IDP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
insert into MapMaker_IDP (Sample_No, Primer_Name, Value)
select Sample_Groups.Sample_No, Primer_Name, Value
from Sample_Groups, Primer_Groups, MapIDP, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapIDP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapIDP.Marker_No and
MapIDP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapIDP.Sample_No < 361

END
go

Procedure sp_Write_SamplesPrimers_RFLP

Name: sp_Write_SamplesPrimers_RFLP
Code: sp_Write_SamplesPrimers_RFLP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_SamplesPrimers_RFLP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Group_No integer

AS

BEGIN
insert into MapMaker_RFLP (Sample_No, Locus_Name, Value)
select MapRFLP.Sample_No, Locus_Name, Value         
from Sample_Groups, Locus_Groups, MapRFLP, Locus
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapRFLP.Sample_No and
Locus_Groups.Group_No = @Group_No and Locus_Groups.Locus_No = MapRFLP.Locus_No and
MapRFLP.Locus_No = Locus.Locus_No and Locus_Name Like "*%" and MapRFLP.Sample_No < 361

END
go

Procedure sp_Write_SamplesPrimers_SNP

Name: sp_Write_SamplesPrimers_SNP
Code: sp_Write_SamplesPrimers_SNP
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_SamplesPrimers_SNP;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

@Group_No integer

AS

BEGIN
insert into MapMaker_SNP (Sample_No, Primer_Name, Value)
select Sample_Groups.Sample_No, Primer_Name, Value
from Sample_Groups, Primer_Groups, MapSNP, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSNP.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSNP.Marker_No and
MapSNP.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapSNP.Sample_No < 361

END
go

Procedure sp_Write_SamplesPrimers_SSR

Name: sp_Write_SamplesPrimers_SSR
Code: sp_Write_SamplesPrimers_SSR
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_SamplesPrimers_SSR;1

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */


@Group_No integer

AS

BEGIN
insert into MapMaker_SSR (Sample_No, Primer_Name, Value)
select Sample_Groups.Sample_No, Primer_Name, Value
from Sample_Groups, Primer_Groups, MapSSR, Primers
where Sample_Groups.Group_No = @Group_No and Sample_Groups.Sample_No = MapSSR.Sample_No and
Primer_Groups.Group_No = @Group_No and Primer_Groups.Marker_No = MapSSR.Marker_No and
MapSSR.Marker_No = Primers.Marker_No and Primer_Name LIKE "*%" and MapSSR.Sample_No < 361

END
go

Procedure sp_Write_To_SSRUMC

Name: sp_Write_To_SSRUMC
Code: sp_Write_To_SSRUMC
Label:
Type: Procedure

Code

CREATE PROCEDURE dbo.sp_Write_To_SSRUMC

/* Author. Hector Sanchez Villeda
* Institution. University of Missouri-Columbia
* Missouri Maize Project
* Version : 1.0 (2001)
* Copyright 2001 University of Missouri-Columbia. */

AS

BEGIN

insert into SSRUMC
select convert(char,DBID), sequence, umcdesignation, GenBanknumber, image + ".tif" + "/" + lanetier, convert(char,convert(numeric(5,2),bin)), convert(char,convert(numeric(5,2),secondbin)), "(" + RepeatUnit + ")" + convert(char,Length), Forwardprimerseq, convert(char,convert(numeric(5,2),TmFor)), Reverseprimerseq, convert(char,convert(numeric(5,2),TmRev)), convert(char,convert(numeric(5,0),RefAlleleSize))
from newTable
where umcdesignation <> NULL


END
go



Home Page - Previous page