473,395 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Simple Trigger Question

I'm building this trigger and an error message is appearing which says: "
Error 170: Incorrect Syntax: Line 6 near "=". Could someone please help me
understand why this error is occuring? Thanks.

Create Trigger AvailableLogFootage
on tblLogs
FOR UPDATE
As
Begin
UPDATE UnDesignatedFootage = tblBundles.CurrentFootage
WHERE tblBundles.IsDesignated = 'N'
FROM tblLogs join tblBundles
On tblLogs INNER JOIN tblBundles ON tblLogs.FlitchNum = tblBundles.FlitchNum
Jul 21 '05 #1
2 1150
Hey Mike,

Looks like you need to tell it what table to set and a SET keyword to tell
it where the fieldlist starts:

UPDATE MyTable SET UnDesignatedFootage = tblBundles.CurrentFootage
WHERE ...

HTH,

John

"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
I'm building this trigger and an error message is appearing which says: "
Error 170: Incorrect Syntax: Line 6 near "=". Could someone please help me understand why this error is occuring? Thanks.

Create Trigger AvailableLogFootage
on tblLogs
FOR UPDATE
As
Begin
UPDATE UnDesignatedFootage = tblBundles.CurrentFootage
WHERE tblBundles.IsDesignated = 'N'
FROM tblLogs join tblBundles
On tblLogs INNER JOIN tblBundles ON tblLogs.FlitchNum =

tblBundles.FlitchNum
Jul 21 '05 #2
That was it! Thanks John

"John Spiegel" wrote:
Hey Mike,

Looks like you need to tell it what table to set and a SET keyword to tell
it where the fieldlist starts:

UPDATE MyTable SET UnDesignatedFootage = tblBundles.CurrentFootage
WHERE ...

HTH,

John

"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
I'm building this trigger and an error message is appearing which says: "
Error 170: Incorrect Syntax: Line 6 near "=". Could someone please help

me
understand why this error is occuring? Thanks.

Create Trigger AvailableLogFootage
on tblLogs
FOR UPDATE
As
Begin
UPDATE UnDesignatedFootage = tblBundles.CurrentFootage
WHERE tblBundles.IsDesignated = 'N'
FROM tblLogs join tblBundles
On tblLogs INNER JOIN tblBundles ON tblLogs.FlitchNum =

tblBundles.FlitchNum

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andreas | last post by:
Hello list, I suspect, this is a common issue for newbies. Is there a simple way to have an auto-updating timestamp like mysql has ? create table something ( id int4, sometext...
2
by: robert | last post by:
typed this into the ibm.com search window, but didn't get anything that looked like it would answer a question: +trigger +faster +db2 +cobol the question: are DB2 (390/v6, at the moment)...
5
by: Bob Stearns | last post by:
I have two (actually many) dates in a table I want to validate on insertion. The following works in the case of only one WHEN clause but fails with two (or more), with the (improper?...
3
by: ChrisN | last post by:
Hello all, I have a quick question. I'm using a C# object to commit new rows to a database. In the database I have an INSERT Trigger watching values come in. If the record to be committed...
1
by: anonymowho | last post by:
I am looking at a table in Microsoft SQL Server. I went to the dependencies of this table and it says TRIG_customer. so i am thinking there is a trigger that affects the table but how do i see...
6
by: Marc | last post by:
How could I directly trigger a very simple on localhost and a known port listening server from my internet browser client? Local host means the little server would be running on the client machine,...
3
by: teddysnips | last post by:
I need a trigger (well, I don't *need* one, but it would be optimal!) but I can't get it to work because it references ntext fields. Is there any alternative? I could write it in laborious code...
10
by: JohnO | last post by:
Hi All, This question is related to iSeries V5R4 and db2. I want to implement an AFTER DELETE trigger to save the deleted rows to an archive table, I initially defined it as a FOR EACH...
2
by: gimme_this_gimme_that | last post by:
I'm using DB2 8.1. Suppose table foo has columns name and lname: create table foo (name as varchar(200), lname as varchar(200)); Write a trigger that inserts the lower case value of name...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.