[thelist] SQL: Can you spot the error?

Paul Cowan evolt at funkwit.com
Tue Jul 15 00:11:31 CDT 2003


Casey Crookston wrote:
> UPDATE news SET title = 'Krispy Kreme in Maple Grove Completed.f', date =
> '7/14/2003', active = 1, article ='The new Krispy Kreme in xxxxx is now
> open for business! xxxxx was awarded a sub-contract in the construction
> of the popular doughnut franchise, and is currently in negations to help
> construct a restaurant in xxxx.' WHERE news_id = 3
>
> I've tried the date w/ and w/o the 's and neither work.  What is wrong
> with this SQL statement?

1: Try putting the date in a more canonical format. Depending on your DB,
you might be having an issue with date formats. '2003-07-14' is
usually a pretty safe bet.

2: Just a guess, but is 'xxx' the actual value you're putting in? If
you're using some other value, check that there are no apostrophes

3: How long is the 'article' field? Long enough to hold that text?

4: Are you using a DB that doesn't like having the 'date' field called
   date (reserved word)? Try [Date]. Or rename the field.

5: If none of the above help:
	5a) What's the exact error message?
	5b) What DB are you using?

Cheers,

Paul


More information about the thelist mailing list