首页 \ 问答 \ 使用Oracle中的查询替换列中的字符串(Replace string in a column using query in Oracle)

使用Oracle中的查询替换列中的字符串(Replace string in a column using query in Oracle)

在我的一个oracle表中,每行的一列中都有一个字符串'House Name'。 我需要用'House Number'代替它。 我可以执行更新查询来查找并替换所有行中的此字符串。或者是否有任何内置函数。


In one of my oracle tables, in one column in every row there is a string 'House Name'. I need to replace it with 'House Number'. Can I execute an update query to find and replace this string in all rows.Or is there any built in function for that.


原文:https://stackoverflow.com/questions/18652135
更新时间:2024-01-03 16:01

最满意答案

并非所有选项都默认关闭。 在我们的文档(http://www.jshint.com/docs/)中,您可以看到一些选项是“执行”和一些“放松”[1]。 这意味着默认情况下会显示一些警告,您需要启用“放松”选项才能关闭它们。

现在,有了这些信息,让我们看看你的第二个问题:

/*jshint eqeqeq:false, asi:false */
(function () { console.log(true == true); })()

这段代码将触发一个不安全的比较警告,其中== true和缺少分号。 你试图通过关闭两个选项eqeqeq和asi来解决这个问题。 前者如果设置为true,则需要进行严格的比较并且默认情况下会关闭,因此您可以忽略它。 你会得到一个警告,因为JSHint认为== true/false/0/null比较不安全,并且目前没有办法关闭它(例如,不会有警告a == b )[2]。 后面的选项(asi)是一个放松的选项,所以你实际上需要打开它来告诉JSHint可以容忍丢失的分号。 所以为了让你的例子通过,你需要这样改变它:

/*jshint asi:true */
(function () { console.log(true === true); }()

[1] - 我知道这很混乱。 由于向后兼容,我不能只是改变选项的工作方式,但我正在努力减少混淆。 我将尽快为文档添加每个选项的默认值。

[2] - 即使没有相应的命名选项,即将发布的1.0.0版本将允许您忽略其代码的任何警告。


Not all options are off by default. In our docs (http://www.jshint.com/docs/) you can see that some options are 'enforcing' and some 'relaxing'[1]. This means that some warnings will be displayed by default and you need to enable 'relaxing' option to turn them off.

Now, with this information, let's look at your second question:

/*jshint eqeqeq:false, asi:false */
(function () { console.log(true == true); })()

This code will trigger an unsafe comparison warning for == true and a missing semicolon. You tried to fix that by turning off two options eqeqeq and asi. The former, when set to true, requires strict comparison everywhere and is turned off by default so you can omit it. You get a warning because JSHint considers == true/false/0/null comparisons unsafe and currently there is no way to turn that off (there won't be warning for a == b for example)[2]. And the latter option (asi) is a relaxing option so you actually need to turn it on to tell JSHint that it's okay to tolerate missing semicolons. So to make your example pass you will need to change it this way:

/*jshint asi:true */
(function () { console.log(true === true); }()

[1] — I understand that this is confusing. Because of backwards compatibility I can't just change how options work but I'm working towards making it less confusing. I will add default values for each option to the docs soon-ish.

[2] — The upcoming 1.0.0 release will allow you to ignore any warnings by their code, even if there's no corresponding named option.

相关问答

更多
  • 它说无法找到任务 ,而不是jshint可执行文件。 您需要在文档中定义Grunt任务: // Project configuration. grunt.initConfig({ jshint: { all: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js'] } }); 编辑:当然你也需要在你的package.json中使用grunt-contrib-jshint 。 It is saying a task cannot be found, no ...
  • 您可以直接在jshint源中查看boolOptions , valOptions和invertedOptions对象: https://github.com/jshint/jshint/blob/master/examples/.jshintrc 如果您对评论感到困惑,可以参考jshint帮助中的选项部分: http://jshint.com/docs/options/ You can look on boolOptions, valOptions and invertedOptions objects d ...
  • MDN:逗号运营商 逗号运算符计算每个操作数(从左到右)并返回最后一个操作数的值。 例 function myFunc() { var message = "hello"; return (message += "howareya", message); } // returns "hellohowareya" MDN: Comma Operator The comma operator evaluates each of its operands (from left to right) an ...
  • 不幸的是,我们的Rhino包装器非常基本,不支持配置文件。 拥有它可能会很好 - 也许你想创建一张票? Unfortunately, our Rhino wrapper is pretty basic and doesn't support config files. It would be nice to have that—perhaps you would like to create a ticket?
  • 并非所有选项都默认关闭。 在我们的文档(http://www.jshint.com/docs/)中,您可以看到一些选项是“执行”和一些“放松”[1]。 这意味着默认情况下会显示一些警告,您需要启用“放松”选项才能关闭它们。 现在,有了这些信息,让我们看看你的第二个问题: /*jshint eqeqeq:false, asi:false */ (function () { console.log(true == true); })() 这段代码将触发一个不安全的比较警告,其中== true和缺少分号。 你试 ...
  • 我有点尴尬但也很高兴地说内联语法确实有效。 但是由于默认选项,很难说清楚。 我阅读了大部分Chirpy代码库以及UglifyJS的代码库,以确定Chirpy只是将选项的所有值都设置为false 。 这意味着它不需要很多JavaScript代码。 要打开最严格的JSHint选项,请在JS文件的顶部使用它: /*jshint bitwise: true, curly: true, eqeqeq: true, immed: true, newcap: true, noarg: true, noempty: tr ...
  • grunt的精神更多的是编码gruntfile本身使用的文件,而不是在命令行上指定它。 因此,我们需要更多详细信息,说明您为什么要这样做。 我想象了两种可能性: 你只想处理一个子组件:在这种情况下,你会为每个子组件声明不同的目标,并从命令行调用目标: grunt jshint component1 with在你的Gruntfile中: jshint: { component1: [filePath1], component2: [filePath2] } 这是一个性能问题:你只想jshint一些文 ...
  • 您需要添加导出的指令 /*exported variableName */ You need to add the exported directive /*exported variableName */
  • globals是一个数组,不是真的假,这是我的例子。 查找工作就像你在想的那样。 gulp.src(files.backend) .pipe(jshint({ "lookup": false, /* other options */ "globals": ['$']})) .pipe(jshint.reporter(stylish)) .on('error', gutil.log); globals is an array, not true false, here is my e ...
  • 确定这一点的一种方法是在JSCS Github Repo中搜索“JSHint”或特定规则( 示例搜索 ),因为JSCS文档中的相关规则都具有指向其JSHint等效项的链接。 在撰写本文时,这些是您的短名单的等价物: camelcase = requireCamelCaseOrUpperCaseIdentifiers immed = requireParenthesesAroundIIFE indent = validateIndentation maxlen = maximumLineLength newc ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)