Loading
システム管理者に対するフィッシング耐性MFA・全従業員ユーザーMFAの適用のお知らせ 続きを読む
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

Inconsistent Weekday Values Returned from Oracle Custom SQL in Tableau

公開日: Jul 21, 2026
説明

Steps to Reproduce

1. Create an Oracle table with a DATE column.

2. Insert sample dates (for example, from 19-Nov-2025 to 28-Nov-2025) and commit the data.

3. Run a Custom SQL query using:

SELECT
  date_column,
  TO_CHAR(date_column, 'D') AS weekday_num
FROM table_name;

4. With NLS_TERRITORY = 'AMERICA', observe weekday values such as:

Sunday = 7

Monday = 1

Tuesday = 2

5. Change the Oracle session setting:

ALTER SESSION SET NLS_TERRITORY = 'SWITZERLAND';

6. Re-run the same query and observe different weekday values for the same dates (for example, Sunday = 6, Monday = 7, Tuesday = 1).

7. Create a Tableau workbook using this Custom SQL and verify that weekday-based logic reflects these differences.

解決策

Set the territory via Initial SQL to ensure the correct value is retrieved or use Custom SQL to ensure the correct value is retrieved or adjust the values via calculated fields if using Date Functions.

ナレッジ記事番号

005389419

 
読み込み中
Salesforce Help | Article