Home > database >  SQL wrong there. Check out the data
SQL wrong there. Check out the data

Time:09-25

Great god give directions of SQL, wrong there, with the data, thank you
The MERGE INTO TMP3B90C8C7F05911E79701005056F T1
USING (SELECT T3 FDATAVALUE AS FDATAVALUE, T2. FENTRYID AS FENTRYID FROM T_SAL_ORDERENTRY T2
LEFT the JOIN T_BAS_ASSISTANTDATAENTRY_L T3 ON T2.. F_PAEZ_ASSISTANT=T3, T4 FENTRYID)
ON (T1) FORDERID=T4) FENTRYID)
The WHEN MATCHED THEN
UPDATE the SET T1. FLYC_Text=T4. FDATAVALUE
WHEN NOT MATCHED THEN
INSERT (T1) FLYC_Text) VALUES (NULL).

CodePudding user response:

A DML statements, to display the data?

CodePudding user response:

reference 1st floor minsic78 response:
a DML statements, to display the data?


Is a field value of the t4 query out updates to a field of t1, eligible is updated, update not eligible for a null value

CodePudding user response:

What's wrong? Stick down

CodePudding user response:

You this is not just the exists of the update full table

CodePudding user response:

reference baidu_36457652 reply: 3/f
what's wrong? Stick down


The following is an error message, your great god trouble to give directions, thank you

"Kingdee. BOS. SQL. Exception. ParserException" type of Exception in Kingdee. BOS. SQL. DLL, but not in the user code for processing

Other information: the parse error. The detail message is:



Error: expect token & lt; Punctuation,) & gt; , but the current token is & lt; Punctuation,. & gt; At line 9, the column 13)

The source SQL is:

The MERGE INTO TMP10356E36F08111E7AC14B88198B A

USING (SELECT t1 FENTRYID as FENTRYID, t2. FDATAVALUE as FDATAVALUE

The FROM T_SAL_ORDERENTRY t1

Left the join T_BAS_ASSISTANTDATAENTRY_L t2 on t2. FENTRYID=t1. F_PAEZ_ASSISTANT) B

ON (b. ENTRYID=A.F ORDERID)

The WHEN MATCHED THEN

UPDATE the SET A.F LYC_Text=b. DATAVALUE

WHEN NOT MATCHED THEN

INSERT (T1. FLYC_Text) VALUES (");

CodePudding user response:

You should connect this statement to the database in a newspaper what mistakes,
From your error on the point of view, this is not on the database error,

CodePudding user response:

You put the words in PLSQL, see can not

CodePudding user response:

refer to 7th floor jdsnhan response:
you put this sentence in PLSQL, see can not


Perform error
Message 10739, level 15, state 1, line 17
MERGE statement list use the insert column cannot contain more than part of the identifier, please switch to single part of the identifier,

CodePudding user response:

refer to 6th floor xzh19870715 response:
you should connect this statement to the database in a newspaper what mistakes,
From your error on the point of view, this is not on the database error,


Removed after 2 sentences can perform this, but I need to do not conform to the ON the back of the condition is that the T1. FLYC_Text value is set to the default value of the following statement at this time an error, ask how to change, thank you
WHEN NOT MATCHED THEN

INSERT (T1. FLYC_Text) VALUES (");

CodePudding user response:

Is no match to the "update for null values"? Or "set as default values"???????

If written in the statement, as you want to insert a null value, this is meaningless, insert a blank line what mean? If set to the default value (the premise is you to set the default value) of the field, then direct:

INSERT (FLYC_Text) VALUES (DEFAULT);

CodePudding user response:

The
references to the tenth floor minsic78 response:
is no match to the "update for null values"? Or "set as default values"???????

If written in the statement, as you want to insert a null value, this is meaningless, insert a blank line what mean? If set to the default value (the premise is you to set the default value) of the field, then direct:

INSERT (FLYC_Text) VALUES (DEFAULT);


Want to set to the default value is set to not matching
To: INSERT (FLYC_Text) VALUES (normal); This will be an error

Message 10739, level 15, state 1, line 17
MERGE statement list use the insert column cannot contain more than part of the identifier, please switch to single part of the identifier,

CodePudding user response:

11 references qq_21081883 response:
Quote: reference to the tenth floor minsic78 response:

Is no match to the "update for null values"? Or "set as default values"???????

If written in the statement, as you want to insert a null value, this is meaningless, insert a blank line what mean? If set to the default value (the premise is you to set the default value) of the field, then direct:

INSERT (FLYC_Text) VALUES (DEFAULT);


Want to set to the default value is set to not matching
To: INSERT (FLYC_Text) VALUES (normal); This will be an error

Message 10739, level 15, state 1, line 17
MERGE statement list use the insert column cannot contain more than part of the identifier, please switch to single part of the identifier,


INSERT (FLYC_Text) VALUES (' normal ');

String to use single quotation marks

CodePudding user response:

Tried, no use, is still the same, thank you

CodePudding user response:

Teach you a method, select simplify, validate the merge into... When the structure is properly used,

CodePudding user response:

Merge all didn't understand, what do you want to Insert the Insert part data? NULL,,, every don't match and then insert a NULL, to the last number how many?
Have no primary KEY and T1 allow empty words may not be an error, but won't have this kind of writing, the T4 does not match the KEY values of the insert to the T1 will be more meaningful,
The Update part and Insert part should use T4, or you the rationality of the Merge is questionable,

You put aside the Merge logic design out step by step, first consider whether apply to Merge,
Faint feeling do you want to divide kind of case to perform the Update, not the demand of the Insert
  • Related