未记录的系统过程'sp_MSforeachtable'和@whereand参数(Undocumented System Procedure 'sp_MSforeachtable' and the @whereand parameter)
我正在尝试使用未记录的系统过程
sp_MSforeachtable
。 但是我需要将受影响的表限制为以“smp”开头并且在“dbo
”模式中的表。 我能够找到如何找到以“smp”开头的程序。 我只是这样做:sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%'' '
但是如何使用
@whereand
参数过滤给定的模式?更新 :我尝试了以下但它没有工作:
sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%'' and Left(''?'', 5)=''[dbo]'' '
更新2 :我在SQL Server 2000上运行。
I'm attempting to use the undocumented system procedure
sp_MSforeachtable
. But I need to restrict the affected tables to those that start with "smp" and that are in the "dbo
" schema. I was able to find how to find procedures that start with "smp". I simply do:sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%'' '
but how do I filter for a given schema using the
@whereand
parameter?UPDATE: I tried the following but it didn't work:
sp_MSforeachtable @command1=' print ''?''', @whereand=' and name like ''smp%'' and Left(''?'', 5)=''[dbo]'' '
Update 2: I'm running on SQL Server 2000.
原文:https://stackoverflow.com/questions/977400
最满意答案
您可以使用该时间戳来确定上次修改文件的时间。 如果该时间比上次解析的最后修改时间戳值更新,则该文件可能已被修改,因此请重新解析它。
更好的方法是在HTTP请求中使用
If-Modified-Since
标头,因此如果文件自上次解析后未被修改,则可以跳过该文件的HTTP下载。You can use that timestamp to determine when the file was last modified. If that time is newer than the last-modified timestamp value from your last parse, the file probably was modified, so re-parse it.
Even better would be to use
If-Modified-Since
headers in your HTTP request, so you can skip the HTTP download of the file if it has not been modified since your last parse.
相关问答
更多-
如何在android上保留图像文件的最后修改日期?(How can I persist last modified date of image file on android?)[2022-03-06]
我不确定这个逻辑会帮助你。 try { InputStream is = new URL("your image url").openStream(); BufferedInputStream bis = new BufferedInputStream(is); Metadata metadata = ImageMetadataReader.readMetadata(bis,true); for (Directory dir ... -
您不需要单独的线程,循环和sleep()调用,您可以使用postDelayed()方法简单地计划对Handler实例的检查。 它将在主线程上执行,这对您来说非常好,并且不会阻止该应用程序。 作为Runnable实例的最后一步,您可以再次安排它,因此它将循环运行。 如果要停止它,请在处理程序上调用removeCallbacksAndMessages(null) 。 我不确定你想用这个来实现什么,但是可能不是做一个轮询循环而是使用FileObserver类来监视文件更改,下面是一个如何使用它的示例。 You d ...
-
如何在Python中获取文件创建和修改日期/时间?(How to get file creation & modification date/times in Python?)[2023-09-20]
以跨平台方式获得某种修改日期很简单 - 只需调用os.path.getmtime(path)即可获得上次修改path时文件的Unix时间戳。 另一方面,获取文件创建日期是依赖于平台的,即使在三大操作系统之间也是如此: 在Windows上 ,文件的ctime (记录在https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx )中存储其创建日期。 您可以通过os.path.getctime()或调用os.stat()的结果的.st_ctime属性访问Pytho ... -
在XSLT中,如何获取XML文件的文件创建/修改日期?(In XSLT, how can you get the file creation/modification date of the XML file?)[2022-03-31]
创建/修改日期必须写入XML文件,否则你不能找到它,除非你以某种方式与文件系统进行通信。 这个问题有点相关: xslt-how-to-get-file-names-from-a-certain-directory After suggestions from Kaarel and Robert, I was able to reach the following solution: Get the file modification date in C# and pass it to the XSLT pr ... -
您可以使用以下代码检查Internet可用性: public boolean isConnectivityOn(Context ctx) { boolean resCode = false; try { ConnectivityManager cm = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE); resCode = cm. ...
-
是否有可能重置Android文件的最后修改日期?(Is it possible to reset the last modified date of an Android file?)[2022-04-15]
setLastModified()是任何可用于更新此值的Java File对象的标准方法。 SDK文档 。 setLastModified() is a standard method on any Java File object that you can use to update this value. SDK Documentation. -
创建Xml文件(Xml file creation)[2021-10-02]
如果有人需要帮助,请参阅下面的内容 XmlElement employee = xmlDoc.CreateElement("employee"); xmlDoc.DocumentElement.AppendChild(employee); Employees.AppendChild(employee); //create the element XmlElement NurseId1 = xmlDoc.CreateElement("EmployeeID"); employee.AppendChild(Nur ... -
您可以使用该时间戳来确定上次修改文件的时间。 如果该时间比上次解析的最后修改时间戳值更新,则该文件可能已被修改,因此请重新解析它。 更好的方法是在HTTP请求中使用If-Modified-Since标头,因此如果文件自上次解析后未被修改,则可以跳过该文件的HTTP下载。 You can use that timestamp to determine when the file was last modified. If that time is newer than the last-modified ti ...
-
current-dateTime()是一个可以调用以查找dateTime运行的函数。 如果要从文件系统中读取信息,则需要http://expath.org/spec/file#pr.last-modified current-dateTime() is a function you can call to find the dateTime is run. If you want to read information from the file system then you need http://ex ...
-
更换 setContentView(R.layout.main); 通过 View vi = View.inflate(this, R.layout.main, null); setContentView(vi); 现在,您可以参考修改后的视图,并可以将其指定到所需的位置。 Replace setContentView(R.layout.main); by View vi = View.inflate(this, R.layout.main, null); setContentView(vi); N ...