Jump to content

Choose only the exist parameter


mariog36

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 Hi

I have 6 parameters, maybe more than 1 is used for the search, and I undesrstand that $!P{param} is used for an optional parameter right? if thats the case, I think the query is this:

select serie as serie,

nombre as nombre,

tipo_documento as tipo,

rfc_emisor as rfc,

status as status,

extra17 as ed,

sum(totalmn) as total,

impuesto as impuesto,

folio as folio,

fecha as fecha

 from table

where fecha between $P{fechaIni} and $P{fechaFin}

and nombre like $P{nombre}

or rfc_emisor like $P{rfc}

or extra17 like $P{extra}

or tipo_documento like $P{tipo}

or status like $P{status}

or serie like $P{serie}

group by rfc_emisor, tipo_documento

 

Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...