Fórum Parâmetro de Entrada em Stored Procedure #52722
12/09/2005
0
Select NOME from CLIENTES where CLIENTE_ID not in (:PARAMETRO) into :CLIENTE_NOME;
tentei criando PARAMETRO como sendo VARCHAR mas não deu certo, alguém teria alguma dica?
Steve_narancic
Curtir tópico
+ 0Posts
12/09/2005
_rodfaria_
TListaCodigos = array of integer; ... function MontaSQLIn(campo:string;lista:TListaCodigos):string; var i:integer; begin if length(lista) = 0 then exit; Result:=campo+´ not in (´; for i:=0 to length(lista)-1 do begin if i<>0 then Result:=Result+´,´; Result:=Result+inttostr(lista[i]); end; Result:=Result+´)´; end; ... sql:=´select ... where ´+MontaSQLIn(´CLIENTE_ID´,um_array_vindo_de_alguma_funcao);
Rod.
Gostei + 0
12/09/2005
Steve_narancic
Gostei + 0
12/09/2005
Afarias
existem entratanto, dependendo do caso, formas diferentes de implementar algo com resultado semelhante.
T+
Gostei + 0
16/05/2006
Sremulador
quais seriam elas...
Gostei + 0
24/05/2006
Sremulador
Gostei + 0
25/05/2006
Emerson Nascimento
Gostei + 0
30/05/2006
Sremulador
Gostei + 0
08/06/2006
Martins
Gostei + 0
08/06/2006
Thomaz_prg
Dêem uma olhada no post http://forum.devmedia.com.br/viewtopic.php?t=73564
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)