sql - One Incorrect value from single data point using sqlcmd query
问题描述
SQL query using sqlcmd is missing/showing default date for one datapoint using a Join - Problem
I am using sqlcmd to query a large database. For one datapoint (SalesTransaction #33975) the date is coming up as blank or rather 1/1/1900. Using a separate program the date comes through so the date is there. The other dates are correct
SELECT sl.SalesLine, st.Transaction_no, sl.item, CAST(st.invoicedate as DATE) AS InvDate
FROM Salestransactions st RIGHT JOIN SalesLines sl
ON st.transaction_no = sl.transaction_no;
For Transaction_No = 3397
the Invoice Date = 1/1/1900
I have not filtered for this transaction rather the dates for the other transactions are correct. I have tried to keep the coding simple to help pinpoint the problem. I simply need some direction on how to research this further. Thank you
解决方案
推荐阅读
- javascript - 使用 replaceChild 时替换超过 1 个子节点
- javascript - 为什么没有在 Cloud Firebase 中创建新集合?
- apache - 如何使用 apache 为我的 VueJs 应用程序提供服务?
- c# - 我的 Jump 运行不佳 C# Unity 2D 平台
- excel - 求解器为特定约束设置优先级
- ios - Swift Crashlytics EXC_BREAKPOINT 错误含义
- sql - 如何在 postgrestsql 中链接表?
- nginx - Nginx 和网站图标。没有这样的文件或目录
- flutter - Flutter 集成开发环境搭建
- sql - PostgreSQL/TimescaleDB:如何只保存相对于最后一个相似行有增量的行?