Home > database >  Teacher, please help take a look at the following SQL insert statement what is wrong
Teacher, please help take a look at the following SQL insert statement what is wrong

Time:09-18

Insert into public. Rc_errorinfo_enclosure_check (ID, FILE_ID FILE_TYPE, FILE_NAME, SKEW_ANGEL, BORDER, BLANK_PAGE, DPI, EXCEL_ID, AFTER_FILE_PATH, UPDATE_PATH, APPLICATION_PATH, STATUS, HASHCODE_DATA, EXCEL_DATA_ID) values (' 33333333 ', 'JPG', '1', 0, 0, and '(200, 200)', '/share/JPG2/11/324-01-0001-001. The PDF/324-01-0001-001. The pdf_0001. JPG', ', '/share/JPG2/11/324-01-0001-001. The PDF/324-01-0001-001. The pdf_0001. JPG', and ',)
First is the problem that the field type, and then put the correct field type has been submitted to the error: syntax errors near ", "or, if the int type empty data fill in wrong

The type of each field:
ID: serial FILE_ID: int4 FILE_TYPE: varchar
FILE_NAME: varchar SKEW_ANGEL: int4 BORDER: int4
BLANK_PAGE: int4 DPI: varchar EXCEL_ID: int4
AFTER_FILE_PATH: varchar UPDATE_PATH: varchar APPLICATION_PATH: varchar
STATUS: int4 HASHCODE_DATA: varchar EXCEL_DATA_ID: int4

CodePudding user response:

If the value is empty, 'or don't write field
 INSERT INTO PUBLIC. RC_ERRORINFO_ENCLOSURE_CHECK 
(ID,
FILE_ID,
FILE_TYPE,
FILE_NAME,
SKEW_ANGEL,
BORDER,
BLANK_PAGE,
DPI,
EXCEL_ID,
AFTER_FILE_PATH,
UPDATE_PATH,
APPLICATION_PATH,
The STATUS,
HASHCODE_DATA,
EXCEL_DATA_ID)
VALUES
(' 33333333 ', ' ',
'JPG'
'1',
0,
0, ' ',
'(200, 200)', ' ',
'/share/JPG2/11/324-01-0001-001. The PDF/324-01-0001-001. The pdf_0001. JPG',
"',
'/share/JPG2/11/324-01-0001-001. The PDF/324-01-0001-001. The pdf_0001. JPG', ' ',
', ')

CodePudding user response:

Tried to write, so an error: invalid input integer type grammar: ""

CodePudding user response:

NULL or an empty string? Finally if it is to insert a NULL value, you write directly NULL

CodePudding user response:

refer to the second floor of the name is what is called what reply:
I tried to write, so an error: invalid input integer type grammar: ""

Fields become not empty?

CodePudding user response:

Int type if it is empty to write null "this represents a string is empty
  • Related