Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Extensions » View Thread |
Messages 1 to 2 of 2 total |
TableVersion function |
Sun, May 25 2008 2:05 AM | Permanent Link |
"David Cornelius" | After some questions in a thread under elevatedb.sql named "table
version and updates", I decided to post the TableVersion function here. It comes in quite handy when wanting to update a customer's database and you need to query their current version of a table to decide how which set of ALTER statements to execute. Here it is for your EDB library: CREATE FUNCTION "TableVersion" (IN "TableName" VARCHAR COLLATE ANSI) RETURNS FLOAT BEGIN DECLARE VerCursor CURSOR FOR VerStmt; DECLARE Ver FLOAT; PREPARE VerStmt FROM 'SELECT Version FROM Information.Tables WHERE Name = '''' + TableName + '''''; OPEN VerCursor; FETCH FIRST FROM VerCursor (Version) INTO Ver; CLOSE VerCursor; UNPREPARE VerStmt; RETURN Ver; END -- David Cornelius CorneliusConcepts.com custom designed software |
Sun, May 25 2008 12:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |