Hey Guys,
I'm working in a script to run via JDBC and I want to use the command to declare a variable.
Ex.:
declare @cdn_funcionario int;
set @cdn_funcionario = ( select top 1 cdn_funcionario from PUB.hcm_int_success_evento where idIntegracao = '4066');
But I have a doubt if Progress JDBC recognizes the command "declare".
Could you help me?
Sorry [mention:43713cf888d84bdcb3637e465ffa1de6:e9ed411860ed4f2ba0265705b8793d05] !
I'm using JDBC driver from OpenEdge 10.2B and SQL Language in Squirell only to debug the code.
Rodrigo,
According to this KB, the DECLARE keyword should indeed work...
Thank you [mention:f501aa1c6ec240a7ae42d7a5ab50ee2a:e9ed411860ed4f2ba0265705b8793d05] but I think DECLARE is not supported in JDBC.
Look: knowledgebase.progress.com/.../Is-it-possible-to-declare-a-variable-using-the-OpenEdge-SQL-language
That has really nothing to do with JDBC but with the SQL standard supported by the database vendor, ‘declare’ as in declare variable is a ‘procedural language’ thing (pl-sql, transact sql) and has nothing to do with the SQL standard hence not supported by OE SQL engine… we have the good old 4gl for that ;)