Script en PowerBuilder
Hola, estoy creando en PB 11.5 una función pero al ir a grabarla me arroja el error C0031: Syntax Error.
Le llevo dando vueltas un par de horas y no logro ver el error
¿Alguien podría ayudarme? Gracias
La función es la siguiente
string OLBC,OLBG,OFBC,OFBG, cadena = ""
integer existe=0
existe = (select count (BudgetCodeID) from orderform inner join orderline on orderform.orderid = orderline.orderid where orderform.OrderID = :ll_OrderId and orderline.OrderLineNo <> 1 and OrderLine.Status <>3 and orderline.budgetcodeid is not null)
if existe >= 1 then
select budgetcode.code, BudgetGroup.code into :OLBC,:OLBG from orderform
inner join OrderLine on orderform.orderid = orderline.orderid
inner join budgetcode on orderline.budgetcodeid=budgetcode.budgetcodeid
inner join budgetcodedef on budgetcode.budgetcodedefid=budgetcodedef.budgetcodedefid
inner join budgetgroup on budgetcodedef.budgetgroupid=budgetgroup.budgetgroupid
where (orderform.orderid = :ll_OrderID);
cadena = OLBC + " // " + OLBG
else
select BudgetCode.code, BudgetGroup.code into :OFBC,:OFBG from orderform
inner join budgetcode on orderform.budgetcodeid=budgetcode.budgetcodeid
inner join budgetcodedef on budgetcode.budgetcodedefid=budgetcodedef.budgetcodedefid
inner join budgetgroup on budgetcodedef.budgetgroupid=budgetgroup.budgetgroupid
where (orderform.orderid = :ll_OrderID);
cadena = OFBC + " // " + OFBG
end if
return cadena
Le llevo dando vueltas un par de horas y no logro ver el error
¿Alguien podría ayudarme? Gracias
La función es la siguiente
string OLBC,OLBG,OFBC,OFBG, cadena = ""
integer existe=0
existe = (select count (BudgetCodeID) from orderform inner join orderline on orderform.orderid = orderline.orderid where orderform.OrderID = :ll_OrderId and orderline.OrderLineNo <> 1 and OrderLine.Status <>3 and orderline.budgetcodeid is not null)
if existe >= 1 then
select budgetcode.code, BudgetGroup.code into :OLBC,:OLBG from orderform
inner join OrderLine on orderform.orderid = orderline.orderid
inner join budgetcode on orderline.budgetcodeid=budgetcode.budgetcodeid
inner join budgetcodedef on budgetcode.budgetcodedefid=budgetcodedef.budgetcodedefid
inner join budgetgroup on budgetcodedef.budgetgroupid=budgetgroup.budgetgroupid
where (orderform.orderid = :ll_OrderID);
cadena = OLBC + " // " + OLBG
else
select BudgetCode.code, BudgetGroup.code into :OFBC,:OFBG from orderform
inner join budgetcode on orderform.budgetcodeid=budgetcode.budgetcodeid
inner join budgetcodedef on budgetcode.budgetcodedefid=budgetcodedef.budgetcodedefid
inner join budgetgroup on budgetcodedef.budgetgroupid=budgetgroup.budgetgroupid
where (orderform.orderid = :ll_OrderID);
cadena = OFBC + " // " + OFBG
end if
return cadena
Respuesta de achafio
1