例如,如果monthofservice列有199012,那么我希望servicedate列以1990-12-01年-mm-date格式显示/加载数据。我希望日期是默认为01的所有时间。我确信有更好的方法来编写代码,并且在monthofservice列为NULL时将servicedate显示为NULL。任何帮助都是非常感谢的!AS VARCHAR (10)) AS servicedate
FROM transaction 注:事务表中不存在Servicedate列,所以我使用事务中的monthofservic