[firebase-br] Order by vari?vel em SP
    Rider of the storm 
    sidoncd em gmail.com
       
    Seg Maio  7 20:32:57 -03 2007
    
    
  
"Denis" <denisrocha em hotmail.com> escreveu na 
mensagem news:f1o3fk$pva$1 em sea.gmane.org...
> Faça assim .....
>
> ....  ||   '''' || :data_inicial || '''' || ....
>
> Colocando 4 aspas simples.
Veja se voce consegue me ajudar mais uma vez:
Esta SQL :
    select rv.numnf, rv.codigo_cliente from resumovendas rv
    where (emissao_nf between '2007-01-01' and '2007-05-07')
    and (rv.status=coalesce(:filtro_status,rv.status)) order by 1
Funciona legal, se filtro_status for null então os registros não serão 
filtrado pelo campo rv.status
Quando monto assim:
     'where
      (rv.emissao_nf between ' || '''' || :data_inicial || '''' || ' and ' 
||
       '''' || :data_final || '''' ||') and
       (rv.status=coalesce(:filtro_status,rv.status)) order by 1' ;
Montei em uma variavel e vi que fica identica mas quando executo ocorre o 
erro:
Column does not belong to referenced table.
Column unknown
FILTRO_STATUS 
    
    
Mais detalhes sobre a lista de discussão lista