Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 T-SQL Vs. Jet

Author  Topic 

ckuo@kahluadesigns.com
Yak Posting Veteran

58 Posts

Posted - 2003-07-22 : 10:51:25
Pardon if this is a lil off topic. I am trying to do a Update with an inner join in ACCESS and SQL Server using the Northwinds datbase. The sql server update statement works fine but the Access statement prompts me for values, what gives? I'm not that great with Access so if somebody could fill me in on the adjustment i need to make. Thanks

SQL SERVER STATEMENT
---------------------
update [order details]
set
[order details].unitprice = ([order details].unitprice + ([order details].unitprice * .015))
from [order details] inner join products on [order details].productid = products.productid
where
products.productname = 'Chai'


ACCESS STATEMENT
-------------------
update [order details]
inner join products on [order details].product = products.productname
set
[order details].[unit price] = ([order details].[unit price] + ([order details].[unit price] * .015))
where
products.productid = 1




X002548
Not Just a Number

15586 Posts

Posted - 2003-07-22 : 11:23:50
Why is it [unit price] in Access?

btw

If you want to prompt a user in access to eneter a value for a predicate, you create a "column" on the fly and Access will let you eneter a value.

I guess column is the wrong word, field or variable

SELECT * FROM myTable WHERE column = [Please Eneter a Value]

The user will see a dialog with:

"Please Enter a value"

My guess is the [unit price] is not a column in the table.



Brett

8-)
Go to Top of Page
   

- Advertisement -