ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Quickly get column list in ACS: Run SQL Scripts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quickly get column list in ACS: Run SQL Scripts

    Hello,

    I use STRSQL a lot, mainly for convience sake but I'm wanting to move away from it now and I intend to use the Access Client Solutions "Run Sql Script".

    The one advantage of STRSQL is quickly getting a list of columns, ie.;

    STRSQL
    SELECT * FROM SYSIBM/SYSDUMMY1
    F4
    Click in "select" row and press F4 again
    You now have a list of columns

    Is there a similar way of doing this in Run SQL Scripts? Or do I have to select from syscolumns?

    Cheers,
    Ryan

  • #2
    Ryan,

    This is under consideration on the IBM RFE site. https://www.ibm.com/developerworks/r...e&CR_ID=112116

    Go Vote!

    Jim

    Comment


    • #3
      Thanks Jim, will do!

      Comment


      • #4
        I may as well have raised that, it's pretty much exactly the annoyance I have with it! Thanks again.

        Comment


        • #5
          Until IBM addresses that RFE, I use the Query in Run SQL Scripts menu option available in the Schemas to display the columns in a table in a separate script.

          Comment


          • #6
            That's not really that hard nor very time consuming and the ACS gives more options at the fingertips than STRSQL.

            Comment


            • #7
              Might not bother you but it bothers enough people to have an rfe for it.

              Comment


              • #8
                I can see the benefit - just saying that the current process isn't that difficult, it does give more options than STRSQL or even ACS SQL Scripts - ie look at definition, generate SQL to create the create script, create the query in SQL Scripts, define the journal, modify permissions, add comments, create indexes from the advisor, create triggers through a guided process, constraints, functions, etc., etc., etc.

                It would be nice to add the ability to go thru a wizard to build SQL statements. You get the basics through the system but you have to add the WHERE, ORDER BY, etc much like the F4 in STRSQL.

                Comment


                • #9
                  If you open Schemas in ACS and navigate to the schema/table, there is an menu option "Query in Run SQL Scripts" that will generate a SELECT statement showing all the columns and their definitions.

                  Then you can copy and paste between multiple open Run SQL Script windows.

                  Comment


                  • #10
                    As long as the RFE is not (yet) realized, I use the following SQL Statement to get the column information for a specific table/view and return the result in a separate window:
                    Code:
                    select Ordinal_Position, Column_Name, Data_Type, Length, Numeric_Scale, is_NULLABLE, Column_Heading, Column_Text,
                           a.*
                       from syscolumns a
                       Where     Table_Name   = 'ADDRESSX'
                             and Table_Schema = 'HSCOMMON10';
                    Birgitta

                    Comment


                    • #11
                      I just use the dBeaver plug-in in RDi (or the stand alone version) - I find it a very useful tool. I'll probably use ACS more when it gets some of the features (like this) that it is currently missing.

                      Comment


                      • #12
                        I still use F.R.O.G. for this. Is it still available?

                        Comment


                        • #13
                          Originally posted by JonBoy View Post
                          I just use the dBeaver plug-in in RDi (or the stand alone version) - I find it a very useful tool. I'll probably use ACS more when it gets some of the features (like this) that it is currently missing.
                          Just as an FYI, for those wanting to use DBeaver, it won't handle stored procedure calls if you're connecting to an iSeries. It only handles them for DB2 on linux, unix, or windows. (confirmed with Serge Rider @ DBeaver)

                          Comment

                          Working...
                          X