Update Query ODBC --- call failed

L

Lez

Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
B

Banana

Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server (guessing
based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables; can
you open it just fine?
 
L

Lez

Hey Banana,

This is a regular query, I can open the tables directly. If I change the
query to a right join the query runs, but the update naturally does not
work.

The query tries to run, i.e. you can see the progress bar moving, then the
error occurs

Thanks
Lez



Banana said:
Is this a passthrough query or regular query? If it's a passthrough query,
then I think the SQL isn't correct for the SQL Server (guessing based on
the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that works
using exact same connection string? What about linked tables; can you open
it just fine?

Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
B

Banana

I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver" or
"SQL Native Client", I'm inclined to think there is something flaky with
the process of passing this particular query, but let's verify if you
can get it to work on the SQL Server without any errors.

Hey Banana,

This is a regular query, I can open the tables directly. If I change the
query to a right join the query runs, but the update naturally does not
work.

The query tries to run, i.e. you can see the progress bar moving, then
the error occurs

Thanks
Lez



Banana said:
Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server (guessing
based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables;
can you open it just fine?

Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
L

Lez

I am having a problem writing the query in SQL, this is what I have got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table DS_SKU I
want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK for the
tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




Banana said:
I see.

Are both tables linked? What happen if you run a equivalent query in T-SQL
via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver" or
"SQL Native Client", I'm inclined to think there is something flaky with
the process of passing this particular query, but let's verify if you can
get it to work on the SQL Server without any errors.

Hey Banana,

This is a regular query, I can open the tables directly. If I change the
query to a right join the query runs, but the update naturally does not
work.

The query tries to run, i.e. you can see the progress bar moving, then
the error occurs

Thanks
Lez



Banana said:
Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server (guessing
based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables; can
you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
B

Banana

Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
I am having a problem writing the query in SQL, this is what I have got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table DS_SKU
I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK for
the tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




Banana said:
I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver"
or "SQL Native Client", I'm inclined to think there is something flaky
with the process of passing this particular query, but let's verify if
you can get it to work on the SQL Server without any errors.

Hey Banana,

This is a regular query, I can open the tables directly. If I change
the query to a right join the query runs, but the update naturally
does not work.

The query tries to run, i.e. you can see the progress bar moving,
then the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server
(guessing based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables;
can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
L

Lez

sorry if this is dumb question, do I need to replace the d & p with my table
names?

Banana said:
Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
I am having a problem writing the query in SQL, this is what I have got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table DS_SKU
I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK for
the tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




Banana said:
I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver" or
"SQL Native Client", I'm inclined to think there is something flaky with
the process of passing this particular query, but let's verify if you
can get it to work on the SQL Server without any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I change
the query to a right join the query runs, but the update naturally does
not work.

The query tries to run, i.e. you can see the progress bar moving, then
the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server (guessing
based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables;
can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve it

Thank you.
 
B

Banana

Look at the FROM clause; you'll see that your table's original name are
still there. d & p are just an alias for those two tables, to which both
UPDATE & columns in SET as well ON clause refer to.

So yes, replace the column's table reference with the alias, but just
add the d & p in your FROM clause.
sorry if this is dumb question, do I need to replace the d & p with my
table names?

Banana said:
Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
I am having a problem writing the query in SQL, this is what I have got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table
DS_SKU I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK
for the tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL
Driver" or "SQL Native Client", I'm inclined to think there is
something flaky with the process of passing this particular query,
but let's verify if you can get it to work on the SQL Server without
any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I
change the query to a right join the query runs, but the update
naturally does not work.

The query tries to run, i.e. you can see the progress bar moving,
then the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a
passthrough query, then I think the SQL isn't correct for the SQL
Server (guessing based on the fact that your tables has prefix
'dbo_').

If it's a regular query, do you have another passthrough query
that works using exact same connection string? What about linked
tables; can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I
resolve it

Thank you.
 
L

Lez

OK, to advise, I replaced the table names for the d & p and it worked fine.
However, I need this to be a right join query, as I need it to add and
update product in table DS_SKU.

Will a Right Join work in SQL 2005?




Lez said:
sorry if this is dumb question, do I need to replace the d & p with my
table names?

Banana said:
Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
I am having a problem writing the query in SQL, this is what I have got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table DS_SKU
I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK for
the tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver"
or "SQL Native Client", I'm inclined to think there is something flaky
with the process of passing this particular query, but let's verify if
you can get it to work on the SQL Server without any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I change
the query to a right join the query runs, but the update naturally
does not work.

The query tries to run, i.e. you can see the progress bar moving, then
the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server
(guessing based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables;
can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve
it

Thank you.
 
L

Lez

Further update, and thanks for you help with this, table DS_SKU current has
22,969 records and table PROD has 23,170 so what I am looking to do is
update any records that are already in DS_SKU and add any new ones, so
should be adding 201 new records.
I have changed it to a RIGHT JOIN, and it ran, but still only ended up with
22,969 records.

Can you suggest anything?


Lez said:
OK, to advise, I replaced the table names for the d & p and it worked
fine. However, I need this to be a right join query, as I need it to add
and update product in table DS_SKU.

Will a Right Join work in SQL 2005?




Lez said:
sorry if this is dumb question, do I need to replace the d & p with my
table names?

Banana said:
Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
ON d.[SKU Code]= p.[SKU_Code];

Lez wrote:
I am having a problem writing the query in SQL, this is what I have
got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table
DS_SKU I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK for
the tables
-- I have omitted the WHERE keyword as I want to update the whole table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL Driver"
or "SQL Native Client", I'm inclined to think there is something flaky
with the process of passing this particular query, but let's verify if
you can get it to work on the SQL Server without any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I change
the query to a right join the query runs, but the update naturally
does not work.

The query tries to run, i.e. you can see the progress bar moving,
then the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a passthrough
query, then I think the SQL isn't correct for the SQL Server
(guessing based on the fact that your tables has prefix 'dbo_').

If it's a regular query, do you have another passthrough query that
works using exact same connection string? What about linked tables;
can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I resolve
it

Thank you.
 
B

Banana

1) You can't use UPDATE query to insert missing records. You would
either execute two separate queries, one to update the matching rows,
and one to insert the missing rows, or use MERGE statement (I think it's
only on SQL Server 2005 or later) to perform them as a single operation.

2) Generally speaking, it's usually preferable that we use LEFT JOIN
rather than RIGHT JOIN; this is out of convention and usually easier to
read/comprhend, and in most cases, RIGHT JOIN can be re-written as LEFT
JOIN by swapping the tables around. You don't have to change the table
name/alias in UPDATE, though.

Further update, and thanks for you help with this, table DS_SKU current
has 22,969 records and table PROD has 23,170 so what I am looking to do
is update any records that are already in DS_SKU and add any new ones,
so should be adding 201 new records.
I have changed it to a RIGHT JOIN, and it ran, but still only ended up
with 22,969 records.

Can you suggest anything?


Lez said:
OK, to advise, I replaced the table names for the d & p and it worked
fine. However, I need this to be a right join query, as I need it to
add and update product in table DS_SKU.

Will a Right Join work in SQL 2005?




Lez said:
sorry if this is dumb question, do I need to replace the d & p with
my table names?

Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
ON d.[SKU Code]= p.[SKU_Code];

Lez wrote:
I am having a problem writing the query in SQL, this is what I have
got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table
DS_SKU I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK
for the tables
-- I have omitted the WHERE keyword as I want to update the whole
table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




I see.

Are both tables linked? What happen if you run a equivalent query
in T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL
Driver" or "SQL Native Client", I'm inclined to think there is
something flaky with the process of passing this particular query,
but let's verify if you can get it to work on the SQL Server
without any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I
change the query to a right join the query runs, but the update
naturally does not work.

The query tries to run, i.e. you can see the progress bar moving,
then the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a
passthrough query, then I think the SQL isn't correct for the
SQL Server (guessing based on the fact that your tables has
prefix 'dbo_').

If it's a regular query, do you have another passthrough query
that works using exact same connection string? What about linked
tables; can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I
resolve it

Thank you.
 
L

Lez

Ok thanks for that. Can I ask which order would you recomemd the queries to
run, should I run the update, then the insert?I assume that would be the
best method.

Also for an insert do I just name the columns like in the update?

many thanks
Lez


Banana said:
1) You can't use UPDATE query to insert missing records. You would either
execute two separate queries, one to update the matching rows, and one to
insert the missing rows, or use MERGE statement (I think it's only on SQL
Server 2005 or later) to perform them as a single operation.

2) Generally speaking, it's usually preferable that we use LEFT JOIN
rather than RIGHT JOIN; this is out of convention and usually easier to
read/comprhend, and in most cases, RIGHT JOIN can be re-written as LEFT
JOIN by swapping the tables around. You don't have to change the table
name/alias in UPDATE, though.

Further update, and thanks for you help with this, table DS_SKU current
has 22,969 records and table PROD has 23,170 so what I am looking to do
is update any records that are already in DS_SKU and add any new ones, so
should be adding 201 new records.
I have changed it to a RIGHT JOIN, and it ran, but still only ended up
with 22,969 records.

Can you suggest anything?


Lez said:
OK, to advise, I replaced the table names for the d & p and it worked
fine. However, I need this to be a right join query, as I need it to add
and update product in table DS_SKU.

Will a Right Join work in SQL 2005?




sorry if this is dumb question, do I need to replace the d & p with my
table names?

Try this. (untested)

UPDATE d
SET d.[SKU_Code] = p.[SKU Code]
FROM [DS_SKU] d
INNER JOIN [PROD] p
ON d.[SKU Code]= p.[SKU_Code];

Lez wrote:
I am having a problem writing the query in SQL, this is what I have
got:

UPDATE [DS_SKU] --The table I want to update
SET [SKU_Code] = [PROD].[SKU Code], --The field from table
DS_SKU I want updated from table PROD, Field SKU Code
FROM [DS_SKU] -- Have tried both tables
INNER JOIN [PROD] --This is the join of the table,
ON [PROD].[SKU Code]=[DS_SKU].[SKU_Code]; -- This is the PK & FK
for the tables
-- I have omitted the WHERE keyword as I want to update the whole
table

But keep getting this error:

Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'FROM'.




I see.

Are both tables linked? What happen if you run a equivalent query in
T-SQL via SQL Sever Management Studio?

Considering that the error came from "ODBC Manager", not "SQL
Driver" or "SQL Native Client", I'm inclined to think there is
something flaky with the process of passing this particular query,
but let's verify if you can get it to work on the SQL Server without
any errors.


Lez wrote:
Hey Banana,

This is a regular query, I can open the tables directly. If I
change the query to a right join the query runs, but the update
naturally does not work.

The query tries to run, i.e. you can see the progress bar moving,
then the error occurs

Thanks
Lez



Is this a passthrough query or regular query? If it's a
passthrough query, then I think the SQL isn't correct for the SQL
Server (guessing based on the fact that your tables has prefix
'dbo_').

If it's a regular query, do you have another passthrough query
that works using exact same connection string? What about linked
tables; can you open it just fine?


Lez wrote:
Hi Guys,

I am trying to complete an update query, this is my SQL:

UPDATE dbo_PROD LEFT JOIN dbo_DS_SKU ON dbo_PROD.[SKU Code] =
dbo_DS_SKU.SKU_code
SET dbo_DS_SKU.SKU_productname = [dbo_PROD].[Product Name],
dbo_DS_SKU.SKU_code = [dbo_PROD].[SKU Code];

Each time I try to run this update I keep getting an ODBC error
message:

ODBC --- call failed
[Microsoft][ODBC Driver Manager] Invalid argument value (#0)

Can anyone advise why this error would occur and how can I
resolve it

Thank you.
 

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

Similar Threads


Top