Posts by rafaedez • 41 points
4 posts
-
1
votes1
answer1111
viewsA: Modeling database table
Create a table that contains all fields of all groups, realize that there is ICMS90 with all fields, which is just in case there is an exception. Then create your ICMS tax table based on ICMS90…
-
1
votes1
answer50
viewsA: Search Records with Latest Date Using Condition
Coalesce can solve: SELECT fm.FIELDCODE, fm.BLOCK_CODE, bl.BLOCK_DESC, cat.CATEGORY_CODE, cat.CATEGORY_ABBREV, fm.FIELD_AREA, fm.PLANTATION_DATE, fm.HARVEST_END_DATE FROM FM_BLOCK bl,…
-
1
votes3
answers2181
views -
1
votes2
answers1032
viewsA: Bring all records if parameter is different
Use the "coalesce" (default in all sql databases) to save a "or" in case your parameter comes null as well. SELECT * FROM Contrato WHERE completed = parameter or coalesce(:parameter,-1) not in (0,…