由买买提看人间百态

topics

全部话题 - 话题: sqlcmd
(共0页)
r****r
发帖数: 2
1
来自主题: Database版 - Question about T-SQL
declare @sqlcmd varchar(1024),
@product varchar(32)
select @procut = 'product'
select @sqlcmd = 'select * from ' +
quoatename(@product,'''')
exec(@sqlcmd)
that's it.
s**********0
发帖数: 266
2
来自主题: Database版 - SQL Server - delcare variable dynamically
declare @sqlcmd varchar(8000)
set @sqlcmd = 'declare @col_1 int; set @col_1 = 3; print @col_1'
exec (@sqlcmd)
i****a
发帖数: 36252
3
来自主题: Database版 - SQL Server - delcare variable dynamically
LS has the correct info.
you need to construct your @sqlcmd fully before you execute.
do "print @sqlcmd", copy the result and execute it in new window

doing:
can
a*****e
发帖数: 1717
4
Here's python one I used before,
drawbacks:
1. data pacing violation, limit on size of each quote, interval etc.
2. futures symbols are less standardized
3. IB data sucks, but ok for median to long term backtest
4. the ibpy is out-dated, you have to update yourself to get new
features.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from ib.ext.Contract import Contract
from ib.opt import ibConnection, message
from time import sleep
from datetime import date
import pyodbc, os, sys
# print all mess... 阅读全帖
c****7
发帖数: 4192
5
来自主题: Seattle版 - 花了2天去找一个bug
最后发现居然是因为sqlcmd不能take超过2G的文件!
http://connect.microsoft.com/SQLServer/feedback/details/272757/
然后我发现所有grep,tail都tmd的超过2g都不work,也不报错。
微软你能再傻b点吗?都win8 64位机器的,07年的bug还说work as design。好歹你告
诉我不能handle 2g以上的文件啊!
怪不得用windows开发要死人的。
b********r
发帖数: 59
6
Or take a look at osql or sqlcmd (both are command line
utilities for SQL Server 2000/2005) for complicated queries
b********r
发帖数: 59
7
来自主题: Database版 - 问个问题
Sorry, it works only in SQL Server.
For SQL Server 2k5 or 2k8, you can use sqlcmd to replace osql
c*****d
发帖数: 6045
8
sqlcmd也可以
c*****d
发帖数: 6045
9
create file c:\demo.sql
declare @name1 char(20);
declare @name2 char(20);
set @name1='abc';
set @name2=CONVERT(VARCHAR(20),GETDATE(),112);
select @name1;
select @name2;
go
然后在dos下
sqlcmd -S your_server_ip -U user_name -P password -i c:\demo.sql -o c:\out_
20091106.txt
g********e
发帖数: 9
10
客户需要我们每天9点送一个文件.写了一个很简单的store procedure.问题是怎样可以
每天早上自动运行这个store procedure,然后把结果存在一个delimited形式的文件里,
再把这个文件放到客户的ftp site?
用SQLCMD吗?怎么用?
请大牛指点.谢谢
u**d
发帖数: 211
11
来自主题: Database版 - 请问 sql server Script 执行的问题
用 sql server,有一个 Script,主要是 insert 之类的更新
我想在 sql server management studio 的窗口里执行文件里的
script,应该用什么命令?
网上搜了一下,sqlcmd osql 之类的都是在命令行执行
谢谢!
y****9
发帖数: 144
12
来自主题: Database版 - SQL Servedr complete recovery question
New to SQL server ( just try to learn it as an Oracle DBA), did a test about
recovering a db, can someone tell me how to do a complete recovery in the
following case:
1. big_table reference point:
1> select max(id) from big_table;
2> go
-----------
2000000
2. Backup database testdata
3. insert several records into table big_table in the testdata database
1> select max(id) from big_table;
2> go
-----------
2000003

4. Shutdown the instance
5. delete the ... 阅读全帖
y****9
发帖数: 144
13
来自主题: Database版 - SQL Server - how to obtain data type name

I was using SQLCMD in SQL Server 2008.
j*******7
发帖数: 6300
14
来自主题: Database版 - best sql server client
提醒大家:osql这个工具一定不要再用了!!!它会把script中的non-ascii字符替换
成另外的字符,我们这儿出过事故。用sqlcmd,参数可以完全一样。
d******i
发帖数: 7160
15
来自主题: Programming版 - Windows下大家都用什么SqlConsole啊?
我装过2005 express。
不过装完后没找到sqlcmd(你是说用这个console吧).
你用的哪个版?
(共0页)