“Query is too complex” exception in MS Access 2010

走远了吗. 提交于 2019-12-04 04:05:59

问题


The following query is generating an exception.

How can I simplify it?

UPDATE 
      Word
SET CorrectnessCount=@CorrectnessCount
WHERE GroupNo=@GroupNo AND (Name=@Adduce OR Name=@Assuage 
     OR Name=@Athwart OR Name=@Auscultation OR Name=@Bedizen 
     OR Name=@Behoove OR Name=@Benignant OR Name=@Betrothal 
     OR Name=@Brazier OR Name=@Bungle OR Name=@Callow 
     OR Name=@Caparison OR Name=@Carillon OR Name=@Caryatid 
     OR Name=@Catechism OR Name=@Caustic OR Name=@Cavalier 
     OR Name=@Chagrin OR Name=@Chasm OR Name=@Clamber 
     OR Name=@Clarion OR Name=@Clavicle OR Name=@Coadjutor 
     OR Name=@Coax OR Name=@Cockade OR Name=@Coddle OR Name=@Coeval 
     OR Name=@Comely OR Name=@Condign OR Name=@Confound 
     OR Name=@Consecrate OR Name=@Continence OR Name=@Contrite 
     OR Name=@Convalesce OR Name=@Convene OR Name=@Coquette 
     OR Name=@Cornucopia OR Name=@Cosmology OR Name=@Countervail 
     OR Name=@Decorous OR Name=@Decry OR Name=@Deference OR Name=@Deft 
     OR Name=@Desist OR Name=@Desultory OR Name=@Deviant OR Name=@Devout 
     OR Name=@Disconcert OR Name=@Discourse OR Name=@Disenchanted 
     OR Name=@Disingenuous OR Name=@Disparage OR Name=@Dispassionate 
     OR Name=@Dispirit OR Name=@Disposition OR Name=@Disreputable 
     OR Name=@Divisive OR Name=@Edict OR Name=@Engrossed OR Name=@Enrapture         
     OR Name=@Entreaty OR Name=@Epicure OR Name=@Epiphany OR Name=@Eponym 
     OR Name=@Equitable OR Name=@Erstwhile OR Name=@Esoteric 
     OR Name=@Establishment OR Name=@Eulogy OR Name=@Euphony 
     OR Name=@Expeditious OR Name=@Expropriate OR Name=@Expunge 
     OR Name=@Extenuate OR Name=@Extenuating OR Name=@Extrapolate 
     OR Name=@Exude OR Name=@Facetious OR Name=@Fatalism OR Name=@Fiat 
     OR Name=@Filch OR Name=@Filibuster OR Name=@Fleece OR Name=@Fleeting 
     OR Name=@Flummoxed OR Name=@Fluster OR Name=@Flux OR Name=@Foible 
     OR Name=@Fractious OR Name=@Frieze OR Name=@Fulminate OR Name=@Fusion 
     OR Name=@Gamut OR Name=@Geomorphic OR Name=@Gratuitous 
     OR Name=@Gregarious OR Name=@Herald OR Name=@Hermetic 
     OR Name=@Homonym OR Name=@Hypostatize OR Name=@Ignominious 
     OR Name=@Immanent OR Name=@Imperative OR Name=@Imperious 
     OR Name=@Imperturbable OR Name=@Impugn OR Name=@Incredulity 
     OR Name=@Indigent OR Name=@Ineluctable OR Name=@Inextricable 
     OR Name=@Intransigent OR Name=@Inveterate OR Name=@Invidious 
     OR Name=@Irreproachable OR Name=@Lackluster OR Name=@Lull 
     OR Name=@Luscious OR Name=@Macerate OR Name=@Noisome 
     OR Name=@Nonplussed OR Name=@Objurgate OR Name=@Pallet 
     OR Name=@Penitent OR Name=@Plangent OR Name=@Predilection 
     OR Name=@Presumptuous OR Name=@Quartet OR Name=@Quiescence 
     OR Name=@Rancour OR Name=@Recalcitrant OR Name=@Recant 
     OR Name=@Recumbent OR Name=@Recuperate OR Name=@Refractory 
     OR Name=@Reparation OR Name=@Reprove OR Name=@Repudiate 
     OR Name=@Repugnant OR Name=@Rescind OR Name=@Resplendent 
     OR Name=@Restitution OR Name=@Retinue OR Name=@Retort 
     OR Name=@Retrench OR Name=@Retribution OR Name=@Reveille 
     OR Name=@Revelry OR Name=@Reverie OR Name=@Rickety OR Name=@Roil 
     OR Name=@Scurrilous OR Name=@Semblance OR Name=@Sententious 
     OR Name=@Sequester OR Name=@Simian OR Name=@Sinecure OR Name=@Skein 
     OR Name=@Skulk OR Name=@Slapdash OR Name=@Slighted OR Name=@Smitten 
     OR Name=@Smolder OR Name=@Solecism OR Name=@Splenetic OR Name=@Squabble 
     OR Name=@Staccato OR Name=@Strew OR Name=@Strident OR Name=@Stupor 
     OR Name=@Surly OR Name=@Tenable OR Name=@Tendentious OR Name=@Tenuous 
     OR Name=@Termagant OR Name=@Torpid OR Name=@Tort OR Name=@Tortuous 
     OR Name=@Trenchant OR Name=@Tryst OR Name=@Tumult OR Name=@Uncouth 
     OR Name=@Vapid OR Name=@Vaunt OR Name=@Vicissitude OR Name=@Vignette 
     OR Name=@Virulent )

回答1:


using IN will be better.

UPDATE 
      Word
SET CorrectnessCount=@CorrectnessCount
WHERE GroupNo=@GroupNo AND Name IN (@Athwart,@Assuage....)


来源:https://stackoverflow.com/questions/49107429/query-is-too-complex-exception-in-ms-access-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!