Compile function Delete_FISCAL_YR_Record_From_SQL(Connection, Key, Record)

/*****************************************************************************\
	Deletes the given FISCAL_YR record from the MSSQL database.
	
	History
	-------
	09/21/2010    KRF   Original Programmer
\*****************************************************************************/

Declare function SQL_Delete, SQL_Format
Ans = ""
				    
// List of key names and their values
Keys = "FISCAL_YR":@VM:SQL_Format(Key, "INT")

//-------------------------------------------------------------------------------------------------
// Multi-valued Fields

!! Delete records from MV tables first !!

// FISCAL_YR_FISCAL_QTR
If Ans EQ "" then
    Ans = SQL_Delete(Connection, "FISCAL_YR_FISCAL_QTR", Keys)
end

// FISCAL_YR
If Ans EQ "" then
    Ans = SQL_Delete(Connection, "FISCAL_YR", Keys)
end

Return Ans
