working with sql text expressions

still need to figure out the date issues