473,397 Members | 1,985 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,397 software developers and data experts.

Simple join problem (I think!)

Hi,

I'm tearing my hair out on the simplest of queries (SQL Server 2k).
I'm using ASP and the code I was using worked fine when attached to an
Access MDB, but I can't crack it under SQL Server.

This is the code I'm trying in the SQL Query analyzer:

Update ClientTable inner join Cancellations on ClientTable.mobileno =
Cancellations.mobileno set ClientTable .ExpiryReason = 888,
Cancellations.Cancelled = true

The word "join" is greyed out and I'm getting the error:
Incorrect syntax near the keyword 'inner'.

I'm sure it's something obvious, but I can't see the wood for the
trees!

Can anyone help???

TIA

Phil

Jan 30 '06 #1
2 3443
Bri


RS200Phil wrote:
Hi,

I'm tearing my hair out on the simplest of queries (SQL Server 2k).
I'm using ASP and the code I was using worked fine when attached to an
Access MDB, but I can't crack it under SQL Server.

This is the code I'm trying in the SQL Query analyzer:

Update ClientTable inner join Cancellations on ClientTable.mobileno =
Cancellations.mobileno set ClientTable .ExpiryReason = 888,
Cancellations.Cancelled = true

The word "join" is greyed out and I'm getting the error:
Incorrect syntax near the keyword 'inner'.

I'm sure it's something obvious, but I can't see the wood for the
trees!

Can anyone help???

TIA

Phil


There is a space where there shouldn't be one;
"set ClientTable .ExpiryReason" should be "set ClientTable.ExpiryReason"

Not sure why this would make it think the Join is bad?

--
Bri

Jan 30 '06 #2
"RS200Phil" <ph********@dataservicesltd.co.uk> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,

I'm tearing my hair out on the simplest of queries (SQL Server 2k).
I'm using ASP and the code I was using worked fine when attached to an
Access MDB, but I can't crack it under SQL Server.

This is the code I'm trying in the SQL Query analyzer:

Update ClientTable inner join Cancellations on ClientTable.mobileno =
Cancellations.mobileno set ClientTable .ExpiryReason = 888,
Cancellations.Cancelled = true

The word "join" is greyed out and I'm getting the error:
Incorrect syntax near the keyword 'inner'.

I'm sure it's something obvious, but I can't see the wood for the
trees!

Can anyone help???

TIA

Phil

You are writing ASP with a connection to a SQL Server database? It doesn't
really have much to do with MS Access, does it? Anyway, apart from the
extra space which has been pointed out, there is a more fundamental issue.
SQL statements for Access (Jet) and those for SQL Server are not necessarily
interchangeable - what might work in one might not in the other. Update
queries are one of those things. You cannot hope to update two tables
simultaneously with one SQL statement. Either create a stored procedure to
do this or wrap two updates in a single transaction.
Jan 30 '06 #3

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

Similar topics

0
by: Justin | last post by:
Hi, I need to find all the groupID's that employee ID=123 doesn't belong to given the following table structure: EmployeeGroup ------------------------ groupID groupName
0
by: LRW | last post by:
This has to do with mySQL 101. I know it's supposed to be super simple, but I'm an idiot. I can't get my join to work (1st time I've tried doing joins.) I've read...
7
by: Houston | last post by:
I have a form that after being filled out has its contents written to a database and then goes to confirmation .asp page. I want the confirmation page to be personalized but I am not sure how to...
6
by: Derek Martin | last post by:
I am new to ASP.NET but fairly good at VB.Net. I have an ASP.Net web project going (VB.Net as the codebehind). I have created a page that I dropped a DropDownList and a button on. I populated...
1
by: David | last post by:
Hi, We are in the process of buying a new server to run mssql. However before this as a tempory fix to using a msaccess backend i believe through odbc i need to address the following issue: ...
3
by: Robert Towne | last post by:
If I have a string representation of a property such as "MyObject.SomeProperty", how would I then create a "MyObject" object and invoke "SomeProperty". Any assistance would be appreciated. Thanks.
1
by: SimeonArgus | last post by:
This problem has me stumped. It shouldn't. It seems that this should be extremely simple. But it does. I have a page with two IFRAMES. The first IFRAME contains the data. The second contains...
6
by: TMorrison | last post by:
Hi, I have just started trying to use Access to add some functionality to a form I was given. I have no experience with this language and am having some difficulty accessing text from another...
5
by: ltansey | last post by:
I have a problem concerning a join statement query, the two table are called PublicHouse & PublicHouseBeer, below are the following tables are there attributes; PublicHouse Table create table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.