MS Access 2010中的“查询过于复杂”异常

时间:2018-03-05 09:46:39

标签: sql ms-access ms-access-2010 where-in

以下查询正在生成异常。

如何简化它?

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 个答案:

答案 0 :(得分:5)

使用IN会更好。

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