extract data using TDSquery and example