필터 지우기
필터 지우기

update value in an sql database using 'update' function

조회 수: 2 (최근 30일)
Rusul Altaay
Rusul Altaay 2023년 3월 10일
편집: Sachin 2023년 3월 17일
When I try to use 'update' to change a value in an sql database,
I'm getting this error:
Incorrect number or types of inputs or outputs for function 'update'.
Error in TestFile (line 26)
update(conn,tablename,colnames,data,whereclause)
Here is my code:
conn = postgresql('MyDataBase','','');
tablename = 'lot_numbers'
colnames = 'active_lot'
data = false
whereclause = 'WHERE sub_lot_number = ''1322-test'''
update(conn,tablename,colnames,data,whereclause)
My version of the database toolbox is 10.4

답변 (1개)

Sachin
Sachin 2023년 3월 17일
편집: Sachin 2023년 3월 17일
Since you are receiving this error ‘incorrect number or types of inputs or outputs for function ‘update’’. It may be because of an incorrect input format.
Your inputs to the function ‘update’ must be in the correct formats.
e.g. – ‘whereclause’ specified as a character vector or string scalar for one condition.
Refer to the following page for more information about ‘update’ function inputs and their formats.

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by