SQL query help
Posted on 2011-03-15
I need to create a dataset from a query to show me what the last non blank value in 5 fields within a record. The fields are TID1, TID2, TID3, TID4 and TID5.
They will be populated in this way - either just the the first one, the first 2, first 3, first 4 or all 5. There are never any gaps so I so only need to return the last non-blank value.
TID1 TID2 TID3 TID4 TID5
14 232 244 (this sholod return 244)
13 231 (this should return 231)
12 238 238 256 (this should return 256)
14 237 250 279 410 (this should return 410)
Hope I have explained this well enough.