From: GW on
Need help.

Received the above error when I execute the following

Thanks.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO

--drop proc PROC_CLN_DATA
ALTER PROCEDURE PROC_CLN_DATA AS


BEGIN
set nocount on

DECLARE @SYS_DATE DATETIME, @sys_dt char(10),@l_count int,@sys_dt1 datetime


declare @old_post_dt varchar(8), @post_dt varchar(8),@post_dt1 varchar(10)

--maa add 11032008 for trade finance expired purposes
declare @date_mat smalldatetime
set @date_mat = (select getdate()-day(getdate())-1)


SELECT @SYS_DATE = GETDATE()

--getting last day of the month

select @sys_dt1 = dateadd(d,-day(@sys_date),@sys_date)


select @sys_dt = convert(char(10),@sys_dt1,103)


select @sys_dt = replace(@sys_dt,'/','')


select @old_post_dt = post_dt from old_bcb


select @post_dt = post_dt from bcb

select @post_dt1 =substring(@post_dt,1,2)+'/'+ substring(@post_dt,3,2)

+'/'+substring(@post_dt,5,4)

update a
set a.br_cd = 'SEA1'
from ccris_ref..nploan a,
seasam b
where ltrim(rtrim(a.loan_acno)) = ltrim(rtrim(b.mano))
and ltrim(rtrim(a.acct_no)) = ltrim(rtrim(b.sano))

From: GW on
Pls ignore...

Posted new one.

"GW" wrote:

> Need help.
>
> Received the above error when I execute the following
>
> Thanks.
>
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
>
> --drop proc PROC_CLN_DATA
> ALTER PROCEDURE PROC_CLN_DATA AS
>
>
> BEGIN
> set nocount on
>
> DECLARE @SYS_DATE DATETIME, @sys_dt char(10),@l_count int,@sys_dt1 datetime
>
>
> declare @old_post_dt varchar(8), @post_dt varchar(8),@post_dt1 varchar(10)
>
> --maa add 11032008 for trade finance expired purposes
> declare @date_mat smalldatetime
> set @date_mat = (select getdate()-day(getdate())-1)
>
>
> SELECT @SYS_DATE = GETDATE()
>
> --getting last day of the month
>
> select @sys_dt1 = dateadd(d,-day(@sys_date),@sys_date)
>
>
> select @sys_dt = convert(char(10),@sys_dt1,103)
>
>
> select @sys_dt = replace(@sys_dt,'/','')
>
>
> select @old_post_dt = post_dt from old_bcb
>
>
> select @post_dt = post_dt from bcb
>
> select @post_dt1 =substring(@post_dt,1,2)+'/'+ substring(@post_dt,3,2)
>
> +'/'+substring(@post_dt,5,4)
>
> update a
> set a.br_cd = 'SEA1'
> from ccris_ref..nploan a,
> seasam b
> where ltrim(rtrim(a.loan_acno)) = ltrim(rtrim(b.mano))
> and ltrim(rtrim(a.acct_no)) = ltrim(rtrim(b.sano))
>