Subject | Variable column in SELECT. |
---|---|
Author | fsorianop2006 |
Post date | 2006-06-24T18:40:52Z |
Hi,
Can I use a variable in a SELECT statement in a store procedure?
for example:
declare variable campo varchar(20);
declare variable valor varchar(40);
begin
campo = 'telefono';
select :campo from tabla into :valor;
//expecting to have:
// select telefono from tabla into :valor;
end
It is like the macrosubstitution in visual foxpro with the &
character.
Please let me know,
Fernando Soriano
soporte@...
Can I use a variable in a SELECT statement in a store procedure?
for example:
declare variable campo varchar(20);
declare variable valor varchar(40);
begin
campo = 'telefono';
select :campo from tabla into :valor;
//expecting to have:
// select telefono from tabla into :valor;
end
It is like the macrosubstitution in visual foxpro with the &
character.
Please let me know,
Fernando Soriano
soporte@...