Error MEssage - Cannot Define Field More Than Once

C

carl

When I try to run the query below I get an error message "Cannot Define Field
More Than Once"

Not sure what I am doing wrong. Thank you in advance.

SELECT MMStream.*, [MMStream].[TraderId], Mid([ISIN],10,2) AS GroupCode INTO
Table919
FROM MMStream
WHERE ((([MMStream].[TraderId])="919S0A1") And
((Mid([ISIN],10,2))=Mid([ISIN],10,2)));
 
M

MH

SELECT MMStream.*, [MMStream].[TraderId],

TraderID is defined twice as the asterisk is used in the first argument.
Change to:
SELECT MMStream.*, Mid([ISIN],10,2) AS GroupCode

As you don't need it twice!

MH

carl said:
When I try to run the query below I get an error message "Cannot Define
Field
More Than Once"

Not sure what I am doing wrong. Thank you in advance.

SELECT MMStream.*, [MMStream].[TraderId], Mid([ISIN],10,2) AS GroupCode
INTO
Table919
FROM MMStream
WHERE ((([MMStream].[TraderId])="919S0A1") And
((Mid([ISIN],10,2))=Mid([ISIN],10,2)));
 
O

Ofer Cohen

Remove the fields names and leave the *, try

SELECT MMStream.* INTO
Table919
FROM MMStream
WHERE ((([MMStream].[TraderId])="919S0A1") And
((Mid([ISIN],10,2))=Mid([ISIN],10,2)));
 

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

Top