building query with calculated field as parameter -

i need creating query give me results "wo" , "pm" tables example "result" table in attached image.
my conditions are:
wo.status not 'comp' pm.type = 'eqpm' pm.status = 'act' pm.siteid= @siteid (parameter) the "realdate" field reports "wo.schedstart" if available, , if not reports "pm.nextdate". make "realdate" field parameter.
thanks
Comments
Post a Comment