added LSL2 stored procedures
This commit is contained in:
42
LSL2/STPROC/DELETE_NAMES_RECORD_FROM_SQL.txt
Normal file
42
LSL2/STPROC/DELETE_NAMES_RECORD_FROM_SQL.txt
Normal file
@ -0,0 +1,42 @@
|
||||
Compile function Delete_NAMES_Record_From_SQL(Connection, Key, Record)
|
||||
|
||||
/*****************************************************************************\
|
||||
Deletes the given NAMES 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 = "SEQ":@VM:SQL_Format(Key, "INT")
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// Multi-valued Fields
|
||||
|
||||
!! Delete records from MV tables first !!
|
||||
|
||||
// NAMES_MAILER_DETAILS
|
||||
If Ans EQ "" then
|
||||
Ans = SQL_Delete(Connection, "NAMES_MAILER_DETAILS", Keys)
|
||||
end
|
||||
|
||||
// NAMES_INTL_PHONES
|
||||
If Ans EQ "" then
|
||||
Ans = SQL_Delete(Connection, "NAMES_INTL_PHONES", Keys)
|
||||
end
|
||||
|
||||
// NAMES_PHONES
|
||||
If Ans EQ "" then
|
||||
Ans = SQL_Delete(Connection, "NAMES_PHONES", Keys)
|
||||
end
|
||||
|
||||
// NAMES
|
||||
If Ans EQ "" then
|
||||
Ans = SQL_Delete(Connection, "NAMES", Keys)
|
||||
end
|
||||
|
||||
Return Ans
|
Reference in New Issue
Block a user