Bonjour,
J'ai une base de données ASE 15.0.3,lorsque je lance cette requête sous sql advantage , j'ai 2 lignes et sous .NET, j'ai o ligne.
Que ce qui peut expliquer cela ?.

1) SOUS SQL ADVANTAGE:renvoie 2 lignes
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
 
Select CT.SentryTradeID, CT.MasterAgreementID, CT.CollatAgreementID, 
 
                                                 isnull(convert(char(8), CT.SettlementDate, 112), '') 'SettlementDate', CT.CcyID, CT.Notional, CT.PostDirection,
 
                                                 MA.Principal, MA.AgreementType, LE.TradeName, CA.Counterparty, 
 
                                                 CT.IssueID, CT.UpdateUser, CT.DateTransitStart, CA.SourceID 
 
                                                 From test1 CT, test2 MA, CollateralAgreements CA, test3 LE 
 
                                                 Where MA.MasterAgreementID = CT.MasterAgreementID 
 
                                                 And CA.CollatAgreementID = CT.CollatAgreementID 
 
                                                 And CA.Counterparty = LE.LegalEntityID 
 
                                                 and CA.ManagingLocationID='FX NY' 
 
                                                 and CT.TradeType is not null 
 
                                                 and CT.SentryTradeID like 'PB%' 
 
                                                 and CT.ApprovedBy  = null

2) SOUS .NET: renvoie 0 ligne

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
Sql=" Select CT.SentryTradeID, CT.MasterAgreementID, CT.CollatAgreementID, " +
 
                         " isnull(convert(char(8), CT.SettlementDate, 112), '') 'SettlementDate', CT.CcyID, CT.Notional, CT.PostDirection, "+
 
                         " MA.Principal, MA.AgreementType, LE.TradeName, CA.Counterparty, "+
 
                         " CT.IssueID, CT.UpdateUser, CT.DateTransitStart, CA.SourceID "+
 
                         " From test1 CT, test2 MA, CollateralAgreements CA, test3 LE "+
 
                         " Where MA.MasterAgreementID = CT.MasterAgreementID "+
 
                         " And CA.CollatAgreementID = CT.CollatAgreementID "+
 
                         " And CA.Counterparty = LE.LegalEntityID "+
 
                         " and CA.ManagingLocationID='FX NY' "+
 
                         " and CT.TradeType is not null "+
 
                         " and CT.SentryTradeID like 'PB%' "+
 
                         " and CT.ApprovedBy  = null ";