WITH tbl AS
(
SELECT ROW_NUMBER() OVER (ORDER BY P_NO) ROW_NUM,P_NO,RECIEPT_TIME RECIEPT_TIME1,RECIEPT_TIME RECIEPT_TIME2,P_PRICE
FROM DATABASE1
INNER JOIN DATABASE2 ON DATABASE1.ID=DATABASE2.P_NO_ID
)
SELECT (CASE WHEN P_NO=(SELECT P_NO FROM TBL TBLSUB WHERE TBLSUB.ROW_NUM+1=TBL.ROW_NUM ) THEN ' ' ELSE P_NO END)P_NO,RECIEPT_TIME1,RECIEPT_TIME2,P_PRICE
FROM tbl;