Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

invalid syntax

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vassilis - 24 Nov 2005 08:55 GMT
this is a simle query comes from a table1,

SELECT Table1.number, ([Table1!number]) AS code, Table1.name, Table1.surname
FROM Table1;

i cant understand why im changing the code field to-->Left([Table1!number], 2)
im taking an invalid syntax message.
Brendan Reynolds - 24 Nov 2005 11:18 GMT
That would be Left([Table1]![number], 2)

Note the additional square brackets.

Signature

Brendan Reynolds

> this is a simle query comes from a table1,
>
[quoted text clipped - 5 lines]
> to-->Left([Table1!number], 2)
> im taking an invalid syntax message.
vassilis - 24 Nov 2005 11:30 GMT
im still getting that message: you omitted an operand or operator, you enter
an invalid character or comma...
the strange is that the trim expression is working ..only the left and right
exps doesnt have an affect.

> That would be Left([Table1]![number], 2)
>
[quoted text clipped - 9 lines]
> > to-->Left([Table1!number], 2)
> > im taking an invalid syntax message.
Sunil - 24 Nov 2005 13:31 GMT
HI,

TRY THIS

SELECT Table1.number, LEFT(TABLE1.NUMBER,2)  AS code, Table1.name,
Table1.surname
FROM Table1;

I HOPE TABLE1.NUMBER IS A TEXT FIELD..

PLS LET ME KNOW IF THIS HELPS U

THANKS

WITH REGDS

SUNIL.T
vassilis - 24 Nov 2005 18:39 GMT
unfortunatly still nothing...ill keep trying but tis getting annoying
yes all fields r text and thats table its just a test for my real db.

Ο χρήστης "Sunil" έγγραψε:

> HI,
>
[quoted text clipped - 13 lines]
>
> SUNIL.T
vassilis - 24 Nov 2005 19:12 GMT
finaly it worked with that format --->LEFT(TABLE1.NUMBER,2)
only insteed of  the "comma" the ";" but i dont know why...i thought that
was something standard. thanks for your time!!
Ο χρήστης "Sunil" έγγραψε:

> HI,
>
[quoted text clipped - 13 lines]
>
> SUNIL.T
John Spencer - 24 Nov 2005 13:35 GMT
I wonder if using the ! vice a . makes a difference.  As well as using reserved
words for field names - such as Name and possibly number.  I would recode this
to read.

SELECT [Table1].[number],
([Table1].[number]) AS code,
[Table1].[name],
 Table1.surname
FROM Table1;

> im still getting that message: you omitted an operand or operator, you enter
> an invalid character or comma...
[quoted text clipped - 17 lines]
> > > to-->Left([Table1!number], 2)
> > > im taking an invalid syntax message.
vassilis - 24 Nov 2005 18:40 GMT
so far i didnt had any progress...thanks for your time...

Ο χρήστης "John Spencer" έγγραψε:

> I wonder if using the ! vice a . makes a difference.  As well as using reserved
> words for field names - such as Name and possibly number.  I would recode this
[quoted text clipped - 27 lines]
> > > > to-->Left([Table1!number], 2)
> > > > im taking an invalid syntax message.
vassilis - 24 Nov 2005 19:13 GMT
finaly it worked with that format --->LEFT(TABLE1.NUMBER,2)
only insteed of  the "comma" the ";" but i dont know why...i thought that
was something standard. thanks for your time!!

Ο χρήστης "John Spencer" έγγραψε:

> I wonder if using the ! vice a . makes a difference.  As well as using reserved
> words for field names - such as Name and possibly number.  I would recode this
[quoted text clipped - 27 lines]
> > > > to-->Left([Table1!number], 2)
> > > > im taking an invalid syntax message.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.