In my excel I have the following text in a cell:
在我的excel中,我在单元格中有以下文本:
INSERT INTO `educations`(`education_id`, `school`, `specialization`, `date_from`, `date_to`, `user_id`) VALUES (NULL,'NULL','software','2006-01-01 00:00:00','2006-01-01 00:00:00',@inserted_id);
I want to (programmatically) substitute all the 'NULL' and change them to NULL (without the quotes).
我想(以编程方式)替换所有'NULL'并将它们更改为NULL(不带引号)。
I tried using the substitute function but I cannot get it working.
我尝试使用替代功能,但我不能让它工作。
=SUBSTITUTE(DU7;"''NULL''";"NULL")
3 个解决方案
#1
1
Try this,
=SUBSTITUTE(DU7;"'NULL'";"NULL")
Not sure why you were repeating the single quote marks.
不确定为什么要重复单引号。
Malcolm
#2
#3
1
Please try this,
请试试这个,
Single quote -
单引号 -
=SUBSTITUTE(DU7;"'NULL'";"NULL")
Substituting single quotes is easier, just like how you substitute other strings, But substituting double quotes has to be written similar to how you have did.
替换单引号更容易,就像你如何替换其他字符串一样,但用双引号代替必须写成类似于你的方式。
Double Quote-
=SUBSTITUTE(DU7;"""NULL""";"NULL")
#1
1
Try this,
=SUBSTITUTE(DU7;"'NULL'";"NULL")
Not sure why you were repeating the single quote marks.
不确定为什么要重复单引号。
Malcolm
#2
1
Use Find and Replace Function in Excel, Use this
在Excel中使用查找和替换功能,使用此选项
Find What: 'NULL'
找到什么:'NULL'
Replace With: NULL
替换为:NULL
#3
1
Please try this,
请试试这个,
Single quote -
单引号 -
=SUBSTITUTE(DU7;"'NULL'";"NULL")
Substituting single quotes is easier, just like how you substitute other strings, But substituting double quotes has to be written similar to how you have did.
替换单引号更容易,就像你如何替换其他字符串一样,但用双引号代替必须写成类似于你的方式。
Double Quote-
=SUBSTITUTE(DU7;"""NULL""";"NULL")