SELECT CTNPRESCTNREF CTNPRESCTNNO DCTNRECRSUCD CTNPRESINYARD AS YARD DCTNRECESTNO CTNPRESCTNLOC CTNPRESCTNOPE DCTNRECWWLB DCTNRECOPECFCD DCTNRECREPEDDT CASE CTNPRESREMARK WHEN AV THEN SELECT TOP 1 JBP
This SQL query selects various fields from the CTNPRES and DCTNREC tables, including CTNREF, CTNNO, RSUCD, INYARD, ESTNO, CTNLOC, CTNOPE, WWLB, OPECFCD, REPEDDT, and DT. It joins the two tables on the CTNREF field and filters the results based on certain conditions including SURPCACD, OWNCFCD, REPEDDT, and CTNNO. The results are then ordered by REPEDDT in descending order.
原文地址: https://www.cveoy.top/t/topic/dp1J 著作权归作者所有。请勿转载和采集!