首页 \ 问答 \ 如何比较两个整数值与文本?(How to compare two integer values with text?)

如何比较两个整数值与文本?(How to compare two integer values with text?)

HTML代码:

<li class="list-group-item ng-binding ng-scope" ng-repeat="sourceMatch in sourceMatches">
   <img ng-src="/static/images/Timesjobs_small.jpg" width="32px" height="32px">
   <span class="badge ng-binding">585784</span>
   Times Jobs
</li>

我收到这个错误。

Expected '52675
Times Jobs' to match '52619 Times Jobs'.

它在第一行显示整数值,第二行显示文本,因此无法进行比较。 如何解决这个问题?


HTML code:

<li class="list-group-item ng-binding ng-scope" ng-repeat="sourceMatch in sourceMatches">
   <img ng-src="/static/images/Timesjobs_small.jpg" width="32px" height="32px">
   <span class="badge ng-binding">585784</span>
   Times Jobs
</li>

I am getting this error.

Expected '52675
Times Jobs' to match '52619 Times Jobs'.

It is showing integer value in first line and text in second line so that am not able to compare. How to fix this?


原文:https://stackoverflow.com/questions/37131487
更新时间:2023-03-07 06:03

最满意答案

在Microsoft SQL Server Management Studio中,您可以右键单击要备份的数据库,然后单击“任务” - >“生成脚本”。

这将弹出一个向导,您可以在其中设置以下内容,以便对数据库执行体面的备份, 即使在远程服务器上也是如此

  • 选择您要备份的数据库,然后点击下一步
  • 在它给你的选项中:
    1. 在2010年:在表/视图选项下,将“脚本数据”和“脚本索引”更改为True,然后再次打开,
    2. 2012年:在“一般”下,将“数据类型到脚本”从“仅限模式”更改为“模式和数据”
    3. 2014年:在“设置脚本选项”的步骤中,现在将“数据脚本”选项“隐藏”,您必须单击“高级”并将“数据类型到脚本”设置为“架构和数据”值
  • 在接下来的四个窗口中,点击“全选”,然后点击“
  • 选择脚本到一个新的查询窗口

一旦完成它的事情,你将有一个备份脚本准备在你面前。 创建新的本地(或远程)数据库,并更改脚本中的第一个“USE”语句以使用新的数据库。 将脚本保存在安全的位置,然后继续运行,并将其运行到新的空数据库中。 这应该创建一个(几乎)重复的本地数据库,然后可以根据需要进行备份。

如果您有完全访问远程数据库,您可以选择在向导的第一个窗口中检查“脚本所有对象”,然后在下一个窗口中将“脚本数据库”选项更改为True。 请注意,您需要在脚本中执行完全搜索和替换数据库名称到新的数据库,在这种情况下,您不必在运行脚本之前创建。 这应该创建一个更准确的重复,但由于权限限制有时不可用。


In Microsoft SQL Server Management Studio you can right-click on the database you wish to backup and click Tasks -> Generate Scripts.

This pops open a wizard where you can set the following in order to perform a decent backup of your database, even on a remote server:

  • Select the database you wish to backup and hit next,
  • In the options it presents to you:
    1. In 2010: under the Table/View Options, change 'Script Data' and 'Script Indexes' to True and hit next,
    2. In 2012: under 'General', change 'Types of data to script' from 'Schema only' to 'Schema and data'
    3. In 2014: the option to script the data is now "hidden" in step "Set Scripting Options", you have to click the "Advanced" and set "Types of data to script" to "Schema and data" value
  • In the next four windows, hit 'select all' and then next,
  • Choose to script to a new query window

Once it's done its thing, you'll have a backup script ready in front of you. Create a new local (or remote) database, and change the first 'USE' statement in the script to use your new database. Save the script in a safe place, and go ahead and run it against your new empty database. This should create you a (nearly) duplicate local database you can then backup as you like.

If you have full access to the remote database, you can choose to check 'script all objects' in the wizard's first window and then change the 'Script Database' option to True on the next window. Watch out though, you'll need to perform a full search & replace of the database name in the script to a new database which in this case you won't have to create before running the script. This should create a more accurate duplicate but is sometimes not available due to permissions restrictions.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。