To define a variable that is visible in the script you can use the command:
DECLARE (in sqlserver): type is specified, it is NULL, then be initialized with SET or the result of a query
DEFINE (in oracle): the variable is initialized with a text (not defined char or varchar, only replace this text which use the variable).
In Oracle you can run the script from SQL * Plus as
sta c: \ misscripts \ testeoBMS.sql
sta c: \ misscripts \ testeoBMS.sql
In SqlServer opens the script with query analyzer and run.
Hope you practical.
/ * Script sqlserver to see results of a run of KBToolsWS * /
Int DECLARE @ vOpeNro
/ * Number of last operation * /
set @ vOpeNro = (select max (OpenROSA) from Ope)
/ * Can change this variable hand for another transaction number * /
/ * Set @ vOpeNro = 32 * /
/ * Operation * /
select * from operating WHERE = @ vOpeNro OpenROSA
/ * KBSistemas last operation * /
select * from WHERE opekbs OpenROSA = @ vOpeNro
/ * For testing Oracle Script ------------------ ------- ------------------- ---*/
clear screen
September feedback on
defined vruta = 99
defined vName = 'test Route 99'
Dress define = 'I'
defined vFecha = sysdate
vusuario = user defined
bmsrutas insert into values ('& vRUTA', '& vName', '& dressed', & vFECHA, '& vUSUARIO');
select LINESYS, LineNumber, LINENAME, CREATOR, CreateDate, Updator, UpdateData, CHAINAGEFROM
WHERE bms.line from linenumber like '& vruta%';
September feedback on
defined vruta = 99
defined vName = 'test Route 99'
Dress define = 'I'
defined vFecha = sysdate
vusuario = user defined
bmsrutas insert into values ('& vRUTA', '& vName', '& dressed', & vFECHA, '& vUSUARIO');
select LINESYS, LineNumber, LINENAME, CREATOR, CreateDate, Updator, UpdateData, CHAINAGEFROM
WHERE bms.line from linenumber like '& vruta%';
0 comments:
Post a Comment