Hello, I'm Erwin. I'm a Web Developer.
See my little experiences on my blog.

Make Dynamic Query

Posted: February 27th, 2010 | Author: erwin | Filed under: SQL | Tags: | 1 Comment »

This is about coding technique. I found this technique when I working as Application Specialist on my current office. First I feel crazy when I found this code, because I never found it before. I’ll share it for you. It’s useful to use in complex application.

First you must have table called “systable”. Systable containt 4 columns.

  • ctbltype=for unique key of parameters–>char(2)
  • ctblcode=more specific key from ctbltype–>char(2)
  • cdesc=first paramater–>char(40)
  • cdesc2=second paramater–>char(40)

Example:

Read the rest of this entry »