【发布时间】:2018-08-06 19:47:49
【问题描述】:
注意 - 为简洁起见,此处并非所有列都列在主表中。 where 子句的伪代码 -
我的 where 子句是这样的(有一些选定的条件) -
- customer_country in ('A','B','C','D') 和
- ship_country = 'A' AND customer_number 'A2' OR
- ship_country = 'B' AND customer_number 'B2' OR
- ship_country = 'C' AND customer_number NOT IN ('C1', 'C2') AND
- ship_date 日期之间。
但这似乎给出了不正确的答案。也许逻辑有问题。请指教。
【问题讨论】:
-
编辑您的问题,而不是将有价值的信息作为 cmets。
-
感谢 jarlh,听从了您的建议
-
where not (ship_country = 'A' and customer_number = 'A2') and not (... -
我收到此错误消息 - 执行为多个语句。声明 1:数据库已完成。已处理 0 行。已用时间 = 00:00:00.531 语句 2:选择语句失败。失败 [3134 : HY008] 请求被 ABORT SESSION 命令中止。
-
customer_country在您的master表中的哪个位置?
标签: sql conditional-statements teradata where-clause