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. Query of the day

Query of the day

Scheduled Pinned Locked Moved The Lounge
databasesharepointquestionannouncement
5 Posts 3 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.
  • S Offline
    S Offline
    Sardaukar
    wrote on last edited by
    #1

    1. Open a SQL query client (version 8.0; maybe others...). 2. Run the following SQL batch:

    Declare @M1 Money
    Declare @M2 Money
    Declare @M3 Money

    Select @M1 = 100.0001, @M2 = 200.0019
    Print 'Add how many "- + - +" you want before @M2 ...'
    Select @M3 = @M1 + - + - + - + - + @M2
    Select @M3

    3. Tell me what is going on. Thank you so very much. Now I'm going to sp_destroymyself, bye. :mad:

    A 1 Reply Last reply
    0
    • S Sardaukar

      1. Open a SQL query client (version 8.0; maybe others...). 2. Run the following SQL batch:

      Declare @M1 Money
      Declare @M2 Money
      Declare @M3 Money

      Select @M1 = 100.0001, @M2 = 200.0019
      Print 'Add how many "- + - +" you want before @M2 ...'
      Select @M3 = @M1 + - + - + - + - + @M2
      Select @M3

      3. Tell me what is going on. Thank you so very much. Now I'm going to sp_destroymyself, bye. :mad:

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      it returns 300.0020 and prints "Add how many "- + - +" you want before @M2 ..." MS SQL Query analyzer 7.0 - Anders

      L S 2 Replies Last reply
      0
      • A Anders Molin

        it returns 300.0020 and prints "Add how many "- + - +" you want before @M2 ..." MS SQL Query analyzer 7.0 - Anders

        L Offline
        L Offline
        l a u r e n
        wrote on last edited by
        #3

        rofl "every year we invent better idiot proof systems and every year they invent better idiots"

        1 Reply Last reply
        0
        • A Anders Molin

          it returns 300.0020 and prints "Add how many "- + - +" you want before @M2 ..." MS SQL Query analyzer 7.0 - Anders

          S Offline
          S Offline
          Sardaukar
          wrote on last edited by
          #4

          Thank you, the question was (and it seems you missed the point) what is the meaning of the arithmetic expression x + - + - + - y. If you can answer, it will be good.:mad:

          A 1 Reply Last reply
          0
          • S Sardaukar

            Thank you, the question was (and it seems you missed the point) what is the meaning of the arithmetic expression x + - + - + - y. If you can answer, it will be good.:mad:

            A Offline
            A Offline
            Anders Molin
            wrote on last edited by
            #5

            "+ - + - + - + - +" is the same as "+" ;P " - + " == nothing :-D - Anders

            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