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