Thoughts from Dan Miser RSS 2.0
 Friday, January 13, 2006
This post goes in the funny category. Not funny like a well told joke, but funny like strange. In Access, if you create a subquery that has parameters, e.g.

SELECT ContestID, count(*) AS MissingHoles
FROM (SELECT DISTINCT ContestId, Hole FROM tblContestDetails WHERE CourseId=[CourseId] and Score is null) AS qry
GROUP BY ContestID;

You can close, save, and execute this query just fine. However, when you go back in to edit the query, it now looks like this:


SELECT ContestID, count(*) AS MissingHoles 
FROM [SELECT DISTINCT ContestId, Hole FROM tblContestDetails WHERE CourseId=[CourseId] and Score is null]. AS qry
GROUP BY ContestID;

Note that the subquery is now enclosed in square brackets instead of parenthesis. The only problem is that if you make a change to this new query (e.g. add a space somewhere) and try to save it, you will be presented with an error:


"Invalid bracketing of name 'SELECT DISTINCT ContestId, Hole FROM tblContestDetails WHERE CourseId=[CourseId'."

The solution is to put the parenthesis back around the subquery every time you want to save. :-(

Friday, January 13, 2006 10:13:00 AM (Central Standard Time, UTC-06:00)  #    Comments [3] -

Tracked by:
http://9na-information.info/22277285/index.html [Pingback]
http://9nn-information.info/68328420/index.html [Pingback]
http://9ni-information.info/29701914/information-on-gender-discriminationin-heal... [Pingback]
http://9ny-information.info/59167245/bbc-radio-2-michael-parkinson.html [Pingback]
http://9nh-information.info/41016607/index.html [Pingback]
http://9nu-information.info/50765953/letters-for-job-back.html [Pingback]
http://9na-information.info/50867193/index.html [Pingback]
http://9nu-information.info/03751862/index.html [Pingback]
http://9ng-information.info/77423877/index.html [Pingback]
http://9nb-information.info/00172589/the-medical-shop.html [Pingback]
http://9qk-information.info/42020625/index.html [Pingback]
http://9qj-information.info/20123110/index.html [Pingback]
http://9ow-information.info/17469165/index.html [Pingback]
http://9os-information.info/79848849/index.html [Pingback]
http://9od-information.info/81182728/electronic-projector-screens.html [Pingback]
http://9or-information.info/26594731/index.html [Pingback]
http://9qg-information.info/14864820/index.html [Pingback]
http://9ql-information.info/85908536/index.html [Pingback]
http://9ox-information.info/41728038/fat-asian-men.html [Pingback]
http://9qs-information.info/27330695/kingdom-heart-2-for-ps2.html [Pingback]
http://9rg-information.info/87071006/index.html [Pingback]
http://9sa-information.info/92084383/maledizione-si-edward.html [Pingback]
http://9rm-information.info/53384854/index.html [Pingback]
http://9uaeh-le-informazioni.info/58952417/index.html [Pingback]
http://9uaer-le-informazioni.info/56258678/nova-scotia-power.html [Pingback]
http://9uaep-le-informazioni.info/86905187/index.html [Pingback]
http://9uafg-le-informazioni.info/49558630/classifica-hit-parade.html [Pingback]
http://9uafc-le-informazioni.info/04346931/index.html [Pingback]
http://9uael-le-informazioni.info/49496000/prezzo-foto-camera-digitale-sony.html [Pingback]
http://9uaem-le-informazioni.info/56328837/kinsey-biography.html [Pingback]
http://9uafm-le-informazioni.info/68885925/index.html [Pingback]
http://9uafj-le-informazioni.info/39915826/colonialismo-europeo.html [Pingback]
http://9uaha-le-informazioni.info/88342609/residence-3-stella-ortisei.html [Pingback]
http://9uagd-le-informazioni.info/19529715/tubino-nero-audrey-hepburn.html [Pingback]
http://9uahc-le-informazioni.info/82207379/index.html [Pingback]
http://9uaho-le-informazioni.info/56073547/index.html [Pingback]
http://9uahk-le-informazioni.info/72926250/index.html [Pingback]
http://9uagr-le-informazioni.info/76143906/visualizzatore-postscript-file.html [Pingback]
Friday, January 13, 2006 2:19:00 PM (Central Standard Time, UTC-06:00)
One word: SQL Server Express
Friday, January 13, 2006 2:43:00 PM (Central Standard Time, UTC-06:00)
Well, that's more than one word. :)



Besides, being able to distribute a 100kb mdb file and just have things work is imperative for this application. So moving to a full scale RDBMS in this instance is not really viable.
Wednesday, March 29, 2006 4:15:00 PM (Central Standard Time, UTC-06:00)
I has having a Heck-Of-A-Time with this error. I REALLY appreciate the fix. I would take a query that worked, copy it from the database window and paste it. After opening it, it would NOT work.



[quote]"Invalid bracketing of name 'SELECT DISTINCT ContestId, Hole FROM tblContestDetails WHERE CourseId=[CourseId'."



The solution is to put the parenthesis back around the subquery every time you want to save. :-(

[/quote]



I don't mind doing this every time if it means it will now work. Which it does. Thanks!



Personally I prefer ANYTHING other than Access, however everyone has it on their computer, I can put one file out there and not have to install a bunch of stuff. It is on one small file on the network that everyone can access. It works.



Off to do some more subquery's.
Jared Bigcraft
Comments are closed.
Navigation
Archive
<September 2008>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 308
This Year: 23
This Month: 1
This Week: 0
Comments: 604
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)