小编jra*_*ara的帖子

SQL Server:alter table,如何添加SPARSE定义

我想改变我的表并向SPARSE包含大量NULL值的所有字段添加选项.这个ALTER TABLE命令的正确语法是什么?

sql sql-server alter sql-server-2008

10
推荐指数
2
解决办法
3996
查看次数

PowerShell:使用Invoke-Command执行命令错误?

我正在尝试在远程服务器上执行以下语句:

Invoke-Command -ComputerName server1 -ScriptBlock {Get-Process}
Run Code Online (Sandbox Code Playgroud)

但是我收到一条错误消息:

[server1] Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the serv
ice on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS
 or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure …
Run Code Online (Sandbox Code Playgroud)

windows powershell powershell-2.0

9
推荐指数
1
解决办法
2万
查看次数

PowerShell/SQL Server管理单元/工具之间的区别?

我对PowerShell snap和其他与SQL Server交互的"工具"感到困惑.那么这些工具之间有什么区别:

  • SMO
  • SQLPS模块
  • SQLPSX
  • SQL Server PowerShell提供程序

sql-server powershell snap-in

8
推荐指数
1
解决办法
1万
查看次数

如何从单独的日期字段创建日期时间对象?

我有这样的数据集:

    Year MM DD HH
158 2010  7  1  5
159 2010  7  1  5
160 2010  7  1  6
161 2010  7  1  6

structure(list(Year = c(2010L, 2010L, 2010L, 2010L), MM = c(7L, 
7L, 7L, 7L), DD = c(1L, 1L, 1L, 1L), HH = c(5L, 5L, 6L, 6L)), .Names = c("Year", 
"MM", "DD", "HH"), row.names = 158:161, class = "data.frame")
Run Code Online (Sandbox Code Playgroud)

如何从此数据集创建一个日期时间对象(此数据的新列)?

datetime r date

7
推荐指数
2
解决办法
6422
查看次数

如何在Oracle sqlplus中编写for循环?

我正在尝试在Oracle sqlplus接口中编写for循环.当写一个循环语句按一下输入时,我收到一个错误:

SQL> for i in 1..10 loop
SP2-0734: unknown command beginning "for i in 1..." - rest of line ignored.
SQL>
Run Code Online (Sandbox Code Playgroud)

我的for循环子句有问题吗?

sql oracle

7
推荐指数
2
解决办法
3万
查看次数

如何在R中对表对象进行子集化?

如何根据值对表进行子集并返回这些值?这只返回索引:

with(chickwts, table(feed))
with(chickwts, table(feed)) > 11
which(with(chickwts, table(feed)) > 11)
Run Code Online (Sandbox Code Playgroud)

产量

> with(chickwts, table(feed))
feed
   casein horsebean   linseed  meatmeal   soybean sunflower 
       12        10        12        11        14        12 
> with(chickwts, table(feed)) > 11
feed
   casein horsebean   linseed  meatmeal   soybean sunflower 
     TRUE     FALSE      TRUE     FALSE      TRUE      TRUE 
> which(with(chickwts, table(feed)) > 11)
   casein   linseed   soybean sunflower 
        1         3         5         6 
Run Code Online (Sandbox Code Playgroud)

r

7
推荐指数
2
解决办法
1万
查看次数

如何解析Oracle 10g中的相邻列表?

我有这样一张桌子:

+---------+--------+
| EMP_ID  | MGR_iD |
+---------+--------+
|       1 |      1 |
|       2 |      1 |
|       3 |      1 |
|       4 |      2 |
|       5 |      2 |
|       6 |      2 |
|       7 |      3 |
|       8 |      5 |
|       9 |      7 |
|      10 |      5 |
|      11 |      7 |
|      12 |      9 |
|      13 |      9 |
|      14 |      9 |
+---------+--------+
Run Code Online (Sandbox Code Playgroud)

我正在尝试解析此相邻列表以生成以下结果集: …

sql oracle hierarchy oracle10g common-table-expression

7
推荐指数
2
解决办法
237
查看次数

如何使用R或PowerShell从文本文件中提取数据?

我有一个包含这样的数据的文本文件:

This is just text
-------------------------------
Username:          SOMETHI           C:                 [Text]
Account:           DFAG              Finish time:        1-JAN-2011 00:31:58.91
Process ID:        2028aaB           Start time:        31-DEC-2010 20:27:15.30

This is just text
-------------------------------
Username:          SOMEGG            C:                 [Text]
Account:           DFAG              Finish time:        1-JAN-2011 00:31:58.91
Process ID:        20dd33DB          Start time:        12-DEC-2010 20:27:15.30

This is just text
-------------------------------
Username:          SOMEYY            C:                 [Text]
Account:           DFAG              Finish time:        1-JAN-2011 00:31:58.91
Process ID:        202223DB          Start time:        15-DEC-2010 20:27:15.30
Run Code Online (Sandbox Code Playgroud)

有没有办法从这种数据中提取用户名,完成时间,开始时间?我正在寻找一些起点使用R或Powershell.

powershell text-processing r powershell-2.0

6
推荐指数
1
解决办法
4046
查看次数

从数据中删除行:重叠的时间间隔?

编辑:我正在寻找这个问题的解决方案现在也与其他编程语言.

根据我提出另一个问题,我有一个这样的数据集(对于R用户,下面是dput),它代表用户计算机会话:

   username          machine               start                 end
1     user1 D5599.domain.com 2011-01-03 09:44:18 2011-01-03 09:47:27
2     user1 D5599.domain.com 2011-01-03 09:46:29 2011-01-03 10:09:16
3     user1 D5599.domain.com 2011-01-03 14:07:36 2011-01-03 14:56:17
4     user1 D5599.domain.com 2011-01-05 15:03:17 2011-01-05 15:23:15
5     user1 D5599.domain.com 2011-02-14 14:33:39 2011-02-14 14:40:16
6     user1 D5599.domain.com 2011-02-23 13:54:30 2011-02-23 13:58:23
7     user1 D5599.domain.com 2011-03-21 10:10:18 2011-03-21 10:32:22
8     user1 D5645.domain.com 2011-06-09 10:12:41 2011-06-09 10:58:59
9     user1 D5682.domain.com 2011-01-03 12:03:45 2011-01-03 12:29:43
10    USER2 D5682.domain.com 2011-01-12 14:26:05 2011-01-12 14:32:53 …
Run Code Online (Sandbox Code Playgroud)

python powershell perl r

6
推荐指数
1
解决办法
902
查看次数

如何在R中创建仅ascii表作为输出,类似于MySQL风格?

我正在尝试为R找到一个函数,它输出data.frameMySQL样式ascii表中的对象

+----+------+------+
| id | var1 | var2 |
+----+------+------+
|  1 | asdf | g    |
|  2 | asdf | h    |
|  3 | asdf | j    |
+----+------+------+
Run Code Online (Sandbox Code Playgroud)

有这样的功能吗?至少有两种工具可供选择

但有没有办法直接从R做到这一点?

ascii r

6
推荐指数
3
解决办法
992
查看次数