SQLServer: Export SQL result into CSV file 导出SQL结果到CSV文件

Categories: Database; Tagged with: ; @ September 5th, 2012 18:50

sqlcmd -E -iC:\test.sql -oC:\testSQLOutput.csv  -s"," -h-1 -W

SQL in test.sql:

SELECT * FROM DavidTest.dbo.LiGuoliangComUsers;

All result should be export into the csv file.

Adding drop down list in Excel 在Excel中增加下拉框

Categories: Development Notes; Tagged with: ; @ September 5th, 2012 17:33

1. preparing the data source:  just input your values in file;

2. Edit the validation of the target cell(s): Data/Validation:

3. Click ‘OK’, now, you can see the list when you click the cell. if needed, you can use the auto fill tool to set validation for other cells.

 

捣糨糊

Categories: 垃圾山 September 2nd, 2012 19:52

这两年,我阅读与写作的能力丧失殆尽。

我走马观花的看过几本书,有过一些细小的想法,但始终,他们都化成一团浆糊,塞在脑子里。只有在大便时,才会排除些许未经消化的东西。

有些人因为害怕失去而不想得到,不知道从什么时候开始,我也有些患得患失。

新工作刚有一个多月,我有些担心下一份工作该如何下手, 在SSME临走前的一段时间,大家在一起讨论过一些BT的面试题目 — 虽然这些题目在工作中能运用到的概率大概在1%左右,但很多面试官的自信就建立在用这些操蛋的题目凌辱你之上。 但, 我也希望有时间能静下心来看看JLS,或是一些底层,深入的东西。 ———- 毕竟我在大学里是靠玩跟作弊过来的,所以我希望能有扎实的底子。

但是,我却从来没有开始过,似乎是时间不够用。

我有很多理由来解释:譬如我需要了解现在的Domain knowledge啊, 我需要学英语啊,我需要锻炼身体啊,我还想读书看电影,如果有时间我还想出去走走啊。

于是我着急,一边着急一边睡大觉,譬如今天,8点醒来,又睡到10点,又躺倒,11点的时候洗漱看了点报纸。

12点吃饭,然后去图书馆还书看书打瞌睡,2点半回来听了会儿广播,上床继续睡大觉,一觉睡到5点半。心想一天又给废了,穿鞋去跑步,400M的跑道跑了五圈感觉要挂了…

患得患失之余,我会觉得日子毫无激情,更谈不上快感。

日子本是如此,还是我强求太多?

身体上的疲惫可以通过大睡一场来解决,精神上的疲惫可能不是一场觉,一场电影能解决的。曾经我认为读书跟旅行是消解内心疲惫的良药,后来我知道,其实并没有那么简单。内心的疲倦需要内心来解决,读书与旅行可以唤起这种消除疲倦的内心活动,但倘若内心麻木,再好的书与风景 也只是过眼云烟。

麻木是件极其可怕的事情。

《人生中不可不想的事》也讲到人要敏感,敏感就会幸福。感觉的消失太可怕, 譬如电影perfect sense。

于是我很想念北方的秋天,庄稼地里的秋天,中学里的秋天,大学里的秋天,我能回忆起的,只有那些秋天的味道。或者也有另外一个原因,只是那时我鼻子很好。

最近读过余华的兄弟下册,我觉得上册更动人。

阎连科的我与父辈也不错,农村孩子都会引起共鸣吧。

Adobe发布FlashBuilder 4.7 测试版 Flash Builder 4.7 Beta is Here!

Categories: Flex; Tagged with: ; @ August 28th, 2012 12:12

We are excited to announce the availability of Flash Builder 4.7 beta. Flash Builder 4.7 adds support for Flash Player 11.4 and AIR 3.4, as well as support for the new Apache Flex 4.8 SDK.

With full support to the new Flash Player 11.4 ActionScript Concurrency (ActionScript workers) feature, which helps developers create more responsive games and apps by offloading tasks and computations to background workers. Game content is more responsive as these workers run concurrently to leverage more machine resources while helping to avoid UI freezes and other events that slow down game play. Click here to learn more about Flash Player 11.4 and AIR 3.4 new features.

Flash Builder 4.7 beta improves AIR for iOS app development workflows with support for USB debugging, ad-hoc app deployment, and support for the iOS simulator. Click here to learn more about these new capabilities.

Screenshot of iOS feature in Flash Builder 4.7 beta

Screenshot of iOS feature in Flash Builder 4.7 beta

Continuing on our previously stated commitment to Flex and the development of Flex, we have contributed Flex SDK to the Apache Foundation.  Flash Builder 4.7 supports Apache Flex 4.8 in addition to Adobe Flex 4.6 and Adobe Flex 3.6.  For information on how to get Apache Flex SDKs for use in Flash Builder, seehttp://www.adobe.com/go/apacheflex_download.

Please report any issue you may experience together with reproducible steps here. We look forward to your feedback on Flash Builder 4.7 beta and suggestions on how we can further empower you to build great apps and games.

 

from:http://blogs.adobe.com/flex/2012/08/flash-builder-4-7-beta-is-here.html

SSMS(SQL Server Management Studio) can not edit SQL Agent Job steps

Categories: Database; Tagged with: ; @ August 27th, 2012 21:39

After creating a new agent job in SSMS, I try to edit one of the steps, but got an error like this:

TITLE: Microsoft SQL Server Management Studio
——————————

Creating an instance of the COM component with CLSID {AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2} from the IClassFactory failed due to the following error: c001f011. (Microsoft.SqlServer.ManagedDTS)

——————————
ADDITIONAL INFORMATION:

Creating an instance of the COM component with CLSID {AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2} from the IClassFactory failed due to the following error: c001f011. (Microsoft.SqlServer.ManagedDTS)

This is a SQL2008R2 bug >link<

you can download and install the hotfix, from the bug page.

——————————————————————

or you can try this simple way, but it’s not stable for me:

Quit all SQL based applications (SSMS, BIDS etc), you dont have to stop sql service.

Go to Start -> All Programs -> Accessories and then right click on Command Prompt and choose run as administrator.

Now copy and past the following two lines in to the command window to register the DLL’s

This will register 64 bit DTS.dll
c:\windows\system32\regsvr32 "c:\Program Files\Microsoft SQL Server\100\DTS\Binn\dts.dll"

This will register 32 bit which is required as SSMS is a 32-bit application.
c:\windows\syswow64\regsvr32 "c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\dts.dll"

Start SSMS and test that you can open and re-open jobs steps.

Job done!

from:

Cannot edit job steps in SQL Server 2008 R2 Management Studio on 64 bit windows.

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.