Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Trying to use Trigger to update a field value

3 posts in Trigger Last posting was on 2004-04-09 21:08:50.0Z
fiaola Posted on 2004-04-08 22:45:03.0Z
From: "fiaola" <nospambigdee72@hotmail.com>
Newsgroups: Advantage.Trigger
Subject: Trying to use Trigger to update a field value
Date: Thu, 8 Apr 2004 11:45:03 -1100
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 64.75.162.50
Message-ID: <4075d8dd@solutions.advantagedatabase.com>
X-Trace: 8 Apr 2004 16:57:33 -0700, 64.75.162.50
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.75.162.50
Xref: solutions.advantagedatabase.com Advantage.Trigger:47
Article PK: 1136116

This trigger SQL crashes:

Update Table1 set PerName = rtrim(FirstName)+'' ''+rtrim(LastName),
PreName(Soundex(PerName)

The error message says an extra token..but it works fine in SQL.


fiaola Posted on 2004-04-08 23:16:23.0Z
From: "fiaola" <nospambigdee72@hotmail.com>
Newsgroups: Advantage.Trigger
References: <4075d8dd@solutions.advantagedatabase.com>
Subject: Re: Trying to use Trigger to update a field value
Date: Thu, 8 Apr 2004 12:16:23 -1100
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 64.75.162.50
Message-ID: <4075e4ae@solutions.advantagedatabase.com>
X-Trace: 8 Apr 2004 17:47:58 -0700, 64.75.162.50
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.75.162.50
Xref: solutions.advantagedatabase.com Advantage.Trigger:48
Article PK: 1136115

I found the problem with script below, an extra set of ' ' was in the text.

The trigger is set for AFTER INSERT, but now when i use the ARC to test, it
says that the file is being used by another user. huh? Any suggestion?

Thanks.

"fiaola" <nospambigdee72@hotmail.com> wrote in message
news:4075d8dd@solutions.advantagedatabase.com...
> This trigger SQL crashes:
>
> Update Table1 set PerName = rtrim(FirstName)+'' ''+rtrim(LastName),
> PreName(Soundex(PerName)
>
> The error message says an extra token..but it works fine in SQL.
>
>


Jeremy D. Mullin Posted on 2004-04-09 21:08:50.0Z
From: Jeremy D. Mullin <no@email.com>
Newsgroups: Advantage.Trigger
Subject: Re: Trying to use Trigger to update a field value
Date: Fri, 9 Apr 2004 15:08:50 -0600
Message-ID: <MPG.1ae0bec82ebd9f53989c84@solutions.advantagedatabase.com>
References: <4075d8dd@solutions.advantagedatabase.com> <4075e4ae@solutions.advantagedatabase.com>
Organization: ESI
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 198.102.102.187
X-Trace: 9 Apr 2004 15:17:55 -0700, 198.102.102.187
Lines: 38
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.187
Xref: solutions.advantagedatabase.com Advantage.Trigger:49
Article PK: 1136112

This is from the "Trigger Types (BEFORE, INSTEAD OF, and AFTER) page in
the help file, in 8.0 we will be investigating allowing after triggers
to also update the record that initiated the trigger:

INSTEAD OF triggers are the only triggers allowed to modify the same
record that the client application currently has locked (the operation
that caused the trigger to fire in the first place). Attempts to do so
with a BEFORE or AFTER trigger will result in record locking errors. If
your trigger code needs to modify the same record the client has locked,
use an INSTEAD OF trigger.


J.D. Mullin
Advantage R&D

In article <4075e4ae@solutions.advantagedatabase.com>, nospambigdee72
@hotmail.com says...

> I found the problem with script below, an extra set of ' ' was in the text.
>
> The trigger is set for AFTER INSERT, but now when i use the ARC to test, it
> says that the file is being used by another user. huh? Any suggestion?
>
> Thanks.
>
>
> "fiaola" <nospambigdee72@hotmail.com> wrote in message
> news:4075d8dd@solutions.advantagedatabase.com...
> > This trigger SQL crashes:
> >
> > Update Table1 set PerName = rtrim(FirstName)+'' ''+rtrim(LastName),
> > PreName(Soundex(PerName)
> >
> > The error message says an extra token..but it works fine in SQL.
> >
> >
>
>
>