Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread C;loning functions from disk to memory
Tue, Jun 15 2010 2:15 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

A small script to allow functions that are defined for an on-disk database to be cloned into the in-memory one. To restrict it to certain functions only specify a list in the form 'f1','f2' etc as Only

SCRIPT (IN SrcDB VARCHAR, IN Only VARCHAR)
BEGIN

DECLARE Source CURSOR FOR Selector;
DECLARE Creator VARCHAR;  
DECLARE SelSQL VARCHAR;

SET SelSQL = 'SELECT Definition FROM '
            + SrcDB
            + '.Information.Functions WHERE NAME NOT IN (SELECT Name FROM Information.Functions)';
IF (Only IS NOT NULL) AND (Only <> '') THEN
SET SelSQL = SelSQL + ' AND Name IN (' + Only + ')';
END IF;

PREPARE Selector FROM SelSQL;

OPEN Source;

FETCH FIRST FROM Source(Definition) INTO Creator;

WHILE NOT EOF(Source) DO
IF (Creator IS NOT NULL) AND (Creator <> '') THEN
 EXECUTE IMMEDIATE 'CREATE '+ Creator;
END IF;
FETCH NEXT FROM Source(Definition) INTO Creator;
END WHILE;

END


Roy Lambert
Fri, Jun 18 2010 2:22 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

MM A small script to allow functions that are defined for an on-disk
database to be cloned into the in-memory one. To restrict it to certain
functions only specify a list in the form 'f1','f2' etc as Only >>

Nice. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com
Sat, Jun 19 2010 3:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


I only write these things because I'm lazy.

Roy Lambert
Mon, Jun 21 2010 4:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I only write these things because I'm lazy. >>

That's why I automate everything short of answering emails here. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com
Image