WhyMe HFR ? Nan, connais pas ... | Ouais ...
C'est un peu + compliqué que çà en réalité ...
Je ne pense pas pouvoir adapter ta méthode pour mon pb, mais je vais essayer qd même
Parce que ma requête ressemble à çà, et elle n'est pas terminée
Code :
- SELECT Customers.*,
- ISNULL ( Customers.CompanyName, Customers.LastName ) AS CustomerName,
- Civilities.Civility,
- CustomerTypes.CustomerType,
- CustomerCategories.CustomerCategory,
- JustifyingDocumentTypes.JustifyingDocumentType,
- CustomerStatus.CustomerStatus,
- Periodicities.Periodicity,
- PaymentTypes.PaymentType,
- Addresses.*,
- Contacts.FirstName AS Contact_FirstName,
- Contacts.LastName AS Contact_LastName,
- Contacts.ID_Civility AS Contact_ID_Civility,
- Contacts.PhoneNumber AS Contact_PhoneNumber,
- Contacts.FaxNumber AS Contact_FaxNumber,
- Contacts.MobileNumber AS Contact_MobileNumber,
- Contacts.Email AS Contact_Email,
- Contacts.ID_JustifyingDocumentType AS Contact_ID_JustifyingDocumentType,
- Contacts.JustifyingDocumentNumber AS Contact_JustifyingDocumentNumber,
- Contacts.ID_Address AS Contact_ID_Address
- FROM Customers
- INNER JOIN CustomerCategories ON Customers.ID_CustomerCategory = CustomerCategories.ID_CustomerCategory
- INNER JOIN CustomerStatus ON Customers.ID_CustomerStatus = CustomerStatus.ID_CustomerStatus
- INNER JOIN CustomerTypes ON Customers.ID_CustomerType = CustomerTypes.ID_CustomerType
- LEFT JOIN Civilities ON dbo.Customers.ID_Civility = dbo.Civilities.ID_Civility
- INNER JOIN Periodicities ON Customers.ID_Periodicity = Periodicities.ID_Periodicity
- INNER JOIN JustifyingDocumentTypes ON Customers.ID_JustifyingDocumentType = JustifyingDocumentTypes.ID_JustifyingDocumentType
- INNER JOIN PaymentTypes ON PaymentTypes.ID_PaymentType = Customers.ID_PaymentType
- INNER JOIN Addresses ON Addresses.ID_Address = Customers.ID_Address
- INNER JOIN Contacts ON Contacts.ID_Contact = Customers.ID_Contact
- WHERE Customers.ID_ImportationLogSource = @ImportationLogID
- OR Customers.ID_ImportationLogLastModification = @ImportationLogID
|
D'autres IDs ? |