g***l 发帖数: 18555 | 1 HIGHLIGHT TABLE NAME按ALT+F1不就可以看SCHEMA了。还什么SP_HELP,老掉牙了 |
|
|
|
k*****n 发帖数: 361 | 4 从一个SQL server move 数据到另一个 SQL server,目的地SQL server有个database
owner dbo权限
但是存放SSIS package指定好目的地SQL server还是出错说没有SSIS execute
permission
是要和dba说加SSIS permission还是有另外的办法?
试过存在自己local 的PC上肯定不行,对不? |
|
g***l 发帖数: 18555 | 5 谁EXE这个PROGRAM,SCHEMA呢?是DBO吗?还有一种可能,DROP 到MASTER DATABASE去了?LOL |
|
m*********y 发帖数: 389 | 6 Thanks for your insight, I know exactly what I want to achieve, just not
sure if there are better way to do it.. here is some queries I wrote for
checking inconsistencies across the same db on different servers.
Is Quest a tool within SQL server tuner?
Anyway, i have these un-sync issues that I want to check:
1.Log in
2.column name
3.index
4.total rows
5.total size of the table
I want to check these things on Dev server and Production server, and then I
want the production team and DBA and opera... 阅读全帖 |
|
y****w 发帖数: 3747 | 7 automatic job,
send email by SMTP module,
good enough?? 你呼唤下zenny等sql大牛吧.
exec master.dbo.sp_SQLNotify ‘s****[email protected]’,'admin@localserver.
com’,'Backup Job Failure,’The Backup Job failed’ |
|
i****i 发帖数: 18 | 8 I have a question about T- SQL language.
I wrote a query to get the SUM of every line's Amount with the same
Initiative Key.
SELECT
[Initiative Key]
,[Amount]
,SUM ([Amount]) OVER (PARTITION BY ([Initiative Key])) AS SUM_AMOUNT
FROM [DataClean].[dbo].['Initiative Donations$']
ORDER BY SUM_AMOUNT DESC
Here is the result,
Initiative Key Amount SUM_AMOUNT
KBERFVSJRZIL 10 380
KBERFVSJRZIL 25 380
KBERFVSJRZIL 10 380
KBERFVSJRZIL 10 380
KBERFVSJRZ... 阅读全帖 |
|
s**********o 发帖数: 14359 | 9 你QUERY写错了吧
SELECT
[Initiative Key]
,SUM ([Amount])
FROM [DataClean].[dbo].['Initiative Donations$']
GROUP BY [Initiative Key] |
|
S**H 发帖数: 1256 | 10 set up a variable : currentFile ( string)
in the Execute SQL statement.
general
sourceType: Direct Input
SQL statement:
insert into dbo.logTable values
(@[User::CurrentFile],getdate(),getdate())
got error: the name is not permitted in this context. column name
not permitted.
Thanks a lot |
|
S**H 发帖数: 1256 | 11 Thanks!!!! It seems work now.
what I did
IN " Parameter Mapping"
new variable name: user::currentFile, ParameterName:0
type: varchar.
the sql code is like this now:
insert into dbo.logTable values
(?,getdate(),getdate())
*****************
Another Question:
If I have multiple varialbes needed to be passed.
How does the query know which ? is which ?
thanks !!!! |
|
s**********o 发帖数: 14359 | 12 MIGRATION的DATABASE 有时候db owner有时候都不能BROWSE的,跟DEFAULT SCHEMA有关
系,应该是DBO |
|
B*********L 发帖数: 700 | 13 下面的,是现在的code。其中A column,希望变成Hyperlink,怎么改比较简洁?谢谢
了。
DECLARE @SQLString nvarchar(max)
SET @SQLString = N'
SET NOCOUNT ON;
SELECT A,B,C FROM TABLE1
SELECT A,E,F FROM TABLE2
SELECT A,H,K FROM TABLE3
SELECT A,X,Y FROM TABLE4
'
EXEC msdb.dbo.sp_send_dbmail @profile_name = 'yyy'
, @recipients = 'x*[email protected]'
, @subject = 'TEST'
, @query = @SQLString
, @exclude_query_output = 1
, @query_no_truncate = 0
, @query_result_header = 1
, @append_query_error=1 |
|
B*********L 发帖数: 700 | 14 总算可以了:
DECLARE @tableHTML NVARCHAR(MAX)
SET @tableHTML =
N'
SET NOCOUNT ON;
PRINT ''name NAME_html ''
SELECT [name]
,''http://xxxx.com/Report.aspx?ID='' + [name] + ''>'' + [name] + ''''
,'' ''
FROM table WITH (NOLOCK)
' ;
EXEC msdb.dbo.sp_send_dbmail @profile_name = 'RF_Performance'
, @recipients = 'l*****[email protected]'
, @subject = 'test'
, @importance = 'High'
, @query = @tableHTML
, @exclude_query_output = 1
, @query_no_truncate = 0
,... 阅读全帖 |
|
J*****u 发帖数: 44 | 15 不知道是不是这样的?你的inventory是在update还是在delete时fire trigger?
use "yourdb"
create trigger trg1 on dbo.yourdb
after update
as
begin
...
end
go |
|
y****w 发帖数: 3747 | 16 sql server guy好像都特喜欢把啥都放在dbo下面。 |
|
y*****g 发帖数: 677 | 17 有点意思,板凳先观看一会儿
dbo 就是SQL SERVER 的干活 |
|
z**********8 发帖数: 2049 | 18 SELECT RecordSourceID, [1] AS JAN, [2] AS FEB, [3] AS MAR, [4] AS APR, [5]
AS MAY, [6] AS JUN, [7] AS JUL, [8] AS AUG, [9] AS SEP, [10] AS OCT, [11] AS
NOV, [12] AS DEC
FROM
(SELECT personid, Month(DateEntered), RecordSourceID
FROM dbo.tblPerson
WHERE RecordSourceID BETWEEN 152 AND 162 AND LoginPass IS NOT NULL AND year(
DateEntered)=2013) p
pivot
(
COUNT (personid)
FOR MONTH(DATEENTERED) IN
( [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12])
)AS pvt
结果出不来啊。
Msg 170, Level 15, Sta... 阅读全帖 |
|
i*******d 发帖数: 81 | 19 请问DB2中可以用table variable么?
SQL Server中很容易实现:
CREATE FUNCTION dbo.f_Name(
@List VARCHAR(2000)
,@Delim VARCHAR(10)
)
RETURNS VARCHAR(2000)
AS
BEGIN
DECLARE @t_Name TABLE (Item VARCHAR(2000))
.....................
.....................
RETURN @sth
END
GO
DB2有类似的功能么?多谢! |
|
r**********d 发帖数: 510 | 20 select @@version;
Microsoft SQL Server 2012 - 11.0.2218.0 (X64)
Jun 12 2012 13:05:25
Copyright (c) Microsoft Corporation
Enterprise Evaluation Edition (64-bit) on Windows NT 6.1 (Build
7601: Service Pack 1)
CREATE TABLE coolbid
(
ID INT UNIQUE
);
GO
INSERT INTO coolbid
VALUES (1),
(2),
(3);
GO
(3 row(s) affected)
INSERT INTO coolbid
VALUES (1);
GO
Msg 2627, Level 14, State 1, Line 2
Violation of UNIQUE KEY constraint 'UQ__coolbid__3214EC26654E5167'. Cannot
insert duplic... 阅读全帖 |
|
s****e 发帖数: 54 | 21 Hi,
I have 2 server, one is local one is remote.
I have no problem to use sql management studio to set up the connection.
But what I want is to create a view, this view will get the information from
a table in the remote server.
I added the remote server link.
I can run :
use localserver
select * from sys.servers where name='remote server'
but when I try this:
select * from [remote server].[remote database].[dbo].[remote table]
where UniqueID='17'
uniqueID is the column name in the ... 阅读全帖 |
|
m*****y 发帖数: 229 | 22 你要有linked server才行吧。[linked server].[remote database].[dbo].[remote
table] |
|
w****n 发帖数: 266 | 23 用openquery 从oracle提取数据到sql server,为什么dash-dash comment outside of
the query也会导致exception access violation,系统生成stack dump.
BEGIN STACK DUMP:
* 09/17/05 01:01:37 spid 59
*
* ... 阅读全帖 |
|
z**********8 发帖数: 2049 | 24 WITH PivotData AS
(
select CalendarYear, state, personid
from [dbo].[tblImportPerson])
select CalendarYear, [2008], [2009]
from pivotData
pivot ( sum(personid) for state IN ([2008],[2009])) as p;
--Msg 102, Level 15, State 1, Line 9
Incorrect syntax near ')'.
谢谢! |
|
A*******n 发帖数: 625 | 25 try this:
select *
from (
select CalendarYear, state, personid
from [dbo].[tblImportPerson]
) as s
pivot
( count(personid)
for state in ([PA],[TX])
) as p |
|
z**********8 发帖数: 2049 | 26 我所有的数据都varchar, 也不行啊。
with pivotdata as
(
select state, year, personid
from [dbo].[Sheet2$]
)
select state, [2008], [2009]
from pivotdata
pivot(count(personid) FOR year in ([2008], [2009])) as p; |
|
|
w*s 发帖数: 7227 | 28 Hi 大牛们,
i downloaded AdventureWorks2012_Data.mdf,
i can open it using sql server 2012 express.
Now i'm following the book trying to create a c# project connect to it,
(the book uses NorthWind db file, i cannot open it as it's not for sql 2012)
at step 9, i choosed my db file, i click "ok", but nothing happens other
than hearing a bell.
Any help appreciated !
1. Create a new console application project called BegVCSharp_24_1_
FirstLINQtoDatabaseQuery in the
directory C:BegVCSharpChapter24.
2. Pre... 阅读全帖 |
|
G*********a 发帖数: 1080 | 29 一个text文件是由好多这样的单位组成的:从//AC标志着开始。
需要把每个这样的单位里从P0到12的数据存成一个array,但是array的长度-12,不是
已知的。每个不同。
一边读入一边存,除了设个boolean调节起始,还有什么更简单的方法吗?
//
AC M00001
XX
ID V$MYOD_01
XX
DT 19.10.1992 (created); ewi.
DT 22.10.1997 (updated); dbo.
CO Copyright (C), Biobase GmbH.
XX
P0 A C G T
01 1 2 2 0 S
02 2 1 2 0 R
03 3 0 1 1 A
04 0 5 0 0 C
05 5 0 0 0 A
06 0 0 |
|
c*****m 发帖数: 1160 | 30 周日上午解决一个问题,心情愉快啊。
那个表里面保存着版本的名字,比如 version 3.14.5.6, 和 version 3.2.3.4 ,我不
能用string来排序,所以先split开来,然后过滤掉非数字,cast成int (两者合并为
convertstringtoint函数),最后像上面那样累加起来,所以现在只要
order by dbo.fn_ConvertVersionToInt(versionname)就可以很好地排序了。
Now I can take a shower and start my Sunday! |
|
p****1 发帖数: 275 | 31 【 以下文字转载自 JobHunting 讨论区 】
发信人: peace1 (peace1), 信区: JobHunting
标 题: C#, recruiter发过来的面试题
发信站: BBS 未名空间站 (Thu Sep 8 22:17:38 2016, 美东)
有兴趣做不? 我琢磨着, 出题的人是在寻找最优解 :)
Given the table [tSWIFT_History_Trades] , the C# structure TradeNAK and the
C# method UpdateTradeACKNAKDB as defined below:
CREATE TABLE [tSWIFT_History_Trades](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[BatchId] [varchar](25) NOT NULL,
[TradeId] [varchar](25) NOT NULL,
[Account] [varchar](25) ... 阅读全帖 |
|
l****t 发帖数: 251 | 32 之前电脑发不了中文,发了帖子没人回复~~心里好紧张啊,好不容易有个面试。请有经验的前辈们进来帮帮忙,讲讲一些你们的经验~~
非常感谢啊!!
does anyone work for BDO or know it?
I just got an interview opportunity from BDO for associate assurance
position. I'm so so nervous now, because this is my first real interview i'
ve got so far.
please help me!
do they sponsor H1B?
Thanks a lot for help!! |
|
j*******y 发帖数: 89 | 33 People who knows knows BDO. Sorry I don't know. |
|
a****d 发帖数: 607 | 34 i always thought only BDO ppl know this. thanks for knowing it. LOL. |
|
a****d 发帖数: 607 | 35 从09年开始不办签证了,不过这是加州情况,别州不知道。
有经验的前辈们进来帮帮忙,讲讲一些你们的经验~~ |
|
l****t 发帖数: 251 | 36 谢谢~~我也怕不SPONSOR HIB。好不容易有个面试,真不想丢掉~~ |
|
a****d 发帖数: 607 | 37 面了再说阿,就当面世练习。我觉得大公司如果不办签证,根本就不会叫你去面的,HR
都清楚这些东西。 |
|
g********e 发帖数: 48 | 38 BDO好像不sponsor,
当初好像到学校搞活动,
一明确说不sponsor,人走了一半。
不过不论如何,面试也是拿经验嘛,加油。 |
|
|
发帖数: 1 | 40 各位好!本人因为家庭原因要relocate到Atlanta,想找找当地tax sr 或者manager的
职位. 最近看到四大和bdo 在Atlanta有tax的open,感觉自己的背景和经历都很match
,如果板上有在四大或者其他CPA firm工作的前辈, 能否帮忙看看简历内推一下,不
胜感激!
简单背景: 会计master,已考过cpa四门考试, 另外有ea证书,现在在一个小型cpa
firm工作
本人邮箱 [email protected]/* */
也可以站内联系 |
|
a*****a 发帖数: 1038 | 41 Actually most of environmental engineering projects especially related to
municipality in China are still handled by domestic design institutes. The
engineering projects funded by state and local governments in China are
still not open to foreign joint ventures. Currently, the MWH, Ch2mHill, BV,
and AECOM are still only working on industrial projects, DBO & BOT porjects
, or the projects funded by world bank, and asian development bank, etc. |
|
p****1 发帖数: 275 | 42 【 以下文字转载自 JobHunting 讨论区 】
发信人: peace1 (peace1), 信区: JobHunting
标 题: C#, recruiter发过来的面试题
发信站: BBS 未名空间站 (Thu Sep 8 22:17:38 2016, 美东)
有兴趣做不? 我琢磨着, 出题的人是在寻找最优解 :)
Given the table [tSWIFT_History_Trades] , the C# structure TradeNAK and the
C# method UpdateTradeACKNAKDB as defined below:
CREATE TABLE [tSWIFT_History_Trades](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[BatchId] [varchar](25) NOT NULL,
[TradeId] [varchar](25) NOT NULL,
[Account] [varchar](25) ... 阅读全帖 |
|
p*****e 发帖数: 290 | 43 如题。有一个很蠢的问题请教一下,多谢了。
下面是SAS连接到SQL的语句,
libname res oledb user=XXX password=XXXXXX dsn=AAA
provider=sqloledb properties=('initial catalog'=research) schema=dbo;
现在我要用R实现同样的连接到这个SQL,我读了RODBC的package介绍,用了下面语句,
但是怎么都不行。请问该怎么修改才能像上面SAS语句一样连到SQL上,多谢了!
conn <- odbcConnect("AAA", uid="XXX", pwd="XXXXXX") |
|
c*****g 发帖数: 3871 | 44 查了一下,找到一个,在休斯敦的, 那个时候互联网不发达,如果是其他地区的空难
没有上网应该是可能的
Event Information
Type of Event Accident
Event Date 1/18/1988
Event Day of the Week Monday
Time of Event 1010
Event Time Zone Central Standard Time
Event City HOUSTON
Event State TEXAS
Event Country --
Zipcode of the event site 77061
Event Date Year 1988
Event Date Month 1
MidAir Collision Indicator No
On Ground Collision occurred ? No
Event Location Latitude
Event Location Longitude
Event Location... 阅读全帖 |
|
D*******2 发帖数: 3747 | 45 猴子葛格我好爱你啊!!!!!我用很笨拙的办法搞出来了!!!!!
select substring(cmdtext,23,((charindex(')',substring(cmdtext,22,15))-
charindex('(',substring(cmdtext,22,15)))-1)) from dbo.spalog |
|
S******t 发帖数: 8388 | 46 (A couple of these haven't started trading yet and a few
just started trading and therefore don't have much volume yet,
but special mention should be made for the new 300%
Russell ETFs which will make great trading vehicles once
volume picks up.) **trader168-David Liu**
US Indexes
DIA Dow30
DDM Dow30 2x long
DOG Dow30 short
DXD Dow30 2x short
ONEQ Nasdaq
QQQQ Nasdaq100
QLD Nasdaq100 2x long
PSQ Nasdaq100 short
QID Nasdaq100 2x short
OE... 阅读全帖 |
|
y***q 发帖数: 4147 | 47 【 以下文字转载自 Stockcafeteria 俱乐部 】
发信人: ShortCut (总想偷懒), 信区: Stockcafeteria
标 题: Re: 底部探明了没有???
发信站: BBS 未名空间站 (Thu Jun 10 11:40:46 2010, 美东)
过去收藏的:
US Indexes
DIA Dow30
DDM Dow30 2x long
DOG Dow30 short
DXD Dow30 2x short
ONEQ Nasdaq
QQQQ Nasdaq100
QLD Nasdaq100 2x long
PSQ Nasdaq100 short
QID Nasdaq100 2x short
OEF SP100
IOO SP100 Global
SPY SP500
SSO SP500 2x long
SH SP500 short
SDS SP500 2x short
IVV ... 阅读全帖 |
|