473,395 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

what is wrong with this statement

CTG
"update [SIM-TAB] set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007
4:09:59 PM' WHERE ICCID='I1' "

UPDATE_FLAG is a YES/NO
ICCID is TEXT
I have tried YES, NO as well but still fails,

Sep 10 '07 #1
6 1991
On 10 sep, 08:13, CTG <BadMul...@gmail.comwrote:
"update [SIM-TAB] set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007
4:09:59 PM' WHERE ICCID='I1' "

UPDATE_FLAG is a YES/NO
ICCID is TEXT
I have tried YES, NO as well but still fails,
Add more brackets, same as on [SIM-TAB]
[UPDATE-FLAG]=false, [UPDATE-DT]= '10/09/2007

Sep 10 '07 #2
Hi.
what is wrong with this statement
The beginning of a sentence requires an initial capitalized letter. Also,
your question requires a question mark at the end of the sentence. For
example:

"What is wrong with this statement?"

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
Sep 10 '07 #3
Hi.
"update [SIM-TAB] set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007
4:09:59 PM' WHERE ICCID='I1' "
1.) The dash sign means "subtract the value on the right from the value on
the left." As written, your query is attempting to subtract the value of
FLAG from the value of UPDATE and then subtract the value of DT from the
value of UPDATE. There is no UPDATE column, nor FLAG column, nor DT column.
Also, the above syntax assigning values to an expression just won't work.

2.) UPDATE is a Reserved word, and Reserved words should not be used to
name columns (or any other identifier for that matter), because Jet may use
the Reserved word for its intented purpose, not the use you want to assign
to it.

3.) A date data type must be bracketed by the pound sign, #, both before
and after the date in Jet SQL. For example:

UPDATE MyTable
SET MyDate = #10/09/2007 4:09:59 PM#
WHERE MyDept = 'Accounting';

It's important to use US format dates (mm/dd/yyyy) in Jet queries.
Therefore, the above date is 9 Oct. 2007, not 10 Sept. 2007.

4.) One may either change the names of columns so that Reserved words
aren't used and illegal characters aren't used (only use alphanumeric
characters and the underscore character), or one may put brackets around the
names of the bad column names, but the latter method isn't guaranteed to
work, so it's best to avoid the problems in the first place by using
acceptable names for all identifiers.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
Sep 10 '07 #4
CTG
On Sep 10, 5:56 pm, "'69 Camaro" <ForwardZERO_SPAM.To.
69Cam...@Spameater.orgZERO_SPAMwrote:
Hi.
"update [SIM-TAB] set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007
4:09:59 PM' WHERE ICCID='I1' "

1.) The dash sign means "subtract the value on the right from the value on
the left." As written, your query is attempting to subtract the value of
FLAG from the value of UPDATE and then subtract the value of DT from the
value of UPDATE. There is no UPDATE column, nor FLAG column, nor DT column.
Also, the above syntax assigning values to an expression just won't work.

2.) UPDATE is a Reserved word, and Reserved words should not be used to
name columns (or any other identifier for that matter), because Jet may use
the Reserved word for its intented purpose, not the use you want to assign
to it.

3.) A date data type must be bracketed by the pound sign, #, both before
and after the date in Jet SQL. For example:

UPDATE MyTable
SET MyDate = #10/09/2007 4:09:59 PM#
WHERE MyDept = 'Accounting';

It's important to use US format dates (mm/dd/yyyy) in Jet queries.
Therefore, the above date is 9 Oct. 2007, not 10 Sept. 2007.

4.) One may either change the names of columns so that Reserved words
aren't used and illegal characters aren't used (only use alphanumeric
characters and the underscore character), or one may put brackets around the
names of the bad column names, but the latter method isn't guaranteed to
work, so it's best to avoid the problems in the first place by using
acceptable names for all identifiers.

HTH.
Gunny

