mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 修复 FromQueryMulti 多表重载可能出现的 null 对象报错;(合并 FromQuery 和 FromQueryMulti 代码)
This commit is contained in:
@ -78,7 +78,8 @@ WHERE (a.[RN] < 2)", sql);
|
||||
});
|
||||
Assert.Equal(@"SELECT a.[CkassIfCation] as1, b.[DeliveryInstractionStatus] as2, b.[UpTime] as3, 1 as4, c.[RunNo] as5
|
||||
FROM [UnitLog] a
|
||||
INNER JOIN (SELECT a.[LoadNo], a.[SeqNoLog], c.[DeliveryInstractionStatus], c.[UpTime], row_number() over( partition by a.[UnitId] order by a.[SeqNoLog] desc) [RN]
|
||||
INNER JOIN (
|
||||
SELECT a.[LoadNo], a.[SeqNoLog], c.[DeliveryInstractionStatus], c.[UpTime], row_number() over( partition by a.[UnitId] order by a.[SeqNoLog] desc) [RN]
|
||||
FROM [UnitLog] a
|
||||
INNER JOIN [LoadPlan] b ON a.[LoadNo] = b.[LoadNo] AND a.[UnitTransactionType] = N'TO'
|
||||
INNER JOIN [Instruction] c ON b.[InstructionNo] = c.[InstructionNo] ) b ON a.[SeqNoLog] = b.[SeqNoLog]
|
||||
|
Reference in New Issue
Block a user