How do i write Set based queries and avoid a cursor?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy M

    #31
    Re: How do i write Set based queries and avoid a cursor?

    On Oct 4, 8:11 pm, DA Morgan <damor...@psoug .orgwrote:
    We are the only "profession " where sloppiness is accepted. You won't
    find physicians, surgeons, pharmacists, attorneys, accountants, or
    engineers tolerating such nonsense. I am in full agreement with Joe:
    Se need to start acting like we are worth our salaries.
    I am quite sure that Garbage Collectors, Janitors, Landscapers, and a
    number of others tolerate a certain level of "sloppiness ", as you term
    it. And perhaps you've heard the term "Good 'nuff for gov'ment work."

    The key to language is that one uses a term that is understood by the
    audience that one is speaking to. If I say "field" when I mean
    "column," then its quite OK, so long as folks understand me. I am
    quite sure many doctors have told patients that they have a "cold."
    Ah ha! Sloppiness!! They ought to be telling their patients that
    they have "acute viral nasopharyngitis !" The patient is not cold at
    all--they might even have a fever. From my work in medical software,
    I am quite confident that the official medical record shows a
    diagnosis of a "cold." Is this sloppiness? Not at all. Everyone
    knows exactly what is meant.

    For persons who are quite so dead-set on accuracy of language, and
    consistency, it is interesting to see so many typos!

    On Oct 1, 5:10 pm, --CELKO-- <jcelko...@eart hlink.netwrote:
    Can you think of a business that would not have such an interest when
    it involves a product or service they are *libel* [sic] for? Business isvery
    temporal.
    libel - v - print slanderous statements against; "The newspaper was
    accused of libeling him"
    liable - n - subject to legal action; "liable to criminal charges"

    On Oct 1, 5:10 pm, --CELKO-- <jcelko...@eart hlink.netwrote:
    The "<verb>_<adject ive>" naming convention is not ISO-11179, but at
    least it clearly shows that the data element is not scalar as required
    by RDBMS. It *lkooks* [sic] like OO programming. The flag does not measure
    the quality or quantity of an attribute, but answers a meta-data
    question about existence. Instead of a specific "how much", "how
    many", etc., we have a generalized "is" meta-question.
    lkooks - unknown. perhaps an attempt to spell "cooks"?

    On Oct 4, 8:11 pm, DA Morgan <damor...@psoug .orgwrote:
    *Se* [sic] need to start acting like we are worth our salaries.
    se - abbr - selenium: a toxic nonmetallic element related to sulfur
    and tellurium
    SE - abbr - South East
    ..se - the Internet country code top-level domain (ccTLD) for Sweden
    se - n - an ancient Chinese plucked zither (string instrument)
    se - French - Third-person reflexive pronoun

    Comment

    • Andy M

      #32
      Re: How do i write Set based queries and avoid a cursor?

      On Oct 4, 5:02 pm, DA Morgan <damor...@psoug .orgwrote:
      You are, of course, technically correct, you can call a rose a sewer
      if you wish. But likely you will not find too many people willing to
      tour your sewage garden. I would suggest that if you want to be a poet
      you change your profession. In ours it matters.
      I am generally not very excited about sewer gardens, but I do enjoy
      several other types of gardens:

      Flower Gardens
      Perennial Gardens

      Comment

      • Hugo Kornelis

        #33
        Re: How do i write Set based queries and avoid a cursor?

        On Mon, 06 Oct 2008 10:23:15 -0700, DA Morgan wrote:
        >Hugo Kornelis wrote:
        >On Sun, 05 Oct 2008 12:35:39 -0700, DA Morgan wrote:
        >>
        >>Erland Sommarskog wrote:
        >>>DA Morgan (damorgan@psoug .org) writes:
        >>>>You are correct they do. It would also be correct to state that there
        >>>>are people that rob banks, steal chickens, and don't know how to merge
        >>>>into traffic. Each and every one of them should be taken to the
        >>>>proverbia l woodshed too.
        >>>>
        >>>Obviously you are seriously in need of a holiday if you equate using
        >>>records and fields in place of rows and columns to robbing banks.
        >>Of course I don't equate them. But equally true I don't find value
        >>in the argument that "other people do it too" which was the excuse
        >>made: It is a poor one and I was highlighting its weakness.
        >>
        >Hi DA,
        >>
        >You obviously misunderstood me. The excuse made was not that "other
        >people do it to". The excuse (if you insist on calling it that) was
        >rather that it's a long-proven fact that language evolves over time, and
        >that correct use of language is ultimately decided by the people using
        >it.
        >
        >Absolutely correct that language evolves over time. But this isn't about
        >language. This is about verbiage coded into the ANSI standard. This is
        >about keywords in the product documentation. This is about being able to
        >communicate with a world-wide audience with clarity.
        Hi DA,

        If it's about communicating with the world-wide audience, then why not
        rely on the dictionary to set the standards rather than cling on the
        verbiage in a standard that is only used by a fraction of the total
        world population?

        Also, "field" IS defined in the ANSI standard. See ISO/IEC 9075-1:2003
        (E), 4.4.5.3 on page 17 (in the late draft that I have; the newest
        version I found for free on the internet):

        4.4.5.3 Fields
        A field is a (field name, data type) pair. A value of a field is a value
        of its data type.

        The term is further used heavily throughout the standard.

        I do agree that "record" is not defined in the ANSI standard.

        But alll the above is irrelevant. Whether or not row, column, field, and
        record are defined in any standard - the world has moved on; the meaning
        of the words has evolved. If I have to make a guesstimate, I'd say that
        over 70% of all people professionally involved with database programming
        consider the terms field and column and the terms row and record to be
        100% synonyms. Fighting this just because it comes from the ultimate
        evil named MS-Access is (a) useless, and (b) a fine wayy to show oneself
        off as a dinosaur.
        >If you want to say "Whatsup" or "Kool" knock yourself out. But to
        >claim that "table" communicates clearly when the question might
        >relate to whether it is a "heap table" or a "working (temp) table"
        >is quite another matter.
        >
        >I am with Joe on this one and you'd not pass my class if you didn't
        >know the difference between a row and a record, a column and a field.
        There's a huge gap between "not knowing the difference" between terms,
        or "occasional y using the wrong term" or even "using the wrong term on
        purpose since that will resonate better with the audience and the
        difference is not really relevant in the context".

        When modeling an EAR diagram, do you also religously stress the word
        type in the terms "entity type", "attrbiute type", and "relationsh ip
        type" all the time, or do you just go with the flow and use the terms
        "entity", "attribute" , and "relationsh ip" even though you are aware that
        these terms actually describe a single instance rather than the
        generalization?
        >Does it matter? Look at all of the failed and terrible implementations
        >of software that plague our industry: Yes it matters.
        Ah, and those implementation would all have been great if noone had ever
        used the words "field" or "record" in a relational context?

        If that's you analysis of why projects fail, than you'd better prepare
        yourself for many more failed implementations .

        --
        Hugo Kornelis, SQL Server MVP
        My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

        Comment

        • Hugo Kornelis

          #34
          Re: How do i write Set based queries and avoid a cursor?

          On Mon, 6 Oct 2008 10:35:52 -0700 (PDT), --CELKO-- wrote:
          >>Trust me on this, Joe. It *IS* possible to use the terms "field" and "record" and still think in sets.
          >
          >"That which we call a rose, by any other name would smell as sweet!"
          -- Shakespeare, "Romeo and Juliet", 1594 <<
          >
          >Is this an argument for doing math with Roman Numerals, since they are
          >the same Integers? Words are mind tools. Common people also confuse
          >an engine and a motor, meteors, meteoroids and meteorites, guns and
          >pistols. ships and boats, etc.
          >
          >But it does make a difference to the trained professional whose skill
          >domain makes use of exact words.
          >
          >What I have found is that if you can get the concepts into a student
          >and cut him loose from his old mindset, he learns much faster, much
          >better.
          Hi Joe,

          What you appear to be forgetting is that most people out there are not
          dinosaurs like you and me. They have never ever worked with file storage
          or other sequential I/O. The *only* times they see the terms record and
          field is in the context of a relational database. So these words
          describe the same concepts to them as the words row and column describe
          to us.

          (snip)
          >The same principle applies to documentation and your predecessors had
          >failed completely to maintain as a part of the system. Nothing should
          >have been allowed to modify the system without changing the
          >documents. And management who did not make that part of the system
          >failed their job.
          Exactly!

          --
          Hugo Kornelis, SQL Server MVP
          My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

          Comment

          • --CELKO--

            #35
            Re: How do i write Set based queries and avoid a cursor?

            >What you appear to be forgetting is that most people out there are not dinosaurs like you and me. They have never ever worked with file storage or other sequential I/O. The *only* times they see the terms record and field is in the context of a relational database. So these words describe the same concepts to them as the words row and column describe <<

            While I grant that there are only a few of us here who remember punch
            cards and mag tapes, even the newbies with their new-fangled C#, Java
            and VB have used files that come with those languages.

            I am making shadow boxes for the house. So far I have put my old
            slide rulers on exhibit, and have the collections of abaci and
            astrolabes ready to go up next. But I cannot find a punch card !

            Comment

            • Roy Harvey (SQL Server MVP)

              #36
              Re: How do i write Set based queries and avoid a cursor?

              On Thu, 9 Oct 2008 07:41:15 -0700 (PDT), --CELKO--
              <jcelko212@eart hlink.netwrote:
              >While I grant that there are only a few of us here who remember punch
              >cards and mag tapes, even the newbies with their new-fangled C#, Java
              >and VB have used files that come with those languages.
              You continue to think strictly in terms of bit IT operations. While
              you weren't paying attention over the last 20 years or so that has
              become only a fraction of the IT industry as much of the growth has
              been in companies and in systems that are entirely divorced from the
              world of big iron.
              >I am making shadow boxes for the house. So far I have put my old
              >slide rulers on exhibit, and have the collections of abaci and
              >astrolabes ready to go up next. But I cannot find a punch card !
              Alas, I seem to have discarded all my punch cards too. However I do
              have a five gallon glass water cooler bottle just about full of punch
              chips and the dots from teletype.

              Roy Harvey
              Beacon Falls, CT

              Comment

              • DA Morgan

                #37
                Re: How do i write Set based queries and avoid a cursor?

                --CELKO-- wrote:
                I am making shadow boxes for the house. So far I have put my old
                slide rulers on exhibit, and have the collections of abaci and
                astrolabes ready to go up next. But I cannot find a punch card !
                I have a couple 80 column cards on my desk. Want one?
                Trade you for a 10MB hard disk. <g>
                --
                Daniel A. Morgan
                University of Washington
                damorgan@x.wash ington.edu (replace x with u to respond)

                Comment

                Working...