SQL Server相关问题(SQL Server related question)
我有这个我需要做的事情,一些建议将不胜感激。 我有一个带有一些电话的SQL服务器表。对于每个电话,我有开始和结束时间。
我需要完成的事情:一段时间的存储过程,假设在ax间隔5小时,让我们说2分钟返回连接的呼叫数。
Something like: Interval Nr of Calls Connected 01-01-2010 12:00:00 - 01-01-2010 12:05:00 30 01-01-2010 12:05:01 - 01-01-2010 12:10:00 10 .............
这将是最快的方法吗? 感谢您的帮助
I have this thing that i need to do and some advices will be greatly appreciated. I have a SQL server table with some phone calls.For each phone call i have the start and end time.
What i need to accomplish: a stored procedure which for a certain period of time, let's say 5 hours at a x interval, lets say 2 minutes returns the number of connected calls.
Something like: Interval Nr of Calls Connected 01-01-2010 12:00:00 - 01-01-2010 12:05:00 30 01-01-2010 12:05:01 - 01-01-2010 12:10:00 10 .............
Which will be the fastest way to do that? Thank you for your help
原文:https://stackoverflow.com/questions/2684621
最满意答案
脚本常量是一种方法。 只需要确保只提示用户一次并重复使用源和目标路径的结果。
例如,您可以使用
CreateInputDirPage
并实现脚本常量来引用用户在页面上指定的路径:[Run] Filename: "robocopy.exe"; Parameters: "{code:CopyDir} {code:CopyDir}\OLD"
[Code] var CopyDirPage: TInputDirWizardPage; procedure InitializeWizard(); begin CopyDirPage := CreateInputDirPage(wpSelectDir, 'Select source directory', '', '', False, ''); CopyDirPage.Add('Source directory:'); end; function CopyDir(Params: string): string; begin Result := CopyDirPage.Values[0]; end;
The scripted constant is a way to go. Just just need to make sure you prompt the user just once and reuse the results for both the source an the destination path.
You can for example use
CreateInputDirPage
and implement the scripted constant to refer to a path that a user specified on the page:[Run] Filename: "robocopy.exe"; Parameters: "{code:CopyDir} {code:CopyDir}\OLD"
[Code] var CopyDirPage: TInputDirWizardPage; procedure InitializeWizard(); begin CopyDirPage := CreateInputDirPage(wpSelectDir, 'Select source directory', '', '', False, ''); CopyDirPage.Add('Source directory:'); end; function CopyDir(Params: string): string; begin Result := CopyDirPage.Values[0]; end;
相关问答
更多-
Inno安装文件夹(Inno Setup Folders)[2022-01-10]
如果您正在创建空目录,则可以在脚本中添加[Dirs]部分。 如果您想将文件目录放入安装程序并安装它们,则可以在文件部分使用recursesubdirs标志。 这是两个例子。 ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] ; NOTE: The value of AppId uniquely ... -
Inno设置 - 没有压缩(Inno setup - no compression)[2023-12-11]
您可以使用Compression指令在设置中禁用所有压缩: [Setup] Compression = none 您也可以为单个文件关闭此功能,允许您的下载程序使用nocompression和dontverifychecksum标志更改它们。 如果你真的想让文件分离到安装包,那么你可以使用external标志并使用{src}常量,但是用户需要单独下载每个文件,或者你将它们压缩。 @TLama - thanks external flag works for me solution: Source: "{s ... -
如何让Inno安装程序使用其他安装中的数据文件夹?(How to get Inno Setup to use the data folder from a different install?)[2020-11-12]
一种方法是为两个安装程序使用相同的AppId ,因为另一个安装程序是对主程序包的更新。 并且您可能希望将其与UpdateUninstallLogAppName=no组合以在“添加或删除程序”控制面板中保留主程序包的名称。 或者只使用RegQueryStringValue等注册表函数。 One way is to use the same AppId for both installers, as the other installer is kind of an update of the main pac ... -
现在它的工作,我使用下面的代码: [UninstallDelete] ;This works only if it is installed in default location Type: filesandordirs; Name: "{pf}\{#MyAppName}" ;This works if it is installed in custom location Type: files; Name: "{app}\*"; Type: filesandordirs; Name: "{app} ...
-
直接查询NoIconsCheck复选框: if not WizardForm.NoIconsCheck.Checked then Query NoIconsCheck checkbox directly: if not WizardForm.NoIconsCheck.Checked then
-
我ExecAsOriginalUser的解决方法是使用外部脚本执行数据复制并使用NextButtonClick事件函数的wpReady页面中的NextButtonClick函数调用脚本。 如果有人有兴趣,我会提供更多细节。 The workaround I came up with was using an external script to perform the data copy and calling the script using the ExecAsOriginalUser function ...
-
指定PrivilegesRequired = none并构建您的脚本以使用或不使用管理员权限。 有关详细信息,请参见此处 http://www.kinook.com/blog/?p=53 Specify PrivilegesRequired=none and construct your script to work with or without admin rights. See here for more details: http://www.kinook.com/blog/?p=53
-
脚本常量是一种方法。 只需要确保只提示用户一次并重复使用源和目标路径的结果。 例如,您可以使用CreateInputDirPage并实现脚本常量来引用用户在页面上指定的路径: [Run] Filename: "robocopy.exe"; Parameters: "{code:CopyDir} {code:CopyDir}\OLD" [Code] var CopyDirPage: TInputDirWizardPage; procedure InitializeWizard(); begin C ...
-
您可以让应用程序记录为其创建配置文件的用户,然后将删除逻辑放在主程序或实用程序应用程序中,并在卸载时通过inno的[UninstallRun] Filename: "{app}\WHATEVER.EXE"; Parameters: "/uninstall"运行它[UninstallRun] Filename: "{app}\WHATEVER.EXE"; Parameters: "/uninstall" [UninstallRun] Filename: "{app}\WHATEVER.EXE"; Parame ...
-
如何强制Inno安装程序动态设置安装文件夹(How to force Inno Setup to set the installation folder dynamically)[2023-04-07]
使用脚本常量来设置默认安装路径; 使用DisableDirPage指令阻止用户修改它。 [Setup] DefaultDirName={code:GetDefaultDirName} DisableDirPage=Yes [Code] function GetDefaultDirName(Param: string): string; begin Result := ...; end; Use a scripted constant to set the default installation ...