2015年11月19日 星期四

[SSIS]欄位有特殊字元,造成 SSIS 透過OLED倒資料時會有錯誤發生



目前遇到一個狀況是在來源按下預覽可以正常顯示資料,但只要一執行就會掛
錯誤訊息:
SSIS 錯誤碼 DTS_E_OLEDBERROR。發生 OLE DB 錯誤。錯誤碼: 0x80004005 
SSIS 錯誤碼 DTS_E_PRIMEOUTPUTFAILED。在 元件 "XXX" (364) 上的 PrimeOutput 方法傳回錯誤碼 0xC0202009。當管線引擎呼叫 PrimeOutput() 時,元件傳回失敗碼。在此之前可能已公佈過錯誤訊息,說明有關此失敗的詳細資訊。 
設定緩衝區的資料列集結尾失敗,錯誤碼為 0xC0047020

後面同事發現是因為其中某欄位有特殊字元導致
  
SSIS中輸出的錯誤訊息如下,並沒有辦法從中識別其錯誤原因
提供此問題可以查出錯誤的方法:當欄位值不為NULL值,但SUBSTRING後的值為NULL的資料
利用特殊字元SUBSTRING後會變成NULL值的特性,就可以將資料過濾出來

2015年9月8日 星期二

SQL Server CROSS APPLY and OUTER APPLY

https://www.mssqltips.com/sqlservertip/1958/sql-server-cross-apply-and-outer-apply/

亮點在於apply語句可以把single-row function當成table join
以往都要寫在select語句中

2015年6月9日 星期二

Setting the NLS_LANG Environment Variable for Oracle Databases


Follow this procedure to set the NLS_LANG environment variable for Oracle databases.
To set the NLS_LANG environment variable for Oracle databases
  1. Determine the NLS_LANG value.
    1. In the data warehouse database, run the command
    SELECT * FROM V$NLS_PARAMETERS
    1. Make a note of the NLS_LANG value, which is in the format [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET].
      For example: American_America.UTF8
  2. For Windows:
    1. Navigate to Control Panel > System and click the Advanced tab. Click Environment Variables.
    2. In System variables section, click New.
    3. In the Variable Name field, enter NLS_LANG.
    4. In the Variable Value field, enter the NLS_LANG value that was returned in Step 1.
      The format for the NLS_LANG value should be [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET].
      For example: American_America.UTF8.
  3. For UNIX, set the variable as shown below:
    setenv NLS_LANG <NLS_LANG>
    For example: setenv NLS_LANG American_America.UTF8.
    If your data is 7-bit or 8-bit ASCII and the Informatica Server is running on UNIX, then set
    NLS_LANG <NLS_LANGUAGE>_<NLS_TERRITORY>.WE8ISO8859P1
    CAUTION:  Make sure you set the NLS_LANG variable correctly, as stated in this procedure, or your data will not display correctly.
  4. Reboot the machine after creating the variable.

2015年1月21日 星期三

2015年1月15日 星期四

metroframework c#


 metroframework c#

可以在winxp~win7上顯示metro style UI
https://github.com/viperneo/winforms-modernui

為APS產品添加智慧問答助理

  痛點 在現今服務至上環境下 , 即時回覆客戶問題以提升顧客滿意度儼然成為企業、服務業不可或缺的服務之一。但即時回覆問題所需付出成本內、外部分析如下, 如何解決此問題為本報告所要說明的部分。 Ø  因客服團隊人力需求較高且基本工資持續上升,人力資源成本持續上漲。 Ø  排程系統...