Seehttp://www.QBuilt.comfor all your database needs.
Seehttp://www.Access.QBuilt.comfor Microsoft Access tips and tutorials.
Blogs:http://www.DataDevilDog.BlogSpot.com...utors2.htmlfor contact
info.

THANKS to you guys for teh repoponses
I renamed teh table and fields

1-however to pinpoint the problem even this would fail, the select
statements however have no problem with it.

"UPDATE SIMTAB SET UPDFLAG=1 WHERE ICCID='I1' "

I am doing this in a C# application .

2-I have not been able to figure out how I can do thsi query by typing
command in Access to speed up the resolution to thsi problem.
Sep 10 '07 #5
"CTG" <Ba*******@gmail.comwrote
1-however to pinpoint the problem even this would fail, the select
statements however have no problem with it.

"UPDATE SIMTAB SET UPDFLAG=1 WHERE ICCID='I1' "

I am doing this in a C# application .
What are you doing to _execute_ the SQL? It is not, repeat NOT, just a
program statement.

In Access VBA, using Data Access Objects, it would be something like:

CurrentDB.Execute strMyQuery

where strMyQuery is a string/text variable containing the query you want to
execute.
2-I have not been able to figure out how I can do thsi query by typing
command in Access to speed up the resolution to thsi problem.
You must, of course, have access to the tables... either by testing your
query in the Jet database where the tables actually reside, or linking to
those tables -- on the File Menu, "Get External Data" and "Link" and then
follow the prompts (that's on Access 2003 or earlier... someone else would
have to tell you the details of the commands to link on Access 2007).

On the Database Window, click the Queries tab, then click "New" to open the
Query Builder. I'd suggest learning at least enough to use the Query
Builder, but with the Query open in Design View, you can click View on the
menu, choose SQL and type in the SQL directly.

Larry Linson
Microsoft Access MVP
Sep 11 '07 #6
On Sep 10, 2:13 am, CTG <BadMul...@gmail.comwrote:
"update [SIM-TAB] set UPDATE-FLAG=false, UPDATE-DT= '10/09/2007
4:09:59 PM' WHERE ICCID='I1' "

UPDATE_FLAG is a YES/NO
ICCID is TEXT
I have tried YES, NO as well but still fails,
What is wrong is that your naming convention is horrid. Object names
at all levels (IMHO) should never use spaces, dashes, underscores, etc.

Sep 11 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: serge | last post by:
/* This is a long post. You can paste the whole message in the SQL Query Analyzer. I have a scenario where there are records with values pointing to wrong records and I need to fix them using an...
51
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
6
by: Daniel Rudy | last post by:
What is wrong with this program? When I try to compile it, I get the following error. Compiler is gcc on FreeBSD. strata:/home/dcrudy/c 1055 $$$ ->cc -g -oe6-3 e6-3.c e6-3.c: In function...
8
by: Brian Basquille | last post by:
Hello all, Bit of a change of pace now. As opposed to the typical questions regarding my Air Hockey game, am also working on a Photo Album which uses an Access Database to store information...
1
by: THY | last post by:
can anyone tell me what's wrong with this statement ? cn.execute("update table set data = 'test'") the asp.net keep telling me syntax error in update statement ... help me please ...
22
by: noridotjabi | last post by:
Okay. I'm quite embarased to be asking this but I cannot seem to get files to work. I don't know what the problem is. Is there something wrong with this: (file related) #include <stdio.h>...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
5
by: Ryan | last post by:
{"POINTID":77902,"MAPID":762,"LONG":-122.21654892,"LAT":"37.1834331019","CITY":"Boulder Creek","STATE":"CA","DIST":5745.4} I get an "invalid label" error... I'm kinda new to this. Thanks!
15
by: robert maas, see http://tinyurl.com/uh3t | last post by:
Here's the source: #include <stdio.h> #include <errno.h> main () { char* str = "9999999999"; long long int llin; char* endptr; /* Set by strtoll */ int nch; errno = 0; llin = strtoll(str,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.