invalid syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.

Brendan Reynolds said:
That would be Left([Table1]![number], 2)

Note the additional square brackets.

--
Brendan Reynolds

vassilis said:
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.
 
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
 
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...
the strange is that the trim expression is working ..only the left and right
exps doesnt have an affect.

Brendan Reynolds said:
That would be Left([Table1]![number], 2)

Note the additional square brackets.

--
Brendan Reynolds

vassilis said:
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.
 
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" έγγÏαψε:
 
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
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...
the strange is that the trim expression is working ..only the left and right
exps doesnt have an affect.

Brendan Reynolds said:
That would be Left([Table1]![number], 2)

Note the additional square brackets.

--
Brendan Reynolds

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.
 
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" έγγÏαψε:
 
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
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...
the strange is that the trim expression is working ..only the left and right
exps doesnt have an affect.

Brendan Reynolds said:
That would be Left([Table1]![number], 2)

Note the additional square brackets.

--
Brendan Reynolds

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top