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

SQL Syntax Error

16
Good day,

I'm doing an asp.net web site an i have to update users in the ASPNETDB.

I'm getting an error on the following update query...
Incorrect syntax near the keyword 'INNER'.

Some on can help me please


UPDATE dbo_aspnet_Membership INNER JOIN dbo_aspnet_Users
SET [Username] = @UserName, [email] = @Email
FROM dbo_aspnet_Membership INNER JOIN dbo_aspnet_Users
ON dbo_aspnet_Membership.UserId = dbo_aspnet_Users.UserId
WHERE [UserId] = @UserId
Mar 26 '11 #1

✓ answered by deepuv04

Try this

Expand|Select|Wrap|Line Numbers
  1. UPDATE dbo_aspnet_Users 
  2. SET [Username] = @UserName, [email] = @Email 
  3. FROM dbo_aspnet_Membership INNER JOIN dbo_aspnet_Users 
  4. ON dbo_aspnet_Membership.UserId = dbo_aspnet_Users.UserId 
  5. WHERE [UserId] = @UserId 

2 1310
deepuv04
227 Expert 100+
Try this

Expand|Select|Wrap|Line Numbers
  1. UPDATE dbo_aspnet_Users 
  2. SET [Username] = @UserName, [email] = @Email 
  3. FROM dbo_aspnet_Membership INNER JOIN dbo_aspnet_Users 
  4. ON dbo_aspnet_Membership.UserId = dbo_aspnet_Users.UserId 
  5. WHERE [UserId] = @UserId 
Mar 26 '11 #2
atoy
16
Thanks for your reply Deepuv04.

It works great!

Have a nice day.
Mar 28 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: sam | last post by:
When I run this SQL query: SELECT u.*, o.* FROM users u, orders o WHERE TO_DAYS(o.order_date) BETWEEN TO_DAYS('2003-09-20')-10 AND TO_DAYS('2003-09-20')+10
1
by: Steve | last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. ...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
1
by: Donald Canton | last post by:
Hi, I'm using Bjarne's book to learn C++ and am stuck on the Calc program in Section 6. Everything works fine except when I try to use istringstream to parse a token from the command line. I...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
2
by: david | last post by:
Anyone could give me a hand about this syntax error? Thank you. David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
4
by: nickyeng | last post by:
i calling this piece of java code in jsp : List<Customer> list = Customer.listby_page(currentRs); ... ... then it gives me the following error:
0
by: Timothy Grant | last post by:
On Thu, Aug 28, 2008 at 1:40 AM, Alexis Boutillier <alexis.boutillier@arteris.comwrote: So if you were writing C code and the file failed to compile you would still expect to have a working...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.