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. The Lounge
  3. I write the SQL wrong every time.

I write the SQL wrong every time.

Scheduled Pinned Locked Moved The Lounge
databasedesignhelp
34 Posts 19 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.
  • Mike HankeyM Mike Hankey

    I use Squirrel a redneck SQL; GIMME what I need FROM [table name] DELETE what I don't need FROM [table name]

    VS2010/Atmel Studio 6.0 ToDo Manager Extension
    Version 3.0 now available. There is no place like 127.0.0.1

    I Offline
    I Offline
    IndifferentDisdain
    wrote on last edited by
    #25

    Are you OSS'ing it? I'm originally from Texas, so I'm sure I could assist.

    1 Reply Last reply
    0
    • V Vark111

      I got into the habit of making myself look at the thing I wanted to delete before deleting.

      I Offline
      I Offline
      IndifferentDisdain
      wrote on last edited by
      #26

      I like doing SELECT COUNT(*) or just SELECT *, making sure my results are valid, then changing it to DELETE. Seems to work for me.

      1 Reply Last reply
      0
      • L Lost User

        Colin Mullikin wrote:

        What's SQL...?

        An advanced language for querying databases that doesn't involve tons of ridiculously intricate frameworks and mysterious black box middle-tier software. Preferred by people who break out in a rash anytime something becomes more about the architecture then getting stuff done. ;P

        D Offline
        D Offline
        djdanlib 0
        wrote on last edited by
        #27

        The nice thing about it is that you have so many different standard implementations of SQL to choose from, too!

        1 Reply Last reply
        0
        • C Colin Mullikin

          They didn't teach us that variant in school... :laugh:

          The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin

          Mike HankeyM Offline
          Mike HankeyM Offline
          Mike Hankey
          wrote on last edited by
          #28

          I went to a southern college. :)

          VS2010/Atmel Studio 6.0 ToDo Manager Extension
          Version 3.0 now available. There is no place like 127.0.0.1

          1 Reply Last reply
          0
          • L Lost User

            I'm so used to writing:

            SELECT * FROM [table name]

            That you can bet when it's time to delete I'll write:

            DELETE * FROM [table name]

            I no longer blame myself. I consider it a language design bug thingy.

            B Offline
            B Offline
            Brady Kelly
            wrote on last edited by
            #29

            I also do that. I think it's a bad habit I picked up with Access, because if I recall correctly, you had to say it like that in Access SQL.

            K 1 Reply Last reply
            0
            • C Clifford Nelson

              MehGerbil wrote:

              An advanced language for querying databases

              Don't know if I would call it advanced.

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #30

              Clifford Nelson wrote:

              Don't know if I would call it advanced.

              Having written code for databases that didn't have it I would certainly call it advanced.

              C 1 Reply Last reply
              0
              • C Clifford Nelson

                Personally I use extension methods when writing LINQ, not the SQL like syntax. Anytime I see the SQL syntax my mind goes blank.

                K Offline
                K Offline
                kmoorevs
                wrote on last edited by
                #31

                I am just the opposite, being new to LINQ...putting the from before the select just seems weird...and I still can't get it to accept more than one orderby param! :confused:

                "Go forth into the source" - Neal Morse

                1 Reply Last reply
                0
                • B Brady Kelly

                  I also do that. I think it's a bad habit I picked up with Access, because if I recall correctly, you had to say it like that in Access SQL.

                  K Offline
                  K Offline
                  kmoorevs
                  wrote on last edited by
                  #32

                  I'm not sure, but it may depend on the driver. We use the Jet4 oledb driver for Access and it is quite happy to delete with or without the *. Our apps run can use either SQL Server or Access for the backend, and Delete operations don't require any special handling. (aside from date delimiters) Basically, if it works in Access, it will work in SQL Server, but not always the other way around.

                  "Go forth into the source" - Neal Morse

                  1 Reply Last reply
                  0
                  • J jschell

                    Clifford Nelson wrote:

                    Don't know if I would call it advanced.

                    Having written code for databases that didn't have it I would certainly call it advanced.

                    C Offline
                    C Offline
                    Clifford Nelson
                    wrote on last edited by
                    #33

                    Then we have made no progress in 40 years since SQL was developed, if a 40 year old technology is advanced. You must think that there has also been no significant improvement in software languages in since Fortran 1V.

                    J 1 Reply Last reply
                    0
                    • C Clifford Nelson

                      Then we have made no progress in 40 years since SQL was developed, if a 40 year old technology is advanced. You must think that there has also been no significant improvement in software languages in since Fortran 1V.

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #34

                      Clifford Nelson wrote:

                      Then we have made no progress in 40 years since SQL was developed, if a 40 year old technology is advanced. You must think that there has also been no significant improvement in software languages in since Fortran 1V.

                      That of course has nothing to do with what I said. Unless of course you think that Fortan or something like C++/C+#/Python exist to solve data storage problems.

                      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