-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> <cfquery name="get_auctions" datasource="happytoad">
> DELETE * from auction_records where auction_id='#id#' and
> userid='#userid#'
> </cfquery>
>
> Here is the error:
>
> ODBC Error Code = 37000 (Syntax error or access violation)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
> Incorrect syntax near '*'.
>
> Is * not the correct syntax for All is SQL 7.0?
In SQL, a DELETE statement inherently means to delete all columns.
The * is redundant since there's no way to specify the columns you
want to delete in a DELETE statement. Access probably ignored it;
but to the best of my knowledge, that isn't technically correct SQL.
SQL Server is kicking it out for that reason. The statement should
be:
DELETE FROM auction_records
WHERE auction_id='#id#'
AND userid='#userid#'
(Caps of course are not important, but I like all my SQL keywords
capped for readability...)
Best regards,
Zac Bedell
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
iQA/AwUBOiaLNqvhLS1aWPxeEQLKKwCfVxX/QJ39/4OgI79p2wFVIlpTQb8AoLWn
jE5qpxzPrhXBcyht8P6yRCl1
=XpCU
-----END PGP SIGNATURE-----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists