Update query ...

M

Me

I am getting error in the following update query -

UPDATE [User] SET userEmail = (Select ObjectName
FROM Info
WHERE UserFname=GivenName And UserLName=lastname );

where [user] is a linked table with Sql Server database
and Info is an Access table.

I am able to run the following query without any problems ..

SELECT a.UserLname AS LastName, a.UserFName AS FirstName, b.ObjectName AS
[Email Id]
FROM [User] AS a, Info AS b
WHERE a.UserFname=b.givenname And a.UserLName=b.lastname
ORDER BY a.UserLName, a.UserFName;

Can someone help me fix this?

Thank you in advance!

-Me
 
M

Me

GivenName and LastName are fields in the Access table
called 'Info'

all the fields belong to one or the other table.

Thanks much,
-M

MGFoster said:
What's the error? What are GivenName and lastname: pop-up prompts,
functions?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

I am getting error in the following update query -

UPDATE [User] SET userEmail = (Select ObjectName
FROM Info
WHERE UserFname=GivenName And UserLName=lastname );

where [user] is a linked table with Sql Server database
and Info is an Access table.

I am able to run the following query without any problems ..

SELECT a.UserLname AS LastName, a.UserFName AS FirstName, b.ObjectName AS
[Email Id]
FROM [User] AS a, Info AS b
WHERE a.UserFname=b.givenname And a.UserLName=b.lastname
ORDER BY a.UserLName, a.UserFName;
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Huh?... Then in which table do columns UserFname and UserLName come
from? It appears as if your setting the column values of one row to
other column values in the same row.

And you still haven't told us the error that occurs when you run the
query.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQkskpIechKqOuFEgEQJAIACfeQ2K6TO+BEbbaaWw7PSr0/JniGMAn0D3
KU0K2OvgHW2thidBK7qUyrVM
=r9Ac
-----END PGP SIGNATURE-----
GivenName and LastName are fields in the Access table
called 'Info'

all the fields belong to one or the other table.

Thanks much,
-M

:

What's the error? What are GivenName and lastname: pop-up prompts,
functions?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

I am getting error in the following update query -

UPDATE [User] SET userEmail = (Select ObjectName
FROM Info
WHERE UserFname=GivenName And UserLName=lastname );

where [user] is a linked table with Sql Server database
and Info is an Access table.

I am able to run the following query without any problems ..

SELECT a.UserLname AS LastName, a.UserFName AS FirstName, b.ObjectName AS
[Email Id]
FROM [User] AS a, Info AS b
WHERE a.UserFname=b.givenname And a.UserLName=b.lastname
ORDER BY a.UserLName, a.UserFName;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top