Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Access to SQL

Access to SQL

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasequestion
14 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Tim Carmichael

    In my experience, no... that looks more like a human construct. Probably started out with more in the 'where' clause, had issues, paired it down... added a few brackets to segment it... but never cleaned it up.

    T Offline
    T Offline
    TenmanS14
    wrote on last edited by
    #3

    oh well, it gave me a good WTF moment and a laugh...

    T 1 Reply Last reply
    0
    • T TenmanS14

      oh well, it gave me a good WTF moment and a laugh...

      T Offline
      T Offline
      Tim Carmichael
      wrote on last edited by
      #4

      Agreed on that...

      1 Reply Last reply
      0
      • T TenmanS14

        Just come across this one, apparantly copied/pasted direct from access.... SELECT stuff FROM somewhere WHERE (((aa.type)='word')); does access always just bung brackets everywhere?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #5

        Yes. The queries generated by the QBE-editor are sometimes a source of great wonder (and confusion).

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        R 1 Reply Last reply
        0
        • L Lost User

          Yes. The queries generated by the QBE-editor are sometimes a source of great wonder (and confusion).

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          R Offline
          R Offline
          Robert g Blair
          wrote on last edited by
          #6

          Yes and No actually ... ... AFAIK Access versions prior to 2007 did do the crazy brackets thing. But 2007 onwards did not. I have a client (government department) stuck on Access 2003. Another client has Access 2007. I noticed the difference in the brackets thing between those two versions. Unless there is some setting somewhere I don't know about (I'm not an Access dev y'know).

          T 1 Reply Last reply
          0
          • T TenmanS14

            Just come across this one, apparantly copied/pasted direct from access.... SELECT stuff FROM somewhere WHERE (((aa.type)='word')); does access always just bung brackets everywhere?

            B Offline
            B Offline
            Bernhard Hiller
            wrote on last edited by
            #7

            Are you sure you can exclude ((SQL Management) Studio) as the (source of (those brackets ()))))? I think the query designer there sometimes produces them too.

            T 1 Reply Last reply
            0
            • B Bernhard Hiller

              Are you sure you can exclude ((SQL Management) Studio) as the (source of (those brackets ()))))? I think the query designer there sometimes produces them too.

              T Offline
              T Offline
              TenmanS14
              wrote on last edited by
              #8

              The guilty party said that he just copied/pasted the query from access. Trying to keep em away from things like the query designer though, I'm even getting em to make views with TSQL and not that bloody view designer...

              R 1 Reply Last reply
              0
              • R Robert g Blair

                Yes and No actually ... ... AFAIK Access versions prior to 2007 did do the crazy brackets thing. But 2007 onwards did not. I have a client (government department) stuck on Access 2003. Another client has Access 2007. I noticed the difference in the brackets thing between those two versions. Unless there is some setting somewhere I don't know about (I'm not an Access dev y'know).

                T Offline
                T Offline
                TenmanS14
                wrote on last edited by
                #9

                would you admit to being an access dev?

                C R 2 Replies Last reply
                0
                • T TenmanS14

                  would you admit to being an access dev?

                  C Offline
                  C Offline
                  Chris Quinn
                  wrote on last edited by
                  #10

                  I have admitted this in the past, but then I always say that it's not the tool that is used that's the problem, it is the tool that uses it.

                  ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================

                  1 Reply Last reply
                  0
                  • T TenmanS14

                    would you admit to being an access dev?

                    R Offline
                    R Offline
                    Robert g Blair
                    wrote on last edited by
                    #11

                    Sure - at my age, I'm immune to peer pressure :) I have been doing small contracts for various units of a State Government for about 5 years. I charge them more than I do my regular clients. Nearly everyone employed full-time at this Dept is a lawyer or para-legal of some sort. They are cool with very high hourly rates. And I definitely tell them "I am an Access developer". I would say I spend about 4 weeks a year being (posing as?) an Access Dev. Officially, any custom-software they want must be built by the State Govt IT Dept (average delivery schedule: 5 - 10 years). But they can get stuff done in Access, because according to MS, it's not "dev" software. Often I work on Access DB's that were originally built by "actual" Access Dev's. I have seen their web-sites, and chatted by phone with one of them. So they are not "posers" like me. The design and code of those DB's are ... interesting. My work is easier in those cases, because I am constantly telling the users: "I can make this stuff a LOT easier for you". "No, you don't need to keep doing that, we can get Access to do it for you". What happened, after the first job I did for a unit of this Dept, is that my users boasted about "their" Access guy around the water cooler, I got called in by another unit, etc. Not a full time living there, but good pin-money. I learned to program in BASIC on a Tandy TRS-80 in the late 70's while I was working as a Diesel mechanic in an iron-ore mine. In the more than 30 years since then I have been paid to code in COBOL, RPG, Visual Basic, VB.Net, C#. And the SQL - don't forget the SQL. In all of those languages and environments SQL is the most useful tool you can have. Even in Access. Back to the original question: When that stupid Query Builder tool in Access gives me the tom-tits, I just switch over to SQL View - suddenly everything is sweetness and light! (once I've deleted all the brackets of course)

                    1 Reply Last reply
                    0
                    • T TenmanS14

                      The guilty party said that he just copied/pasted the query from access. Trying to keep em away from things like the query designer though, I'm even getting em to make views with TSQL and not that bloody view designer...

                      R Offline
                      R Offline
                      Robert g Blair
                      wrote on last edited by
                      #12

                      I have been using MS SQL Server since it first came out (in the mid-nineties). For the first few years we were using a set of Sybase manuals because we didn't have any SQL Server manuals (and Google was very unresponsive back then). In those days, if you knew what the differences were between Sybase and SQL Server you were at Guru level. But I have never used the "View Designer". The couple times I stumbled into it by accident, I got out of there ASAP. To be honest, it's not that I disdain it's UI, SQL skills, or anything like that. I just don't understand it. I have seen people who can go in there, make views, copy the SQL out to use elsewhere etc. I can't do that. I have been coding SQL since the early 80's (DEC VAX RDB). I can code SQL queries faster than I can say what I am doing. But I don't get that View Designer.

                      T 1 Reply Last reply
                      0
                      • R Robert g Blair

                        I have been using MS SQL Server since it first came out (in the mid-nineties). For the first few years we were using a set of Sybase manuals because we didn't have any SQL Server manuals (and Google was very unresponsive back then). In those days, if you knew what the differences were between Sybase and SQL Server you were at Guru level. But I have never used the "View Designer". The couple times I stumbled into it by accident, I got out of there ASAP. To be honest, it's not that I disdain it's UI, SQL skills, or anything like that. I just don't understand it. I have seen people who can go in there, make views, copy the SQL out to use elsewhere etc. I can't do that. I have been coding SQL since the early 80's (DEC VAX RDB). I can code SQL queries faster than I can say what I am doing. But I don't get that View Designer.

                        T Offline
                        T Offline
                        TenmanS14
                        wrote on last edited by
                        #13

                        LOL... feel that one, I started in Dataease and DB4...

                        1 Reply Last reply
                        0
                        • T TenmanS14

                          Just come across this one, apparantly copied/pasted direct from access.... SELECT stuff FROM somewhere WHERE (((aa.type)='word')); does access always just bung brackets everywhere?

                          D Offline
                          D Offline
                          David A Gray
                          wrote on last edited by
                          #14

                          I've seen the Access wizards generate SQL that looks like that.

                          David A. Gray Delivering Solutions for the Ages, One Problem at a Time Interpreting the Fundamental Principle of Tabular Reporting

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups