Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2015
    Posts
    31

    Unanswered: incompatible data type in criteria expression

    (title is supposed to be; "Data type mismatch in criteria expression")

    Hello to all,

    I have a small problem. In my database, my before last query has a field called "OTD Réel" and this field calculates my On-Time-Delivery. The expression works and it does the calculation absolutely fine.

    However, i want this field to be used in my last query but when i try to insert it into my query i get the following message:"incompatible data type in criteria expression". I'm confused because I've never had this problem before with other expressions and it would be a huge setback to have to assemble all of the tables required to make this calculation.

    So why can't i add this calculated field to my last query and how do i overcome this problem ?

    Thank you for any input
    Last edited by Guy Winfield; 05-26-15 at 04:33.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Can you please post the SQL expression of the query as well as relevant information about the data it uses?
    Have a nice day!

  3. #3
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Most likely your field is a number but it sees a string

  4. #4
    Join Date
    Mar 2015
    Posts
    31
    Its pretty big, everything works apart from when i insert [OTD SNECMA], [020- Extract Final].[OTD Réel]. These 2 fields are calculated fields from the previous query. The query works fine without them however when i try and insert them i get "Data type mismatch in criteria expression".




    SELECT [020- Extract Final].MyKey, [020- Extract Final].Client, [020- Extract Final].[Nom Acheteur], [020- Extract Final].Mois, [020- Extract Final].OF, [020- Extract Final].Référence, [020- Extract Final].[Niveau Criticité], [020- Extract Final].Date, [020- Extract Final].[Nouveau Délai], [020- Extract Final].[Plan d'action], [020- Extract Final].[Commenataire cllient], [020- Extract Final].[Reste à livrer], [020- Extract Final].[Qté cde initiale], [020- Extract Final].[SommeDeQté facturée], [020- Extract Final].[Nmbre jrs entre délai AR et Dt BL], [020- Extract Final].[MaxDeN° BL], [020- Extract Final].[MaxDeDt BL], [020- Extract Final].Statut, [020- Extract Final].[OTD SNECMA], [020- Extract Final].[OTD Réel], [020- Extract Final].[OTD Prév], [020- Extract Final].Collabs, [020- Extract Final].[Fin Prévue], [020- Extract Final].StkDisp, [020- Extract Final].[diag anomalie], [020- Extract Final].[Commenatire Qlté], [020- Extract Final].[Prio DVI], [020- Extract Final].Article, [020- Extract Final].PremierDeOF, [020- Extract Final].[En Chg], [020- Extract Final].QtéOF, [020- Extract Final].Section, [020- Extract Final].CCharge, [020- Extract Final].[Op Q], [020- Extract Final].[OP Q+1], [020- Extract Final].[Attente Sect], [020- Extract Final].Réclamation, [020- Extract Final].[Commentaire Réclamation], [020- Extract Final].[Partiel Prévu], [020- Extract Final].[Qte Lan], [020- Extract Final].[Spot/Contrat], [020- Extract Final].Prix, [020- Extract Final].Act, [020- Extract Final].ARC, [020- Extract Final].Commande, [020- Extract Final].Lg, [020- Extract Final].Poste
    FROM [020- Extract Final]
    GROUP BY [020- Extract Final].MyKey, [020- Extract Final].Client, [020- Extract Final].[Nom Acheteur], [020- Extract Final].Mois, [020- Extract Final].OF, [020- Extract Final].Référence, [020- Extract Final].[Niveau Criticité], [020- Extract Final].Date, [020- Extract Final].[Nouveau Délai], [020- Extract Final].[Plan d'action], [020- Extract Final].[Commenataire cllient], [020- Extract Final].[Reste à livrer], [020- Extract Final].[Qté cde initiale], [020- Extract Final].[SommeDeQté facturée], [020- Extract Final].[Nmbre jrs entre délai AR et Dt BL], [020- Extract Final].[MaxDeN° BL], [020- Extract Final].[MaxDeDt BL], [020- Extract Final].Statut, [020- Extract Final].[OTD SNECMA], [020- Extract Final].[OTD Réel], [020- Extract Final].[OTD Prév], [020- Extract Final].Collabs, [020- Extract Final].[Fin Prévue], [020- Extract Final].StkDisp, [020- Extract Final].[diag anomalie], [020- Extract Final].[Commenatire Qlté], [020- Extract Final].[Prio DVI], [020- Extract Final].Article, [020- Extract Final].PremierDeOF, [020- Extract Final].[En Chg], [020- Extract Final].QtéOF, [020- Extract Final].Section, [020- Extract Final].CCharge, [020- Extract Final].[Op Q], [020- Extract Final].[OP Q+1], [020- Extract Final].[Attente Sect], [020- Extract Final].Réclamation, [020- Extract Final].[Commentaire Réclamation], [020- Extract Final].[Partiel Prévu], [020- Extract Final].[Qte Lan], [020- Extract Final].[Spot/Contrat], [020- Extract Final].Prix, [020- Extract Final].Act, [020- Extract Final].ARC, [020- Extract Final].Commande, [020- Extract Final].Lg, [020- Extract Final].Poste
    HAVING (((Count(*))=1));

    I work with a french Microsoft Access software so don't be alarmed if there are a few things which differ from english.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •