-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use single quotes in SQL queries for delimited values. Double-quotes
have a different meaning.
UPDATE inventory
SET date_pruchased = '20050127'
FROM inventory i INNER JOIN sales s
on i.bar_code = s.bar_code and i.product_nbr = s.product_nbr
WHERE s.sold = '20050127'
Probably better could be:
UPDATE inventory
SET date_pruchased = s.sold
FROM inventory i INNER JOIN sales s
on i.bar_code = s.bar_code and i.product_nbr = s.product_nbr
WHERE s.sold = '20050127'
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQfl8xYechKqOuFEgEQJvPQCfUihJUy2SoOV6PB3sT2R8mo 6FVwMAoM2B
wvfAWGq5a8VVEgR7zuQef8uH
=UKJw
-----END PGP SIGNATURE-----
ralph_noble@hotmail.com wrote:[color=blue]
> Can someome please advise what the equivalent query would be in
> Microsoft SQL Server ... I've tried a number of combinations with no
> success ... Thanks, Ralph Noble (ralph_noble@hotmail.com)
>
> ================
>
> UPDATE INVENTORY
>
> INNER JOIN SALES ON (INVENTORY.BAR_CODE = SALES.BAR_CODE)
>
> AND (INVENTORY.PRODUCT_NBR = SALES.PRODUCT_NBR)
>
> SET INVENTORY.DATE_PURCHASED = "20050127"
> WHERE (((SALES.SOLD)="20050127"));
>[/color]