如何自动替换语句中的多个值?

时间:2018-09-05 07:49:05

标签: plsql toad

我有一个sql语句和值列表。

声明:

UPDATE SALCSMAIN
SET CSNO = :p0
   ,CSDATE = :p1
   ,SCHEME_DOCNO =:p2
   ,GRSAMT = :p3
   ,DISCOUNT = :p4
   ,NETAMT = :p5
   ,SITE_COSTAMT = :p6
   ,REMARKS = :p7
   ,TIME = :p8

:p0 = 1883                   [Type: Int32 (0)]
:p1 = 9/30/2017 12:00:00 AM  [Type: DateTime (0)]
:p2 = 'CHOGOS0026-17-18'     [Type: String (0)]
:p3 = 5298                   [Type: Decimal (0)]
:p4 = 1900                   [Type: Decimal (0)]
:p5 = 3398                   [Type: Decimal (0)]
:p6 = NULL                   [Type: Decimal (0)]
:p7 = 'naveen'               [Type: String (0)]
:p8 = 10/6/2017 3:03:38 PM   [Type: DateTime (0)]

我希望结果是这样的:

UPDATE SALCSMAIN
SET CSNO = 1883
   ,CSDATE = '30-SEP-2017'
   ,SCHEME_DOCNO = 'CHOGOS0026-17-18'
   ,GRSAMT = 5298
   ,DISCOUNT = 1900
   ,NETAMT = 3398
   ,SITE_COSTAMT = NULL
   ,REMARKS = 'naveen'
   ,TIME = '06-OCT-2017'
   ,LAST_ACCESS_TIME = '06-OCT-2017'

如何自动执行此任务?

0 个答案:

没有答案