Loading ...
Sorry, an error occurred while loading the content.
 

Select

Expand Messages
  • Michael Vilhelmsen
    Hi Can I in a select statement select evrything but 1 field ? Michael
    Message 1 of 24 , Sep 1, 2003
      Hi

      Can I in a select statement select evrything but 1 field ?

      Michael
    • Helen Borrie
      ... Yes. Use a column list and just omit the one(s) you don t want: select Col1, Col2, .... LastCol from aTable where... heLen
      Message 2 of 24 , Sep 1, 2003
        At 07:07 AM 1/09/2003 +0000, you wrote:
        >Hi
        >
        >Can I in a select statement select evrything but 1 field ?

        Yes. Use a column list and just omit the one(s) you don't want:

        select Col1, Col2, .... LastCol
        from aTable
        where...

        heLen
      • Martijn Tonies
        Hi Michael, ... But what 1 field? What do you mean? SELECT EMPLOYEEID FROM EMPLOYEE Selects only 1 field, I can easily list all other fields except this one.
        Message 3 of 24 , Sep 1, 2003
          Hi Michael,

          > Can I in a select statement select evrything but 1 field ?

          But what 1 field? What do you mean?

          SELECT EMPLOYEEID
          FROM EMPLOYEE

          Selects only 1 field, I can easily list all other fields except
          this one.

          Please explain a bit more.


          With regards,

          Martijn Tonies
          Database Workbench - the developer tool for InterBase & Firebird
          Upscene Productions
          http://www.upscene.com
        • Michael Vilhelmsen
          Hi Helen I did know that much but I was wondering if I could something like Select * except feild1 from MyTable...... Because I have a table that has 48
          Message 4 of 24 , Sep 1, 2003
            Hi Helen

            I did know that much but I was wondering if I could something like

            Select * except feild1 from MyTable......


            Because I have a table that has 48 fields, and I would like to select
            them all except 1 field.

            Its not a big deal, but I was just wondering.

            Thank you anyway.

            Michael
          • Helen Borrie
            ... Nope. Heck, Select * is **bad enough** !!! Did you know that IB_SQL has a nifty little helper in the Browse tool, which lists all of the columns of a
            Message 5 of 24 , Sep 1, 2003
              At 07:52 AM 1/09/2003 +0000, you wrote:
              >Hi Helen
              >
              >I did know that much but I was wondering if I could something like
              >
              >Select * except feild1 from MyTable......
              >
              >
              >Because I have a table that has 48 fields, and I would like to select
              >them all except 1 field.
              >
              >Its not a big deal, but I was just wondering.

              Nope. Heck, "Select * " is **bad enough** !!!

              Did you know that IB_SQL has a nifty little helper in the Browse tool,
              which lists all of the columns of a table in "copy-paste" format, so that
              you can just lift them out and drop them straight into your query string?

              If you have IB_SQL, open the Browse tool and select your table. Then click
              the "Field Names List" tab at the right, then the "Comma and Space" radio
              button - and there is your ready-to-go fieldlist.

              You can can IB_SQL free from www.ibobjects.com

              heLen
            • Michael Vilhelmsen
              Hi Martijn I think Helen got my point. But to explain some more, then lets say I have a table of 50 fields (field1, field2, field3, etc). I would then like to
              Message 6 of 24 , Sep 1, 2003
                Hi Martijn

                I think Helen got my point.

                But to explain some more, then lets say I have a table of 50 fields
                (field1, field2, field3, etc).

                I would then like to select all fields except field37 i.e.

                I thought it was imposible, and as Helen explained it is.
                And since I was just wondering, thats ok.


                Thats it.

                Michael
              • Martijn Tonies
                Hi Michael, ... Well, I kinda emailed right after your first post - it seems Yahoo is a bit slowish these days... :-) Anyway, you got the answer. -- Martijn
                Message 7 of 24 , Sep 1, 2003
                  Hi Michael,

                  > I think Helen got my point.

                  Well, I kinda emailed right after your first post - it
                  seems Yahoo is a bit slowish these days... :-)

                  Anyway, you got the answer.

                  --
                  Martijn
                • Paul Vinkenoog
                  Hi Martijn, ... Last night the delay was around 2 hrs. They must receive millions of Sobig-infected messages per day, I guess that s what s slowing them
                  Message 8 of 24 , Sep 1, 2003
                    Hi Martijn,

                    > Well, I kinda emailed right after your first post - it
                    > seems Yahoo is a bit slowish these days... :-)

                    Last night the delay was around 2 hrs. They must receive millions of
                    Sobig-infected messages per day, I guess that's what's slowing them
                    down...


                    Greetings,
                    Paul Vinkenoog

                    (just generated 100.000 non-existing Germans with DBW :-))
                  • peter_jacobi.rm
                    Hi Michael ... I vaguely recall that there are SQL dialects, where you can dynamically generate a SQL statement by means of SQL, most usefully with queried
                    Message 9 of 24 , Sep 1, 2003
                      Hi Michael

                      --- In firebird-support@yahoogroups.com, "Michael Vilhelmsen"
                      > I would then like to select all fields except field37 i.e.

                      I vaguely recall that there are SQL dialects, where you can
                      dynamically generate a SQL statement by means of SQL, most
                      usefully with queried metadata tables.

                      Pseudo-SQL which will certainly work nowhere:

                      EXECUTE
                      'SELECT ' ||
                      (SELECT colname FROM meta$columns
                      WHERE table = 'tbl1' AND colname != 'field37
                      AS STRING DELIMITER ',') ||
                      'FROM tbl1' ;

                      Regards,
                      Peter Jacobi
                    Your message has been successfully submitted and would be delivered to recipients shortly.