[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Dynamic Table name.. need syntax help



Will this code work within Begin-SQL/End-SQL paragraphs also?  Or is it
limited to Begin-SELECT/End-SELECT paragraphs?  TIA!

--
William Beckner -- Stunt Programmer
Illinois Central College, Rm L141 -- East Peoria, IL  61635-0001
PH: (309) 694-8419 -- FAX: (309) 694-8995
"C code.  C code run.  Please, code, RUN!"

                -----Original Message-----
                From:   Bencke, Gina [mailto:GBencke@KICHLER.COM]
                Sent:   Thursday, November 18, 1999 7:17 AM
                To:     Multiple recipients of list SQR-USERS
                Subject:        Re: Dynamic Table name.. need syntax help

                Cathlin,

                The FROM [ TABLE1 : $tablename ] allows SQR to actually
compile the
                Select paragraph during the compile phase ensuring that the
fields exist
                in TABLE1.  Then during the execution phase SQR recompiles
the select
                statement using the value of $tablename.

                The FROM [$tablename] is not compiled until execution.

                Both will work assuming the fields you are selecting exist
in both
                TABLE1 and $tablename.

                Gina Bencke
                Bencke Consulting Corporation
                -----Original Message-----
                From: Cathlin DeRosa [mailto:cathlind@NSIGHTINC.COM]
                Sent: Wednesday, November 17, 1999 5:10 PM
                To: Multiple recipients of list SQR-USERS
                Subject: Dynamic Table name.. need syntax help


                The FROM statement in my SQL clause looks like this

                FROM [ TABLE1 : $tablename ]

                what the heck is going on here???
                this I would understand
                FROM [$tablename]

                but the other one has me baffled and I can't
                find a referance to it in the manuals.

                Thnks