Hi,
I have the following update statement that updates one table by the
values from the other table which seems have some problem with the
syntax.
UPDATE tblResolve SET tblResolve.txtW hatIssue = tblIssues.Short Desc,
tblResolve.txtC ustomerDetails = tblIssues.Custo merDetails,
tblResolve.blnC ustomerLost = tblIssues.Custo merLost,
tblResolve.txtA ctualCost = tblIssues.Actua lCost, tblResolve.txtF UMLoss
= tblIssues.FUMLo ss, tblResolve.txtA ctionTakenToRes olve =
tblIssues.Actio nTakenToResolve , tblResolve.txtS uggestedResolut ion =
tblIssues.Sugge stedResolution
FROM tblResolve
INNER JOIN tblIssues ON tblResolve.inti ssuecode = tblIssues.Issue Code
WHERE tblResolve.inti ssuecode = forms!frmEnterI ssues!IssueCode
;
When I run this query i get the following error:
Syntax error (missing operator) in the query expression
'tblIssues.Sugg estedResolution
FROM tblResolve
INNER JOIN tblIssues ON tblResolve.inti ssuecode = tblIssues.Issue Code'
Can any one help me in getting this resolved.
Thanks in advance,
San. 1 1161
Your Inner Join needs to be moved up to follow the Update statement.
Something like:
UPDATE Table1 INNER JOIN Table2 ON Table1.lngPrima ryKey =
Table2.lngPrima ryKey SET Table1.strField = Table2.strField ,
Table1.lngField = Table2.lngField , Table1.blnField = Table2.blnField ,
Table1.dtmField = Table2.dtmField ;
Sounds like your storing a lot of the same or similar data in two
seperate tables, which is a big relational database no-no. You may just
want to maintain the Issues table till the issues are resolved then
post them to the Resolve table using an Append Query to avoid data
duplication in the interim. That SQL statement would be something like
this:
INSERT INTO Table1 ( lngPrimayKey, strField, lngField, blnField,
dtmField ) SELECT Table2.lngPrima ryKey, Table2.strField ,
Table2.lngField , Table2.blnField , Table2.dtmField FROM Table2; This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ann |
last post by:
Hello everyone, hope someone can help me with this.
I have a SQL stored procedure that inserts a record into a table,
creates a cursor to fetch the last record that was added to get the
unique key that was created and then writes that and other info to a
separate table. This procedure was working fine at our ISP under NT 4
and SQL 7.
We...
|
by: John |
last post by:
Hi all,
I am doing the change from having worked in Oracle for a long time to
MS SQL server and am frustrated with a couple of simple SQL stmt's. Or
at least they have always been easy.
The SQL is pretty straightforward. I am updating a field with a Max
effective dated row criteria. (PepopleSoft app)
update PS_JOB as A set BAS_GROUP_ID...
|
by: LineVoltageHalogen |
last post by:
Table DDL:
create table test
(
inId int primary key identity,
inFK int not null,
inSeq int not null,
dtDate datetime
)
|
by: teddysnips |
last post by:
SQL Server 2000
I have a stored procedure that uses an extended SPROC to send an email
notification to my customers when a document is distributed.
However, the SPROC has an unexpected side effect.
If I run it in its current incarnation, it only sends one email and
then exits. However, if I remove or comment out the block
|
by: Rudolf Bargholz |
last post by:
Hi,
I have a ralatively simple SQL:
select FK from TABLE where upper(A) like 'B%' and upper(C) like 'D%'
We have DB2 UDB v7.1 FP 12 installed on Linux and on Windows 2003
On Linux using optimization level 5 as well as 9 and 0 the SQL uses
3'100'000'000 timerons !
| |
by: Hemant Shah |
last post by:
Folks,
We have an SQL statement that was coded in an application many years ago
(starting with DB V2 I think). When I upgraded to UDB 8.2, the optimizer
does not use optimal path to access the data.
It takes about 4 minutes to get the data. In previous versions it was
instantaneous.
What do I need to do to increase the performance?
|
by: Mullin Yu |
last post by:
i have a stored procedure at sql server 2k. which will update records and
select result from temp table.
if i use SqlConnection class, and i do both. but, if i use OleDbConnection
class, i can have only records updated, but no result come out.
how can i debug, and what's the error?
thanks!
|
by: shivendravikramsingh |
last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand...
|
by: Michel Esber |
last post by:
Hi all,
DB2 V8 LUW FP 15
There is a table T (ID varchar (24), ABC timestamp). ID is PK.
Our application needs to frequently update T with a new value for ABC.
update T set ABC=? where ID = ?
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |