I have data in a MSSQL table (TableB) where [dbo].tableB.myColumn changes format after a certain date...
I'm doing a simple Join to that table..
Select [dbo].tableB.theColumnINeed from [dbo].tableA
left outer join [dbo].tableB on [dbo].tableA.myColumn = [dbo].tableB.myColumn
However, I need to join, using different formatting, based on a date column in Table A ([dbo].tableA.myDateColumn).
Something like...
Select [dbo].tableB.theColumnINeed from [dbo].tableA
left outer join [dbo].tableB on [dbo].tableA.myColumn =
IF [dbo].tableA.myDateColumn > '1/1/2009'
BEGIN
FormatColumnOneWay([dbo].tableB.myColumn)
END
ELSE
BEGIN
FormatColumnAnotherWay([dbo].tableB.myColumn)
END
I'm wondering if there's a way to do this.. or a better way I'm not thinking of to approach this..