From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 01 00:00:43 2005 Date: Fri, 1 Apr 2005 00:00:02 -0500 From: Nathan Stratton Treadway Subject: [sqr-users] Monthly sqr-users Hints Posting sqr-users Mailing List Hints and Guidelines Nathan Stratton Treadway, Ray Ontko & Co. (nathanst@ontko.com) $Revision: 1.21 $ $Date: 2004-03-04 02:47:15-05 $ This document gathers in one location information about the sqr-users mail list. It includes instructions for changing your subscription settings (including unsubscribing), as well are guidelines for using the list. ______________________________________________________________________ Table of Contents 1. Changes Since Previous Version 2. Introduction 2.1 sqr-users Mailing List 2.2 sqr-users Hints and Guidelines Document 2.3 Related Mailing Lists 3. Interacting with the list server 3.1 Subscribing to the list 3.2 Unsubscribing from the list 3.3 When your email address changes 3.4 Digests 3.5 Obtaining your password 3.6 Problems 4. Posting to the sqr-users List 4.1 General Guidelines 4.2 Posting a Message 4.3 Replying to a Message 5. Job Announcements ______________________________________________________________________ 1. Changes Since Previous Version Changes since the version dated 2003/11/01: o Update subscribe/unsubscribe instructions for new version of list server software. o New URL for "brio-l" mailing list. 2. Introduction 2.1. sqr-users Mailing List The sqr-users mailing list was created to enable discussion related to the SQR database language from Hyperion (and to other products in the SQR product suite). Note: SQR used to be published by SQRIBE Technologies, which was merged into Brio Technology on August 3, 1999. Brio Technology changed its name to Brio Software in October 2001. On October 16, 2003, Hyperion acquired Brio Software. SQR and related applications have also been called "Brio.Report" and "Brio Reports". The mailing list is provided as a service of Ray Ontko & Co. A searchable archive of past postings to the mailing list is available from the SQR Users Group web site . 2.2. sqr-users Hints and Guidelines Document This document gives various hints and guidelines about the sqr-users mailing list. It will be posted approximately monthly to the mailing list so that new users can see it (and existing users can find it easily). An HTML version of the document is always available at http://www.sqrug.org/sqr-users/sqr-users-hints.html. If you have comments or suggestions about this document, please contact me directly at the address listed in the title section. This document is Copyright (C) 1999-2004 by Ray Ontko & Co. It may be freely copied and distributed provided it is not modified in any way and it retains the original copyright notice. 2.3. Related Mailing Lists Here are some mailing lists that cover topics relating to SQR in some way. sqr-jobs : SQR Jobs This list may be used for posting SQR-related resumes, recruitments, job announcements, project announcments, help- wanted, work-wanted ads, etc. To join, follow the link above, or send any message to "sqr-jobs-subscribe@yahoogroups.com". peoplesoft-fans : PeopleSoft Fans Moderated list covering technical and functional aspects of PeopleSoft. To join, follow the link above, or send any message to "peoplesoft-fans-subscribe@yahoogroups.com". psusers : PeopleSoft Users For questions related to any aspect of PeopleSoft (including PeopleSoft-specific SQR issues). This list has merged with the Peoplesoft Fans mailing list and is no longer active, but the message achive can still be found at the link above. BrioSQRReport : Brio SQR Report List for discussion of SQR and SQR Developer (formerly called Brio.Report and Report Builder). To join, follow the link above, or send any message to "BrioSQRReport- subscribe@yahoogroups.com". rm-users : Report- Mart Users List for discussion of Brio Portal (previously called ReportMart). To join, follow the link above, or send a message containing the word "subscribe" in the body to "rm-users- request@sqrug.org". brioportalusersgroup : Brio Portal Users Group list List for discussion of Brio Portal. To join, follow the link above, or send any message to "brioportalusersgroup- subscribe@yahoogroups.com". brio-l : OpenITx Brio List List for technical and functional discussion of all Brio products (but most messages are currently about Brio Intelligence). To join, follow the link above. briousers : Brio.Enter- prise Users List for discussion of the Brio.Enterprise (now called Intelligence) product. To join, follow the link above, or send any message to "briousers-subscribe@yahoogroups.com". briolist : Brio List List for discussion of Brio Intelligence. To join, follow the link above, or send any message to "briolist- subscribe@yahoogroups.com". 3. Interacting with the list server The sqr-users mailing list is hosted using the Mailman list server package. All of the Mailman functions described below are accessed from the sqr-users List Info page, "http://www.sqrug.org/mailman/listinfo/sqr-users". 3.1. Subscribing to the list To subscribe to the mailing list, enter your e-mail address in the box at the top of the "Subscribing to sqr-users" section on the sqr-users List Info page, then choose a password to assign to your subscription and enter it in both "Password" boxes. This password is used to allow you to securely make changes to your subscription over the web. This password will be e-mailed back to you at varous times, so you should not use the same password as you are using elsewhere. Once you have filled in the password, click the "Subscribe" button. You should soon receive an e-mail message from the list server requesting confirmation of your subscription request. Once you have replied to this message and your subscription has been processed, you will receive a "welcome" message giving you more information on the list server, and as well as a reminder of the subscription password you chose. 3.2. Unsubscribing from the list To unsubscribe from the list, go to the sqr-users List Info page, enter your e-mail address in the "sqr-users Subscribers" section near the bottom of the page, and click the "Unsubscribe or edit options" button. You will then see the "member options" page; fill in your password at the top of the page and click "Log in". (If you have forgotton your password, see the ``Obtaining your Password'' section, below). This will take you to the "membership configuration" page. In the middle of that page, there will be an "Unsubscribing from sqr- users" section; simply turn on the "Yes, I really want to unsubscribe" checkbox and click the "Unsubscribe" button. You should get a page back saying that the removal was successful (as well as a confirmation email message). The removal will take effect immediately; there is no need to send in a confirmation e-mail message. If you don't know your password, you can choose to unsubscribe using e-mail confirmation. Instead of entering the password on the "member options" page, just click the "Unsubscribe" button found just below the "Log In" button. You will then see a page noting that a confirmation e-mail has been sent; once you follow the confirmation instructions in that e-mail your removal will be complete. 3.3. When your email address changes If your e-mail address changes -- for example, if your company changes names, or if your mail administrator changes the way your name is spelled out or abbreviated -- you will need to update your subscription to match your new address before you can post to the list (see the ``Posting'' section, below). To do this, simply log in to your "membership configuration" page (see the directions for logging in to this page in the ``Unsubscribing'' section, above). At the top of that page you'll see a "Changing your membership information" section. Fill out the text boxes and click the "Change My Address and Name" button. You will be sent a confirmation e-mail, and once you have responded to that e-mail your subscription will be updated and you can begin posting from your new address. 3.4. Digests You can request to get your messages in digest form (one large message containing all of the posts made each day). To do this, log in to your "membership configuration" page (see the directions on doing this in the ``Unsubscribing'' section, above). At the bottom of the page, you will see a section titled "Your sqr-users Subscription Options". Change the "Set Digest Mode" option (the second option in the list) to "On" and click the "Submit My Changes" button at the bottom of the page. You actually have a choice of two different digest formats, "MIME" or "Plain Text". The MIME format sends each individual list message as a separate MIME attachment to the digest; the plain text format consists of one large text message, with all of the individual messages run together. Which format you will want to use depends on your mail- reading software (and personal preference). If you are not sure which format will work best, you can just leave the default setting of "MIME" and see if the next morning's digest is easy to read in your mail reader -- you can change to the other format at any time using that same web page. If you use digests, you should not just "reply" to the digest mailing. Instead, be sure your message's subject header matches the subject in the original posting to which you are replying, and that you don't include a quoted copy of the entire digest in your post. To restore normal distribution, simply follow the above instructions choosing the "Off" setting for the Digest option. 3.5. Obtaining your password You will not be able to change your subscription options without your password. If you have forgotten your password, simply click the "Email My Password to Me" button on the "member options" page and your password will be emailed to you. You will also be e-mailed a copy of your password at the beginning of each month, as part of a "mailing list memberships reminder" message from the Mailman software. 3.6. Problems If the above instructions do not work, please contact the list manager at "sqr-users-manager@sqrug.org". (Do not send a message to the list itself -- no one there can help you with your problem!) Please include a description of what you were trying to do and what exactly happened when you made the attempt. 4. Posting to the sqr-users List In order to post to the mailing list, you must be subscribed to it (see directions above). More specifically, in order for Mailman to recognize that this message was sent by a subscriber, the return address on your message much exactly match the addresss you used to subscribe -- if you have more than one address you will need to be sure that you are sending from the correct one. (See the ``When you email address changes'' section, above, if your e-mail address has changed since you subscribed.) 4.1. General Guidelines For any message you send to the list, please: o make sure your mail software is not requesting a "Return Receipt". (If a "Return Receipt Requested" message is sent to the list, several dozen receipt messages will be sent out to the mailing list as other subscribers' mail systems repond....) o do not send messages in HTML or other special formats. (These are not usable by many subscribers, especially those who receive their messages in digest format.) The list server will delete these special attachments from your message and send you a warning notice. Also, if you are trying to send (for example) SQR source code files, make sure your mail-reader software is assigning proper MIME types to your attachments or they may not be distributed. o keep in mind that over 500 people will receive your message, and that it will appear in the list archives. Try to keep your messages on-topic and relatively short. Consider sending your message directly to particular people if it won't interest many of the list's subscribers. o ignore abusive and inappropriate messages that get sent to the list, rather than getting drawn into a debate. The very nature of these messages will cause most subscribers to automatically discredit them -- no "response" is necessary. To the contrary, any response will only "add fuel to the fire," prolonging the controversy and further interupting the normal conversation on the list. 4.2. Posting a Message Once you are subscribed, you can post to the list by sending a message to "sqr-users@sqrug.org". Be sure your subject heading describes your specific problem or question (i.e. don't just use "SQR Question"). In the body of your message, please include the following information: o SQR product name and version number (see notes below) o Operating system name and version number o Database name and version number o Application name (i.e. PeopleSoft) and a version number, if any Also, include a short code sample whenever possible. It's much easier for other people to understand what you are trying to do when they can see the actual code. (At the same time, be careful not to post confidential or proprietary code, since the posting will be placed in a public web archive.) Note that your question should relate to SQR or other Brio Report product in some way. Don't ask questions about PeopleSoft, for example, unless you are having SQR-related issues. (For PeopleSoft- specific questions, see other lists mentioned in the ``Related Mailing Lists'' section.) In 2001, PeopleSoft purchased from Brio the rights to the source code for SQR and began releasing its own line of SQR. PeopleSoft's SQR version numbering is different from Brio/Hyperion's, so it's very important to mention whether you are using Hyperion's "SQR" or "SQR for PeopleSoft". (This info is included automatically if you include the full SQR version-id string as described below.) To get the version-id string for your copy of SQR, you can run the following program: begin-program show $sqr-ver end-program This will produce a line that looks something like this: SQR/3.0.15/Intel/SCO Unix R3.2 V5.0/Oracle 7.2.2.3/Sep 25 1996 Include the full line of output in your message. Note that the oper- ating system and database version numbers listed here are the ones under which this copy of SQR was compiled, so you'll still need to include this information for your own environment. In a command-line environment (Unix, etc.), you can also get this version-id string by saying sqr -id 4.3. Replying to a Message Messages sent out on the list have a Reply-To header pointing to the list. This means that you should be able to simply use your mail reader's "reply" function to send a reply to the list. Generally, all answers to questions sent out on the list should be public replies, so that other subscribers can benefit. In those cases where a private reply is appropriate, be sure to over-ride the default Reply-To address. If your message is not actually a reply to the earlier message, please do not use the "reply" function. Instead, address a new e-mail message to the list as described in the previous section. (This is because the list archives will incorrectly show the new message in the original thread if you use "reply".) You should quote enough lines from the original message that later readers can understand your answer even if they missed the original question. At the same time, you should remove any unnecessary lines from the quote in order to make your message shorter and easier to understand. (Remember that some people read the mailing list in digest form, and the digests become much larger if unnecessary lines are quoted.) 5. Job Announcements Please do not post job announcements on the sqr-users list, but use the sqr-jobs list instead. (See ``Related Mailing Lists'' for more information on this list.) A large number of sqr-users subscribers do not want to receive job announcements (for various reasons) and such posts tend to cause a lot of disruption of the discussion on the list. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 01 11:54:46 2005 Date: Fri, 1 Apr 2005 08:54:07 -0800 From: marc pechaitis Subject: [sqr-users] printing two portrait pages on a landscape page? Hello all - Thanks again for the help with the column problem I inquired about yesterday. The report I am writing is for a SQR being run in PeopleSoft. PeopleSoft delivers a sqc called "setup02.sqc" that formats the report to print in Landscape orientation (and "setup01.sqc" prints in Portrait). The users want the report to print two (portrait) pages to a landscape orientation. Is anyone aware of a different sqc that might do this automatically? If not, does anyone have any suggestions about a way to do this (counting lines? -ugh)? We were thinking that this could be an issue better handled with the printer driver, but the report will be printing directly from PeopleSoft so it would be extra tricky to figure out how to make that work. So I figured I'd throw it out there to see if anyone has figured out a good way to do this. Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 01 12:20:23 2005 From: "Paul Hoyte" Subject: RE: [sqr-users] printing two portrait pages on a landscape page? Date: Fri, 1 Apr 2005 12:19:46 -0500 Marc: One way would be to use the printer driver and tell it to print 2 pages per sheet in landscape mode (like PowerPoint), or you can use the column feature of SQR and create 2 logical pages in landscape mode and then just print using the column commands. Paul Hoyte (248) 752-6970 Cell (586) 421-9640 Fax pa_hoyte@si-proservices.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org [mailto:sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org] On Behalf Of marc pechaitis Sent: Friday, April 01, 2005 11:54 AM To: sqr-users@sqrug.org Subject: [sqr-users] printing two portrait pages on a landscape page? Hello all - Thanks again for the help with the column problem I inquired about yesterday. The report I am writing is for a SQR being run in PeopleSoft. PeopleSoft delivers a sqc called "setup02.sqc" that formats the report to print in Landscape orientation (and "setup01.sqc" prints in Portrait). The users want the report to print two (portrait) pages to a landscape orientation. Is anyone aware of a different sqc that might do this automatically? If not, does anyone have any suggestions about a way to do this (counting lines? -ugh)? We were thinking that this could be an issue better handled with the printer driver, but the report will be printing directly from PeopleSoft so it would be extra tricky to figure out how to make that work. So I figured I'd throw it out there to see if anyone has figured out a good way to do this. Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 01 15:15:45 2005 Subject: Re: [sqr-users] printing two portrait pages on a landscape page? Date: Fri, 1 Apr 2005 18:07:05 -0000 From: Hi Marc, some printers (Xerox, IBM transport underneath the physical versus logical page) will allow you to select that as a printer setup option in the driver (multiple logical pages on one physical page, seascape, landscape, shrink, etc); however, I have only done it using a postscript printer (not HP since it needs quarter inch of transport on left and right side). Some of the problems include whether you are using fixed versus proportional font and whether you are using html and/or a line printer and of course images. The SQR user group library has some code that might provide some assistance. How the includes there mesh with Oracle/PeopleSoft sqc's I can't comment on without experimentation. John Willson jwillson@dssltd.com marc pechaitis said: > Hello all - > Thanks again for the help with the column problem I inquired about yesterday. > > The report I am writing is for a SQR being run in PeopleSoft. > PeopleSoft delivers a sqc called "setup02.sqc" that formats the report > to print in Landscape orientation (and "setup01.sqc" prints in > Portrait). > > The users want the report to print two (portrait) pages to a landscape > orientation. Is anyone aware of a different sqc that might do this > automatically? If not, does anyone have any suggestions about a way > to do this (counting lines? -ugh)? > > We were thinking that this could be an issue better handled with the > printer driver, but the report will be printing directly from > PeopleSoft so it would be extra tricky to figure out how to make that > work. So I figured I'd throw it out there to see if anyone has > figured out a good way to do this. > > > Thanks! > Marc > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > -- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 10:40:26 2005 From: Olga.Gal@bbh.com Date: Mon, 4 Apr 2005 11:38:53 -0400 Subject: [sqr-users] Dynamic SQL vs. Fixed SQL execution We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 10:50:51 2005 Subject: Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution From: Wjatscheslaw KRAVTCHENKO Date: Mon, 4 Apr 2005 17:50:35 +0200 Dear Olga, is the SQR forming the SQL slow or is the response from the database slow? How slow is it? Wha amount of data are we dealing with? We had a similar scenario on Sybase 12.5 transactional data. Do you have any samples of the SQL stmts ? How is the Warehouse structured? Anticipating your reply. ______________________________________ Wjatscheslaw Kravtchenko (Mr.) ProFi System Manager Assistant ProFi Technical Team Information Technology Service Division for Management United Nations Office on Drugs and Crime Tel: (+43-1) 26060-4153 Websites: www.unov.org, www.unodc.org ______________________________________ Impossible is not a fact, only an opinion Olga.Gal@bbh.com Sent by: sqr-users-bounces To +wjatscheslaw.kra sqr-users@sqrug.org vtchenko=unvienna cc .org@sqrug.org Subject [sqr-users] Dynamic SQL vs. Fixed Monday, 4 April SQL execution 2005 17:38 Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 10:59:30 2005 From: Bob Stone Subject: RE: [sqr-users] Dynamic SQL vs. Fixed SQL execution Date: Mon, 4 Apr 2005 10:58:24 -0500 if you're creating the where clause dynamically, then yes, it will re-parse the select statement many times, adding a lot of unnecessary overhead. Also, when not using bind variables the SQL will sometime not use the index that was made for that specfic SQL. I forget the exact reasons for this, but we recently went through a similar exercise with one of our DBAs. We had a quick process/report turn slow all of a sudden, because we changed something and it stopped using a bind variable which made it stop using the index. (also of concern was that reparsing of the same repetitive SQL over and over). If a procedure executes a fixed SQL, I don't think it reparses it everytime. (I'm not 100% on this, but quite sure). I think rewriting it might solve your time issue. (sorry if that's not the answer you wanted to hear). We're using an older verison of SQR and we're on Oracle 8i, so I couldn't say if the problem we had is something fixed in later versions of either...but because of the type of problem, I would assume it's still the same. Another way to speed up the SQR running time is tuning the SQLs...making sure they're using an index every time. The actual processing of non-SQL parts of SQRs is ususally negligible compared to IO/DB time. You might discuss this with your DBA, run a trace to find which statements in the SQR are the slowest. Perhaps there's one statement taking 60% of the time, and could be tuned down to a matter of seconds? We've run into that with our reports/processes. I dont know where you are on SQR tuning these reports, so perhaps switching to non-dynamic SQL is the biggest time saver. But to answer your original question, yes, I think if you could rewrite them non-dynamically that would save you parsing time (sometimes huge overhead, depending on number of times SQL is run). -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Olga.Gal@bbh.com Sent: Monday, April 04, 2005 10:39 AM To: sqr-users@sqrug.org Subject: [sqr-users] Dynamic SQL vs. Fixed SQL execution We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 11:24:40 2005 Subject: Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution From: Olga.Gal@bbh.com Date: Mon, 4 Apr 2005 12:22:52 -0400 Dear Wjatscheslaw, To produce the report we access huge wide tables (millions of rows) that are joined by indexed columns. The queries are carefully tuned and executed fairly quickly outside the SQR. The processing starts with an outer (driving) query, which supposed to be the slowest one. It would return back thousands of rows, and then 90 percent of the selected rows are processed further: for each processed rows the SQR then selects additional information from 6 other queries that are dynamically constructed (dynamic SQL). These queries access the data by Primary Key, and are very fast when executed outside SQR. It takes over an hour to generate a report of about 650 such entities. By monitoring the progression of the report it looks like the driving query (the slowest one) is returning the list of entities fairly quickly, but it still takes too long to finish the report, which brought me to think that the problem is not really in the data access. Wjatscheslaw KRAVTCHENKO Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To "This list is for discussion about the SQR database reporting language from Hyperion Solutions." 04/04/2005 11:50 AM cc Subject Please respond to Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Dear Olga, is the SQR forming the SQL slow or is the response from the database slow? How slow is it? Wha amount of data are we dealing with? We had a similar scenario on Sybase 12.5 transactional data. Do you have any samples of the SQL stmts ? How is the Warehouse structured? Anticipating your reply. ______________________________________ Wjatscheslaw Kravtchenko (Mr.) ProFi System Manager Assistant ProFi Technical Team Information Technology Service Division for Management United Nations Office on Drugs and Crime Tel: (+43-1) 26060-4153 Websites: www.unov.org, www.unodc.org ______________________________________ Impossible is not a fact, only an opinion Olga.Gal@bbh.com Sent by: sqr-users-bounces To +wjatscheslaw.kra sqr-users@sqrug.org vtchenko=unvienna cc .org@sqrug.org Subject [sqr-users] Dynamic SQL vs. Fixed Monday, 4 April SQL execution 2005 17:38 Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 11:44:47 2005 Date: Mon, 04 Apr 2005 12:43:20 -0400 From: "George Jansen" Subject: Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution Before you tune ANYTHING you should know where your time is going. As a fir= st step you might try something as simple as adding a procedure that looks = at v$mystat and seeing what the waits are. >>> Olga.Gal@bbh.com 04/04/05 11:38 AM >>> We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, = which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically= , based on user's selection, and execute the same Select statement many tim= es within the same job. This makes me think that the slow performance is po= ssibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixe= d Select statements with bind variables ONLY in the Where clause, I would l= ike to get assured that this approach will in fact eliminate unnecessary pa= rsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it d= o it only for a newly executed SQL. In other words, if my program will repe= atedly call a routine that executes a fixed SQL statement, will this statem= ent get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 12:10:21 2005 From: "the dragon" Subject: RE: [sqr-users] Dynamic SQL vs. Fixed SQL execution Date: Mon, 04 Apr 2005 12:01:22 -0500 You can see how many times the sql compiles, as well as how many times it executes, and the number of rows returned by using the -s parameter when you run the program. peace, clark 'the dragon' willis PSA: Salary <> Slavery. If you earn a salary, your employer is renting your services for 40 hours a week, not purchasing your soul. Your time is the only real finite asset that you have, and once used it can never be recovered, so don't waste it by giving it away. I work to live; I don't live to work. "Time is the coin of your life. It is the only coin you have, and only you can determine how it will be spent. Be careful lest you let other people spend it for you." Carl Sandburg (1878 - 1967) ----Original Message Follows---- We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 12:58:24 2005 From: yamuna_pandiyan@freddiemac.com Date: Mon, 4 Apr 2005 13:57:40 -0400 Subject: [sqr-users] Call SYSTEM command in SQR The following command works fine or the directory from where the SQR program runs - '/shared/main/prog/sqr'. This command does not look for the file in a different directory, i.e the data file resides in the data directory - ' /shared/main/files/data/'. This is true if the command is used with or without the predefined prefix variable. Example, I copied the data file from the above data directory to the SQR directory and ran the program.The latest SAMPLE.DAT file name was written into the filename defined in the '$file_list' variable. I did the cd command, $SqrDirectory = '/shared/main/prog/sqr' $DataDirectory = '/shared/main/files/data/' $CMD = 'cd' || $DataDirectory $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || $file_list call system using $syscmd #unix_status I get the error - SAMPLE.DAT: No such file or directory But the above command works fine if I copy the SAMPLE.DAT file into the SQR directory and use the following code, $cmd = 'ls -lt SAMPLE.DAT >' || ' ' || $file_list call system using $syscmd #unix_status Could you help me how to use the 'cd' command with 'ls' command or how to make the program to look for the data file in the data directory...? Thanks, Yamuna "Dattatraya Shetty" "This list is for discussion about the SQR database reporting language Sent by : from Hyperion Solutions." sqr-users-bounces+yamuna_pan diyan=freddiemac.com@sqrug.o cc rg Subject Re: [sqr-users] Call SYSTEM 03/31/2005 01:25 command in SQR PM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." This fix is simple change the command to below let $syscmd = 'ls -lts SAMPLE.DAT >' || $file_list call system using $syscmd #unix_status if #unix_status != 0 stop quiet end-if No need to Add the fileprefix to ls command. Its a Unix command and if you add fileprefix to it the OS will try and execute the ls command from the path in fileprefix which is wrong because the ls command is not stored there. its some where in /usr/bin: if you need to give the path then log into unix and issue the following command $> whence ls see the path displayed and use that. HTH Datta. --- yamuna_pandiyan@freddiemac.com wrote: > > Hi Datta, > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > The > data file is created in the ' /shared/main/files/data/' directory. > The There > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > with all > other programs. > > But I am not able to debug, since I have limited knowledge on the > Call > System commands. When the below program is executed, the > Latestfile.dat is > created in the directory ' /shared/main/files/data/'. > > The error that is generated when executing the program is 'sh: > /shared/main/files/data/ls : not found' if I use the below command. > if I remove the {FILEPREFIX} from the command line, the following > error is > generated - '/shared/main/files/data/ : cannot execute' > > Thanks, > Yamuna > 918-5127 > > > > > "Dattatraya > > Shetty" > > To > oo.com> "This list is for discussion > about > the SQR database reporting > language > Sent by : from Hyperion Solutions." > > sqr-users-bounces+yamuna_pan > > diyan=freddiemac.com@sqrug.o > cc > rg > > > Subject > Re: [sqr-users] Call SYSTEM > > 03/30/2005 04:14 command in SQR > > PM > > > > > > Please respond to > > "This list is > > for discussion > > about the SQR > > database > > reporting > > language from > > Hyperion > > Solutions." > > > .org> > > > > > > > > > > Hi Yamuna, > The Second part of the Problem is that FILEPREFIX may be an > environment > variable not defined? > > In the fist part the $ is missing for an environment variable. > > It would help if you let us know what is the excat command you are > typing > in at the command > prompt. > > e.g > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > is this what you are typing ? > > The fact that you are getting a file called Latestfile.dat tells me > that > the FILEPREFIX is not defined or you are not keying it correctly what > is it > ? > > HTH > Datta. > > > > yamuna_pandiyan@freddiemac.com wrote: > I am using a program which needs to compare the current data with the > previous data file. the data files are created with date and time > stamp. > This program runs once a week, and has to compare the previous weeks > data > file to monitor the data changes. > > I am using the following command on the Unix box to sort the most > recent > file > > let $file_list = '{FILEPREFIX}Latestfile.dat' > > let $syscmd = '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status != 0 > stop quiet > end-if > > The Latestfile.dat file is created in the data directory mentioned > under > {FILEPREFIX}. But the file is empty. I would like to send the result > of the > command > ls -lts SAMPLE.DAT* to the above file. > when I execute the above program in the unix server , I ge the > following > error - {FILEPREFIX} : cannot execute, but a blank file in the name > of > Latestfile.dat is created. > > any help in greatly appreciated. > > Thanks, > Yamuna > 918-5127 > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > > --------------------------------- > Do you Yahoo!? > Yahoo! Sports - Sign up for Fantasy Baseball. > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 13:07:28 2005 Date: Mon, 04 Apr 2005 14:06:19 -0400 From: "Prasanna Menta" Subject: Re: [sqr-users] Call SYSTEM command in SQR You have to know the structure of your unix file directory - Also you need a space between cd and $datadirectory $CMD = 'cd' || ' '|| $DataDirectory yamuna_pandiyan@freddiemac.com wrote: > > The following command works fine or the directory from where the SQR > program runs - '/shared/main/prog/sqr'. This command does not look for the > file in a different directory, i.e the data file resides in the data > directory - ' /shared/main/files/data/'. This is true if the command is > used with or without the predefined prefix variable. > > Example, I copied the data file from the above data directory to the SQR > directory and ran the program.The latest SAMPLE.DAT file name was written > into the filename defined in the '$file_list' variable. > > I did the cd command, $SqrDirectory = '/shared/main/prog/sqr' > $DataDirectory = '/shared/main/files/data/' > > $CMD = 'cd' || $DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > > I get the error - SAMPLE.DAT: No such file or directory > > But the above command works fine if I copy the SAMPLE.DAT file into the SQR > directory and use the following code, > > $cmd = 'ls -lt SAMPLE.DAT >' || ' ' || $file_list > call system using $syscmd #unix_status > > Could you help me how to use the 'cd' command with 'ls' command or how to > make the program to look for the data file in the data directory...? > > Thanks, > Yamuna > > > "Dattatraya > Shetty" > oo.com> "This list is for discussion about > the SQR database reporting language > Sent by : from Hyperion Solutions." > sqr-users-bounces+yamuna_pan > diyan=freddiemac.com@sqrug.o cc > rg > Subject > Re: [sqr-users] Call SYSTEM > 03/31/2005 01:25 command in SQR > PM > > > Please respond to > "This list is > for discussion > about the SQR > database > reporting > language from > Hyperion > Solutions." > .org> > > > > This fix is simple change the command to below > let $syscmd = 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status != 0 > stop quiet > end-if > > No need to Add the fileprefix to ls command. Its a Unix command and if > you add fileprefix to it the OS will try and execute the ls command > from the path in fileprefix which is wrong because the ls command is > not stored there. its some where in /usr/bin: > if you need to give the path then log into unix and issue the following > command > > $> whence ls > see the path displayed and use that. > > HTH > Datta. > > --- yamuna_pandiyan@freddiemac.com wrote: > > > > > Hi Datta, > > > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > > The > > data file is created in the ' /shared/main/files/data/' directory. > > The > There > > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > > with all > > other programs. > > > > But I am not able to debug, since I have limited knowledge on the > > Call > > System commands. When the below program is executed, the > > Latestfile.dat is > > created in the directory ' /shared/main/files/data/'. > > > > The error that is generated when executing the program is 'sh: > > /shared/main/files/data/ls : not found' if I use the below command. > > if I remove the {FILEPREFIX} from the command line, the following > > error is > > generated - '/shared/main/files/data/ : cannot execute' > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > > > "Dattatraya > > > > Shetty" > > > > > To > > oo.com> "This list is for discussion > > about > > the SQR database reporting > > language > > Sent by : from Hyperion Solutions." > > > > sqr-users-bounces+yamuna_pan > > > > diyan=freddiemac.com@sqrug.o > > cc > > rg > > > > > > Subject > > Re: [sqr-users] Call SYSTEM > > > > 03/30/2005 04:14 command in SQR > > > > PM > > > > > > > > > > > > Please respond to > > > > "This list is > > > > for discussion > > > > about the SQR > > > > database > > > > reporting > > > > language from > > > > Hyperion > > > > Solutions." > > > > > > > .org> > > > > > > > > > > > > > > > > > > > > Hi Yamuna, > > The Second part of the Problem is that FILEPREFIX may be an > > environment > > variable not defined? > > > > In the fist part the $ is missing for an environment variable. > > > > It would help if you let us know what is the excat command you are > > typing > > in at the command > > prompt. > > > > e.g > > > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > > is this what you are typing ? > > > > The fact that you are getting a file called Latestfile.dat tells me > > that > > the FILEPREFIX is not defined or you are not keying it correctly what > > is it > > ? > > > > HTH > > Datta. > > > > > > > > yamuna_pandiyan@freddiemac.com wrote: > > I am using a program which needs to compare the current data with the > > previous data file. the data files are created with date and time > > stamp. > > This program runs once a week, and has to compare the previous weeks > > data > > file to monitor the data changes. > > > > I am using the following command on the Unix box to sort the most > > recent > > file > > > > let $file_list = '{FILEPREFIX}Latestfile.dat' > > > > let $syscmd = '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > > call system using $syscmd #unix_status > > if #unix_status != 0 > > stop quiet > > end-if > > > > The Latestfile.dat file is created in the data directory mentioned > > under > > {FILEPREFIX}. But the file is empty. I would like to send the result > > of the > > command > > ls -lts SAMPLE.DAT* to the above file. > > when I execute the above program in the unix server , I ge the > > following > > error - {FILEPREFIX} : cannot execute, but a blank file in the name > > of > > Latestfile.dat is created. > > > > any help in greatly appreciated. > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Sports - Sign up for Fantasy Baseball. > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! Personals - Better first dates. More second dates. > http://personals.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 13:13:08 2005 Subject: Re: [sqr-users] Call SYSTEM command in SQR From: yamuna_pandiyan@freddiemac.com Date: Mon, 4 Apr 2005 14:12:32 -0400 Yes there is a space in the cmd line , that was a typo in the below email, it should be - $CMD = 'cd' || ' ' || $DataDirectory Thanks, Yamuna 918-5127 "Prasanna Menta" To Sent by : "This list is for discussion about sqr-users-bounces+yamuna_pan the SQR database reporting language diyan=freddiemac.com@sqrug.o from Hyperion Solutions." rg cc 04/04/2005 02:06 Subject PM Re: [sqr-users] Call SYSTEM command in SQR Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." You have to know the structure of your unix file directory - Also you need a space between cd and $datadirectory $CMD = 'cd' || ' '|| $DataDirectory yamuna_pandiyan@freddiemac.com wrote: > > The following command works fine or the directory from where the SQR > program runs - '/shared/main/prog/sqr'. This command does not look for the > file in a different directory, i.e the data file resides in the data > directory - ' /shared/main/files/data/'. This is true if the command is > used with or without the predefined prefix variable. > > Example, I copied the data file from the above data directory to the SQR > directory and ran the program.The latest SAMPLE.DAT file name was written > into the filename defined in the '$file_list' variable. > > I did the cd command, $SqrDirectory = '/shared/main/prog/sqr' > $DataDirectory = '/shared/main/files/data/' > > $CMD = 'cd' ||$DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > > I get the error - SAMPLE.DAT: No such file or directory > > But the above command works fine if I copy the SAMPLE.DAT file into the SQR > directory and use the following code, > > $cmd = 'ls -lt SAMPLE.DAT >' || ' ' || $file_list > call system using $syscmd #unix_status > > Could you help me how to use the 'cd' command with 'ls' command or how to > make the program to look for the data file in the data directory...? > > Thanks, > Yamuna > > > "Dattatraya > Shetty" > oo.com> "This list is for discussion about > the SQR database reporting language > Sent by : from Hyperion Solutions." > sqr-users-bounces+yamuna_pan > diyan=freddiemac.com@sqrug.o cc > rg > Subject > Re: [sqr-users] Call SYSTEM > 03/31/2005 01:25 command in SQR > PM > > > Please respond to > "This list is > for discussion > about the SQR > database > reporting > language from > Hyperion > Solutions." > .org> > > > > This fix is simple change the command to below > let $syscmd = 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status != 0 > stop quiet > end-if > > No need to Add the fileprefix to ls command. Its a Unix command and if > you add fileprefix to it the OS will try and execute the ls command > from the path in fileprefix which is wrong because the ls command is > not stored there. its some where in /usr/bin: > if you need to give the path then log into unix and issue the following > command > > $> whence ls > see the path displayed and use that. > > HTH > Datta. > > --- yamuna_pandiyan@freddiemac.com wrote: > > > > > Hi Datta, > > > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > > The > > data file is created in the ' /shared/main/files/data/' directory. > > The > There > > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > > with all > > other programs. > > > > But I am not able to debug, since I have limited knowledge on the > > Call > > System commands. When the below program is executed, the > > Latestfile.dat is > > created in the directory ' /shared/main/files/data/'. > > > > The error that is generated when executing the program is 'sh: > > /shared/main/files/data/ls : not found' if I use the below command. > > if I remove the {FILEPREFIX} from the command line, the following > > error is > > generated - '/shared/main/files/data/ : cannot execute' > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > > > "Dattatraya > > > > Shetty" > > > > > To > > oo.com> "This list is for discussion > > about > > the SQR database reporting > > language > > Sent by : from Hyperion Solutions." > > > > sqr-users-bounces+yamuna_pan > > > > diyan=freddiemac.com@sqrug.o > > cc > > rg > > > > > > Subject > > Re: [sqr-users] Call SYSTEM > > > > 03/30/2005 04:14 command in SQR > > > > PM > > > > > > > > > > > > Please respond to > > > > "This list is > > > > for discussion > > > > about the SQR > > > > database > > > > reporting > > > > language from > > > > Hyperion > > > > Solutions." > > > > > > > .org> > > > > > > > > > > > > > > > > > > > > Hi Yamuna, > > The Second part of the Problem is that FILEPREFIX may be an > > environment > > variable not defined? > > > > In the fist part the $ is missing for an environment variable. > > > > It would help if you let us know what is the excat command you are > > typing > > in at the command > > prompt. > > > > e.g > > > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > > is this what you are typing ? > > > > The fact that you are getting a file called Latestfile.dat tells me > > that > > the FILEPREFIX is not defined or you are not keying it correctly what > > is it > > ? > > > > HTH > > Datta. > > > > > > > > yamuna_pandiyan@freddiemac.com wrote: > > I am using a program which needs to compare the current data with the > > previous data file. the data files are created with date and time > > stamp. > > This program runs once a week, and has to compare the previous weeks > > data > > file to monitor the data changes. > > > > I am using the following command on the Unix box to sort the most > > recent > > file > > > > let $file_list = '{FILEPREFIX}Latestfile.dat' > > > > let $syscmd = '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > > call system using $syscmd #unix_status > > if #unix_status != 0 > > stop quiet > > end-if > > > > The Latestfile.dat file is created in the data directory mentioned > > under > > {FILEPREFIX}. But the file is empty. I would like to send the result > > of the > > command > > ls -lts SAMPLE.DAT* to the above file. > > when I execute the above program in the unix server , I ge the > > following > > error - {FILEPREFIX} : cannot execute, but a blank file in the name > > of > > Latestfile.dat is created. > > > > any help in greatly appreciated. > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Sports - Sign up for Fantasy Baseball. > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! Personals - Better first dates. More second dates. > http://personals.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 13:56:05 2005 Subject: RE: [sqr-users] Call SYSTEM command in SQR Date: Mon, 4 Apr 2005 14:54:51 -0400 From: "Beller, Jay" Do you have WRITE access to $DataDirectory? Try a command like "touch anyfile" in $DataDirectory and see if you get per= mission error. -----Original Message----- From: sqr-users-bounces+jbeller=3Dlbisoftware.com@sqrug.org [mailto:sqr-users-bounces+jbeller=3Dlbisoftware.com@sqrug.org]On Behalf Of yamuna_pandiyan@freddiemac.com Sent: Monday, April 04, 2005 2:13 PM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Call SYSTEM command in SQR Yes there is a space in the cmd line , that was a typo in the below email, it should be - $CMD =3D 'cd' || ' ' || $DataDirectory Thanks, Yamuna 918-5127 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 "Prasanna Menta"=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 To= =20 Sent by : "This list is for discussion about= =20=20 sqr-users-bounces+yamuna_pan the SQR database reporting language= =20 diyan=3Dfreddiemac.com@sqrug.o from Hyperion Solutions."=20=20=20= =20=20=20=20=20=20=20=20 rg =20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 cc= =20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 04/04/2005 02:06 Subject= =20 PM Re: [sqr-users] Call SYSTEM=20=20=20= =20=20=20=20=20=20 command in SQR=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Please respond to=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 "This list is=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 for discussion=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 about the SQR=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 database=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 reporting=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 language from=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 Hyperion=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 Solutions."=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 You have to know the structure of your unix file directory - Also you need a space between cd and $datadirectory $CMD =3D 'cd' || ' '|| $DataDirectory yamuna_pandiyan@freddiemac.com wrote: > > The following command works fine or the directory from where the SQR > program runs - '/shared/main/prog/sqr'. This command does not look for the > file in a different directory, i.e the data file resides in the data > directory - ' /shared/main/files/data/'. This is true if the command is > used with or without the predefined prefix variable. > > Example, I copied the data file from the above data directory to the SQR > directory and ran the program.The latest SAMPLE.DAT file name was written > into the filename defined in the '$file_list' variable. > > I did the cd command, $SqrDirectory =3D '/shared/main/prog/sqr' > $DataDirectory =3D '/shared/main/files/data/' > > $CMD =3D 'cd' ||$DataDirectory > $cmd =3D 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > > I get the error - SAMPLE.DAT: No such file or directory > > But the above command works fine if I copy the SAMPLE.DAT file into the SQR > directory and use the following code, > > $cmd =3D 'ls -lt SAMPLE.DAT >' || ' ' || $file_list > call system using $syscmd #unix_status > > Could you help me how to use the 'cd' command with 'ls' command or how to > make the program to look for the data file in the data directory...? > > Thanks, > Yamuna > > > "Dattatraya > Shetty" > oo.com> "This list is for discussion about > the SQR database reporting language > Sent by : from Hyperion Solutions." > sqr-users-bounces+yamuna_pan > diyan=3Dfreddiemac.com@sqrug.o cc > rg > Subject > Re: [sqr-users] Call SYSTEM > 03/31/2005 01:25 command in SQR > PM > > > Please respond to > "This list is > for discussion > about the SQR > database > reporting > language from > Hyperion > Solutions." > .org> > > > > This fix is simple change the command to below > let $syscmd =3D 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status !=3D 0 > stop quiet > end-if > > No need to Add the fileprefix to ls command. Its a Unix command and if > you add fileprefix to it the OS will try and execute the ls command > from the path in fileprefix which is wrong because the ls command is > not stored there. its some where in /usr/bin: > if you need to give the path then log into unix and issue the following > command > > $> whence ls > see the path displayed and use that. > > HTH > Datta. > > --- yamuna_pandiyan@freddiemac.com wrote: > > > > > Hi Datta, > > > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > > The > > data file is created in the ' /shared/main/files/data/' directory. > > The > There > > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > > with all > > other programs. > > > > But I am not able to debug, since I have limited knowledge on the > > Call > > System commands. When the below program is executed, the > > Latestfile.dat is > > created in the directory ' /shared/main/files/data/'. > > > > The error that is generated when executing the program is 'sh: > > /shared/main/files/data/ls : not found' if I use the below command. > > if I remove the {FILEPREFIX} from the command line, the following > > error is > > generated - '/shared/main/files/data/ : cannot execute' > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > > > "Dattatraya > > > > Shetty" > > > > > To > > oo.com> "This list is for discussion > > about > > the SQR database reporting > > language > > Sent by : from Hyperion Solutions." > > > > sqr-users-bounces+yamuna_pan > > > > diyan=3Dfreddiemac.com@sqrug.o > > cc > > rg > > > > > > Subject > > Re: [sqr-users] Call SYSTEM > > > > 03/30/2005 04:14 command in SQR > > > > PM > > > > > > > > > > > > Please respond to > > > > "This list is > > > > for discussion > > > > about the SQR > > > > database > > > > reporting > > > > language from > > > > Hyperion > > > > Solutions." > > > > > > > .org> > > > > > > > > > > > > > > > > > > > > Hi Yamuna, > > The Second part of the Problem is that FILEPREFIX may be an > > environment > > variable not defined? > > > > In the fist part the $ is missing for an environment variable. > > > > It would help if you let us know what is the excat command you are > > typing > > in at the command > > prompt. > > > > e.g > > > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > > is this what you are typing ? > > > > The fact that you are getting a file called Latestfile.dat tells me > > that > > the FILEPREFIX is not defined or you are not keying it correctly what > > is it > > ? > > > > HTH > > Datta. > > > > > > > > yamuna_pandiyan@freddiemac.com wrote: > > I am using a program which needs to compare the current data with the > > previous data file. the data files are created with date and time > > stamp. > > This program runs once a week, and has to compare the previous weeks > > data > > file to monitor the data changes. > > > > I am using the following command on the Unix box to sort the most > > recent > > file > > > > let $file_list =3D '{FILEPREFIX}Latestfile.dat' > > > > let $syscmd =3D '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > > call system using $syscmd #unix_status > > if #unix_status !=3D 0 > > stop quiet > > end-if > > > > The Latestfile.dat file is created in the data directory mentioned > > under > > {FILEPREFIX}. But the file is empty. I would like to send the result > > of the > > command > > ls -lts SAMPLE.DAT* to the above file. > > when I execute the above program in the unix server , I ge the > > following > > error - {FILEPREFIX} : cannot execute, but a blank file in the name > > of > > Latestfile.dat is created. > > > > any help in greatly appreciated. > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Sports - Sign up for Fantasy Baseball. > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! Personals - Better first dates. More second dates. > http://personals.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 14:09:11 2005 Date: Mon, 04 Apr 2005 15:07:46 -0400 From: "Jamie Harris" Subject: Re: [sqr-users] Call SYSTEM command in SQR Hello, > $CMD = 'cd' ||$DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > It looks to me like the above would not even try to execute the 'cd' command, since there is no 'call system' between the first and second lines (which each assign $CMD to something). SQR variable names are not case-sensitive. I also see that in the call system command, it's using $syscmd - I don't know where that gets set, but it's not going to contain the cd or ls commands above. If 'cd' won't work in the program, you could try this: let $cmd = 'ls -lt ' $DataDirectory || '/SAMPLE.DAT >' || $DataDirectory || > $file_list call system using $cmd #unix_status There's no need to actually move to $DataDirectory if all you need is a listing of the sample.dat files within. Hope this helps! ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> yamuna_pandiyan@freddiemac.com 4/4/2005 2:12:32 PM >>> Yes there is a space in the cmd line , that was a typo in the below email, it should be - $CMD = 'cd' || ' ' || $DataDirectory Thanks, Yamuna 918-5127 "Prasanna Menta" To Sent by : "This list is for discussion about sqr-users-bounces+yamuna_pan the SQR database reporting language diyan=freddiemac.com@sqrug.o from Hyperion Solutions." rg cc 04/04/2005 02:06 Subject PM Re: [sqr-users] Call SYSTEM command in SQR Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." You have to know the structure of your unix file directory - Also you need a space between cd and $datadirectory $CMD = 'cd' || ' '|| $DataDirectory yamuna_pandiyan@freddiemac.com wrote: > > The following command works fine or the directory from where the SQR > program runs - '/shared/main/prog/sqr'. This command does not look for the > file in a different directory, i.e the data file resides in the data > directory - ' /shared/main/files/data/'. This is true if the command is > used with or without the predefined prefix variable. > > Example, I copied the data file from the above data directory to the SQR > directory and ran the program.The latest SAMPLE.DAT file name was written > into the filename defined in the '$file_list' variable. > > I did the cd command, $SqrDirectory = '/shared/main/prog/sqr' > $DataDirectory = '/shared/main/files/data/' > > $CMD = 'cd' ||$DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > > I get the error - SAMPLE.DAT: No such file or directory > > But the above command works fine if I copy the SAMPLE.DAT file into the SQR > directory and use the following code, > > $cmd = 'ls -lt SAMPLE.DAT >' || ' ' || $file_list > call system using $syscmd #unix_status > > Could you help me how to use the 'cd' command with 'ls' command or how to > make the program to look for the data file in the data directory...? > > Thanks, > Yamuna > > > "Dattatraya > Shetty" > oo.com> "This list is for discussion about > the SQR database reporting language > Sent by : from Hyperion Solutions." > sqr-users-bounces+yamuna_pan > diyan=freddiemac.com@sqrug.o cc > rg > Subject > Re: [sqr-users] Call SYSTEM > 03/31/2005 01:25 command in SQR > PM > > > Please respond to > "This list is > for discussion > about the SQR > database > reporting > language from > Hyperion > Solutions." > .org> > > > > This fix is simple change the command to below > let $syscmd = 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status != 0 > stop quiet > end-if > > No need to Add the fileprefix to ls command. Its a Unix command and if > you add fileprefix to it the OS will try and execute the ls command > from the path in fileprefix which is wrong because the ls command is > not stored there. its some where in /usr/bin: > if you need to give the path then log into unix and issue the following > command > > $> whence ls > see the path displayed and use that. > > HTH > Datta. > > --- yamuna_pandiyan@freddiemac.com wrote: > > > > > Hi Datta, > > > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > > The > > data file is created in the ' /shared/main/files/data/' directory. > > The > There > > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > > with all > > other programs. > > > > But I am not able to debug, since I have limited knowledge on the > > Call > > System commands. When the below program is executed, the > > Latestfile.dat is > > created in the directory ' /shared/main/files/data/'. > > > > The error that is generated when executing the program is 'sh: > > /shared/main/files/data/ls : not found' if I use the below command. > > if I remove the {FILEPREFIX} from the command line, the following > > error is > > generated - '/shared/main/files/data/ : cannot execute' > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > > > "Dattatraya > > > > Shetty" > > > > > To > > oo.com> "This list is for discussion > > about > > the SQR database reporting > > language > > Sent by : from Hyperion Solutions." > > > > sqr-users-bounces+yamuna_pan > > > > diyan=freddiemac.com@sqrug.o > > cc > > rg > > > > > > Subject > > Re: [sqr-users] Call SYSTEM > > > > 03/30/2005 04:14 command in SQR > > > > PM > > > > > > > > > > > > Please respond to > > > > "This list is > > > > for discussion > > > > about the SQR > > > > database > > > > reporting > > > > language from > > > > Hyperion > > > > Solutions." > > > > > > > .org> > > > > > > > > > > > > > > > > > > > > Hi Yamuna, > > The Second part of the Problem is that FILEPREFIX may be an > > environment > > variable not defined? > > > > In the fist part the $ is missing for an environment variable. > > > > It would help if you let us know what is the excat command you are > > typing > > in at the command > > prompt. > > > > e.g > > > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > > is this what you are typing ? > > > > The fact that you are getting a file called Latestfile.dat tells me > > that > > the FILEPREFIX is not defined or you are not keying it correctly what > > is it > > ? > > > > HTH > > Datta. > > > > > > > > yamuna_pandiyan@freddiemac.com wrote: > > I am using a program which needs to compare the current data with the > > previous data file. the data files are created with date and time > > stamp. > > This program runs once a week, and has to compare the previous weeks > > data > > file to monitor the data changes. > > > > I am using the following command on the Unix box to sort the most > > recent > > file > > > > let $file_list = '{FILEPREFIX}Latestfile.dat' > > > > let $syscmd = '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > > call system using $syscmd #unix_status > > if #unix_status != 0 > > stop quiet > > end-if > > > > The Latestfile.dat file is created in the data directory mentioned > > under > > {FILEPREFIX}. But the file is empty. I would like to send the result > > of the > > command > > ls -lts SAMPLE.DAT* to the above file. > > when I execute the above program in the unix server , I ge the > > following > > error - {FILEPREFIX} : cannot execute, but a blank file in the name > > of > > Latestfile.dat is created. > > > > any help in greatly appreciated. > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Sports - Sign up for Fantasy Baseball. > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! Personals - Better first dates. More second dates. > http://personals.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 14:16:44 2005 Subject: Re: [sqr-users] Call SYSTEM command in SQR From: yamuna_pandiyan@freddiemac.com Date: Mon, 4 Apr 2005 15:16:01 -0400 Thanks Jamie, It works. Yamuna 918-5127 "Jamie Harris" To sqr-users@sqrug.org Sent by : cc sqr-users-bounces+yamuna_pan diyan=freddiemac.com@sqrug.o Subject rg Re: [sqr-users] Call SYSTEM command in SQR 04/04/2005 03:07 PM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Hello, > $CMD = 'cd' ||$DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > It looks to me like the above would not even try to execute the 'cd' command, since there is no 'call system' between the first and second lines (which each assign $CMD to something). SQR variable names are not case-sensitive. I also see that in the call system command, it's using $syscmd - I don't know where that gets set, but it's not going to contain the cd or ls commands above. If 'cd' won't work in the program, you could try this: let $cmd = 'ls -lt ' $DataDirectory || '/SAMPLE.DAT >' || $DataDirectory || > $file_list call system using $cmd #unix_status There's no need to actually move to $DataDirectory if all you need is a listing of the sample.dat files within. Hope this helps! ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> yamuna_pandiyan@freddiemac.com 4/4/2005 2:12:32 PM >>> Yes there is a space in the cmd line , that was a typo in the below email, it should be - $CMD = 'cd' || ' ' || $DataDirectory Thanks, Yamuna 918-5127 "Prasanna Menta" To Sent by : "This list is for discussion about sqr-users-bounces+yamuna_pan the SQR database reporting language diyan=freddiemac.com@sqrug.o from Hyperion Solutions." rg cc 04/04/2005 02:06 Subject PM Re: [sqr-users] Call SYSTEM command in SQR Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." You have to know the structure of your unix file directory - Also you need a space between cd and $datadirectory $CMD = 'cd' || ' '|| $DataDirectory yamuna_pandiyan@freddiemac.com wrote: > > The following command works fine or the directory from where the SQR > program runs - '/shared/main/prog/sqr'. This command does not look for the > file in a different directory, i.e the data file resides in the data > directory - ' /shared/main/files/data/'. This is true if the command is > used with or without the predefined prefix variable. > > Example, I copied the data file from the above data directory to the SQR > directory and ran the program.The latest SAMPLE.DAT file name was written > into the filename defined in the '$file_list' variable. > > I did the cd command, $SqrDirectory = '/shared/main/prog/sqr' > $DataDirectory = '/shared/main/files/data/' > > $CMD = 'cd' ||$DataDirectory > $cmd = 'ls -lt SAMPLE.DAT >' || $DataDirectory || > $file_list > call system using $syscmd #unix_status > > I get the error - SAMPLE.DAT: No such file or directory > > But the above command works fine if I copy the SAMPLE.DAT file into the SQR > directory and use the following code, > > $cmd = 'ls -lt SAMPLE.DAT >' || ' ' || $file_list > call system using $syscmd #unix_status > > Could you help me how to use the 'cd' command with 'ls' command or how to > make the program to look for the data file in the data directory...? > > Thanks, > Yamuna > > > "Dattatraya > Shetty" > oo.com> "This list is for discussion about > the SQR database reporting language > Sent by : from Hyperion Solutions." > sqr-users-bounces+yamuna_pan > diyan=freddiemac.com@sqrug.o cc > rg > Subject > Re: [sqr-users] Call SYSTEM > 03/31/2005 01:25 command in SQR > PM > > > Please respond to > "This list is > for discussion > about the SQR > database > reporting > language from > Hyperion > Solutions." > .org> > > > > This fix is simple change the command to below > let $syscmd = 'ls -lts SAMPLE.DAT >' || $file_list > call system using $syscmd #unix_status > if #unix_status != 0 > stop quiet > end-if > > No need to Add the fileprefix to ls command. Its a Unix command and if > you add fileprefix to it the OS will try and execute the ls command > from the path in fileprefix which is wrong because the ls command is > not stored there. its some where in /usr/bin: > if you need to give the path then log into unix and issue the following > command > > $> whence ls > see the path displayed and use that. > > HTH > Datta. > > --- yamuna_pandiyan@freddiemac.com wrote: > > > > > Hi Datta, > > > > The sqr program resides in the ' /shared/main/prog/sqr' directory. > > The > > data file is created in the ' /shared/main/files/data/' directory. > > The > There > > is nothing wrong in the {FILEPREFIX} variable, since it woks fine > > with all > > other programs. > > > > But I am not able to debug, since I have limited knowledge on the > > Call > > System commands. When the below program is executed, the > > Latestfile.dat is > > created in the directory ' /shared/main/files/data/'. > > > > The error that is generated when executing the program is 'sh: > > /shared/main/files/data/ls : not found' if I use the below command. > > if I remove the {FILEPREFIX} from the command line, the following > > error is > > generated - '/shared/main/files/data/ : cannot execute' > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > > > "Dattatraya > > > > Shetty" > > > > > To > > oo.com> "This list is for discussion > > about > > the SQR database reporting > > language > > Sent by : from Hyperion Solutions." > > > > sqr-users-bounces+yamuna_pan > > > > diyan=freddiemac.com@sqrug.o > > cc > > rg > > > > > > Subject > > Re: [sqr-users] Call SYSTEM > > > > 03/30/2005 04:14 command in SQR > > > > PM > > > > > > > > > > > > Please respond to > > > > "This list is > > > > for discussion > > > > about the SQR > > > > database > > > > reporting > > > > language from > > > > Hyperion > > > > Solutions." > > > > > > > .org> > > > > > > > > > > > > > > > > > > > > Hi Yamuna, > > The Second part of the Problem is that FILEPREFIX may be an > > environment > > variable not defined? > > > > In the fist part the $ is missing for an environment variable. > > > > It would help if you let us know what is the excat command you are > > typing > > in at the command > > prompt. > > > > e.g > > > > $> ls -tls FMUBSOPT.DAT* > ${FILEPREFIX}Latestfile.dat > > is this what you are typing ? > > > > The fact that you are getting a file called Latestfile.dat tells me > > that > > the FILEPREFIX is not defined or you are not keying it correctly what > > is it > > ? > > > > HTH > > Datta. > > > > > > > > yamuna_pandiyan@freddiemac.com wrote: > > I am using a program which needs to compare the current data with the > > previous data file. the data files are created with date and time > > stamp. > > This program runs once a week, and has to compare the previous weeks > > data > > file to monitor the data changes. > > > > I am using the following command on the Unix box to sort the most > > recent > > file > > > > let $file_list = '{FILEPREFIX}Latestfile.dat' > > > > let $syscmd = '{FILEPREFIX}' || 'ls -lts SAMPLE.DAT >' || $file_list > > call system using $syscmd #unix_status > > if #unix_status != 0 > > stop quiet > > end-if > > > > The Latestfile.dat file is created in the data directory mentioned > > under > > {FILEPREFIX}. But the file is empty. I would like to send the result > > of the > > command > > ls -lts SAMPLE.DAT* to the above file. > > when I execute the above program in the unix server , I ge the > > following > > error - {FILEPREFIX} : cannot execute, but a blank file in the name > > of > > Latestfile.dat is created. > > > > any help in greatly appreciated. > > > > Thanks, > > Yamuna > > 918-5127 > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > --------------------------------- > > Do you Yahoo!? > > Yahoo! Sports - Sign up for Fantasy Baseball. > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________ > Do you Yahoo!? > Yahoo! Personals - Better first dates. More second dates. > http://personals.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 04 18:41:20 2005 Date: Mon, 04 Apr 2005 16:40:40 -0700 From: David Donnelly Subject: [sqr-users] Re: Dynamic SQL vs. Fixed SQL execution Olga, After you use the -s SQR flag to check how many times statements are compiled, I would suggest that you hard-code the queries that you think are being constructed in one of your tests that seems to run a long time. In other words, if you think you are constructing let $where = 'where a.b = c.d' and use [$where] as dynamic where-clause, then actually hard-code the same clause and see how that runs. I guess you'll need to do this for all six dynamic queries. You might want to limit the size of the outer query result set (using loops=nnn) to less than "several thousand" while doing this. To be honest, I don't know if the queries are recompiled every time they're executed. The possibilities are (1)yes; (2) no; and (3) only if the contents of the dynamic clause is changed. You could test the latter, and if that turns out to be the case, then don't change the $where variable unless you need to. I have some vague memory of doing this, but I can't remember for sure. And finally, it is possible that the compiler doesn't have enough info to decide about indexes. One thing that is sometimes possible is to include "extra" predicates. For example, if you have a multi-field key, and your dynamic query selects a lower-level part of it, make sure the higher-level fields are all specified. And what about compiler hints -- might they be any help? I have never had to use them. Best of luck Dave _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 04:46:20 2005 Subject: Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution From: Wjatscheslaw KRAVTCHENKO Date: Tue, 5 Apr 2005 11:45:31 +0200 Dear Olga, as I said we had a similar problem with the performance of our reports, we rewrote the warehouse. Now we denormalize the data 4 times a day and serve the reports instantly. No joins, no aggregates, everything is precalculated. I think that by tuning SQL/SQR you'll not be able tosignificantly speed up the performance. At least we made this experience, which forced us to rethink the warehouse structure. Regards, ______________________________________ Wjatscheslaw Kravtchenko (Mr.) ProFi System Manager Assistant ProFi Technical Team Information Technology Service Division for Management United Nations Office on Drugs and Crime Tel: (+43-1) 26060-4153 Websites: www.unov.org, www.unodc.org ______________________________________ Impossible is not a fact, only an opinion Olga.Gal@bbh.com Sent by: sqr-users-bounces To +wjatscheslaw.kra "This list is for discussion about vtchenko=unvienna the SQR database reporting language .org@sqrug.org from Hyperion Solutions." cc Monday, 4 April 2005 18:22 Subject Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Dear Wjatscheslaw, To produce the report we access huge wide tables (millions of rows) that are joined by indexed columns. The queries are carefully tuned and executed fairly quickly outside the SQR. The processing starts with an outer (driving) query, which supposed to be the slowest one. It would return back thousands of rows, and then 90 percent of the selected rows are processed further: for each processed rows the SQR then selects additional information from 6 other queries that are dynamically constructed (dynamic SQL). These queries access the data by Primary Key, and are very fast when executed outside SQR. It takes over an hour to generate a report of about 650 such entities. By monitoring the progression of the report it looks like the driving query (the slowest one) is returning the list of entities fairly quickly, but it still takes too long to finish the report, which brought me to think that the problem is not really in the data access. Wjatscheslaw KRAVTCHENKO Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To "This list is for discussion about the SQR database reporting language from Hyperion Solutions." 04/04/2005 11:50 AM cc Subject Please respond to Re: [sqr-users] Dynamic SQL vs. Fixed SQL execution "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Dear Olga, is the SQR forming the SQL slow or is the response from the database slow? How slow is it? Wha amount of data are we dealing with? We had a similar scenario on Sybase 12.5 transactional data. Do you have any samples of the SQL stmts ? How is the Warehouse structured? Anticipating your reply. ______________________________________ Wjatscheslaw Kravtchenko (Mr.) ProFi System Manager Assistant ProFi Technical Team Information Technology Service Division for Management United Nations Office on Drugs and Crime Tel: (+43-1) 26060-4153 Websites: www.unov.org, www.unodc.org ______________________________________ Impossible is not a fact, only an opinion Olga.Gal@bbh.com Sent by: sqr-users-bounces To +wjatscheslaw.kra sqr-users@sqrug.org vtchenko=unvienna cc .org@sqrug.org Subject [sqr-users] Dynamic SQL vs. Fixed Monday, 4 April SQL execution 2005 17:38 Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." We're using SQR ver 8.1 with Oracle 9i in the datawarehousing environment, which produce reports with huge amount of data and run VERY slow. Our SQR programs construct the Where clause and Order By clause dynamically, based on user's selection, and execute the same Select statement many times within the same job. This makes me think that the slow performance is possibly caused in part by repeating parsing of these dynamically constructed Select statements. Before taking a dramatic decision of changing the reports to have only fixed Select statements with bind variables ONLY in the Where clause, I would like to get assured that this approach will in fact eliminate unnecessary parsing (compilation) of SQL statements. My question is: Is the SQR compiling each SQL statement before executing it, or would it do it only for a newly executed SQL. In other words, if my program will repeatedly call a routine that executes a fixed SQL statement, will this statement get parsed every time it's being executed, or only the first time. Also, are there any other ways to speed up that time of processing? Any advice is greatly appreciated. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 10:35:03 2005 Date: Tue, 05 Apr 2005 11:34:23 -0400 From: Gina Bencke Subject: [sqr-users] Performance Issue with Oracle9i Good Morning, =A0 We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.=A0 We have a program that ran i= n < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.=A0 = We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.=A0 When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.=A0 =A0(Obviously changing the bind variable to a hard coded val= ue is not a work around, but simply a step in trying to understand the problem.) =A0 I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion. =A0 I have provided the code for the procedure whose performance is unacceptable below.=A0 However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.=A0 Also executing the join from SQL*Plus does not result in a performance issue.=A0=20 =A0 Has anyone else experienced a similar issue?=A0 Is there a environment parameter that may need to be set? =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 !*************************************************************************** *********** begin-procedure Get-Skip-Students=20 !*************************************************************************** *********** =A0 =A0=A0 let $Skip_Student =3D 'Y' =A0 begin-SELECT loops=3D1 JB.JOBCODE JC.JOB_FUNCTION =A0 =A0=A0 evaluate &JC.JOB_FUNCTION =A0=A0=A0=A0 when =3D 'STW' =A0=A0=A0=A0 when =3D 'GTA' =A0=A0=A0=A0 when =3D 'NTG' =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'Y'=A0=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0=A0 when-other=20 =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'N'=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0 end-evaluate =A0=A0=20 =A0 FROM=A0 PS_JOB JB, =A0=A0=A0=A0=A0 PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D $Old_Emplid =A0 AND JB.EMPL_RCD =3D 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB2.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EFFDT = <=3D $Quarter_End_Dt) =A0 AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB3.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EFFDT = =3D JB.EFFDT) =A0 AND JB.JOBCODE =3D JC.JOBCODE =A0 and JC.EFFDT=A0=A0 =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JC1.Jobcode= =3D JC.jobcode =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.effdt <= =3D JB.effdt =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.eff_Statu= s =3D 'A') end-SELECT =A0 end-procedure =A0 =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 10:55:26 2005 From: "Lynds,Rick" Subject: RE: [sqr-users] Performance Issue with Oracle9i Date: Tue, 5 Apr 2005 08:54:16 -0700 I noticed that you are not using SETID on the JOBCODE_TBL. That is the primary key field. Could it be that some quirk is causing the code to perform a table scan where it had not done so before? You can modify your join (and subquery) to join on JC.SETID =3D JB.SETID_JOBCODE HTH Rick=20 -----Original Message----- From: sqr-users-bounces+rlynds=3Dmwdh2o.com@sqrug.org [mailto:sqr-users-bounces+rlynds=3Dmwdh2o.com@sqrug.org] On Behalf Of Gina Bencke Sent: Tuesday, April 05, 2005 8:34 AM To: sqr-users@sqrug.org Subject: [sqr-users] Performance Issue with Oracle9i Good Morning, =A0 We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.=A0 We have a program that ran i= n < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.=A0 = We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.=A0 When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.=A0 =A0(Obviously changing the bind variable to a hard coded val= ue is not a work around, but simply a step in trying to understand the problem.) =A0 I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion. =A0 I have provided the code for the procedure whose performance is unacceptable below.=A0 However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.=A0 Also executing the join from SQL*Plus does not result in a performance issue.=A0=20 =A0 Has anyone else experienced a similar issue?=A0 Is there a environment parameter that may need to be set? =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 !*************************************************************************** *********** begin-procedure Get-Skip-Students !*************************************************************************** *********** =A0 =A0=A0 let $Skip_Student =3D 'Y' =A0 begin-SELECT loops=3D1 JB.JOBCODE JC.JOB_FUNCTION =A0 =A0=A0 evaluate &JC.JOB_FUNCTION =A0=A0=A0=A0 when =3D 'STW' =A0=A0=A0=A0 when =3D 'GTA' =A0=A0=A0=A0 when =3D 'NTG' =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'Y' =A0=A0=A0=A0=A0=A0 break =A0=A0=A0=A0 when-other =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'N'=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0 end-evaluate =A0=A0=20 =A0 FROM=A0 PS_JOB JB, =A0=A0=A0=A0=A0 PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D $Old_Emplid =A0 AND JB.EMPL_RCD =3D 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB2.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EFFDT = <=3D $Quarter_End_Dt) =A0 AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB3.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EFFDT = =3D JB.EFFDT) =A0 AND JB.JOBCODE =3D JC.JOBCODE =A0 and JC.EFFDT=A0=A0 =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JC1.Jobcode= =3D JC.jobcode =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.effdt <= =3D JB.effdt =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.eff_Statu= s =3D 'A') end-SELECT =A0 end-procedure =A0 =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 13:15:24 2005 Date: Tue, 05 Apr 2005 14:14:47 -0400 From: Gina Bencke Subject: RE: [sqr-users] Performance Issue with Oracle9i Thanks to a suggestion from Rick I modified the SQL to include setid in the where clause. (Btw Rick "AND JC.SETID =3D JB.SETID_JOBCODE" did not help but "AND JC.SETID =3D $SetID" did.) This alone was not enough but placed me on = the path to actually try tuning the SQL. I remember reading a paper on simple tuning techniques which suggests adding all keys in the select list to help Oracle select the most effective select path. Now the SQL runs faster than before. SELECT JB.EMPLID, JB.EMPL_RCD, JB.EFFDT, JB.EFFSEQ, JC.SETID, JC.JOBCODE, JC.EFFDT,=20 JB.JOBCODE, JC.JOB_FUNCTION FROM PS_JOB JB, PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D :1 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 where JB2.EMPLID =3D JB.EMPLID and JB2.EMPL_RCD =3D JB.EMPL_RCD and JB2.EFFDT <=3D to_date('03/31/2005','mm/dd/yyyy')) AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 where JB3.EMPLID =3D JB.EMPLID and JB3.EMPL_RCD =3D JB.EMPL_RCD and JB3.EFFDT =3D JB.EFFDT) AND JB.JOB_INDICATOR =3D 'P' AND JB.JOBCODE =3D JC.JOBCODE=20 AND JC.SETID =3D :2=20 and JC.EFFDT =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 where JC1.Jobcode =3D JC.jobcode and jc1.effdt <=3D JB.effdt and jc1.eff_Status =3D 'A') When I ran the original SQL in SQP*PLUS, I received the same result as I did from the SQR but in less than a second compared to 15 or 20 minutes in SQR. I still do not understand why Oracle would chose a vastly different execution plan in SQL*Plus and SQR. Can anyone shed light on this issue? Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Gi= na Bencke Sent: Tuesday, April 05, 2005 11:34 AM To: sqr-users@sqrug.org Subject: [sqr-users] Performance Issue with Oracle9i Good Morning, =A0 We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.=A0 We have a program that ran i= n < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.=A0 = We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.=A0 When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.=A0 =A0(Obviously changing the bind variable to a hard coded val= ue is not a work around, but simply a step in trying to understand the problem.) =A0 I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion. =A0 I have provided the code for the procedure whose performance is unacceptable below.=A0 However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.=A0 Also executing the join from SQL*Plus does not result in a performance issue.=A0=20 =A0 Has anyone else experienced a similar issue?=A0 Is there a environment parameter that may need to be set? =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 !*************************************************************************** *********** begin-procedure Get-Skip-Students=20 !*************************************************************************** *********** =A0 =A0=A0 let $Skip_Student =3D 'Y' =A0 begin-SELECT loops=3D1 JB.JOBCODE JC.JOB_FUNCTION =A0 =A0=A0 evaluate &JC.JOB_FUNCTION =A0=A0=A0=A0 when =3D 'STW' =A0=A0=A0=A0 when =3D 'GTA' =A0=A0=A0=A0 when =3D 'NTG' =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'Y'=A0=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0=A0 when-other=20 =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'N'=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0 end-evaluate =A0=A0=20 =A0 FROM=A0 PS_JOB JB, =A0=A0=A0=A0=A0 PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D $Old_Emplid =A0 AND JB.EMPL_RCD =3D 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB2.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EFFDT = <=3D $Quarter_End_Dt) =A0 AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB3.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EFFDT = =3D JB.EFFDT) =A0 AND JB.JOBCODE =3D JC.JOBCODE =A0 and JC.EFFDT=A0=A0 =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JC1.Jobcode= =3D JC.jobcode =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.effdt <= =3D JB.effdt =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.eff_Statu= s =3D 'A') end-SELECT =A0 end-procedure =A0 =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 13:27:12 2005 From: Bob Stone Subject: RE: [sqr-users] Performance Issue with Oracle9i Date: Tue, 5 Apr 2005 13:25:59 -0500 I dont know how often this particular SQL is running, but if it's running a lot there's a chance that it's reparsing it each time (which is slow). It might choose the fastest way to actually run the SQL, but if it has to rechoose that same way each time, that slows it down. One idea would be to do something about the date, because an actual string character and the 'to_date' function will most likely not be recognized as a bind variable. Then Oracle doesn't know that it's the exact same SQL line run other times in the program, and it will reparse it. If, earlier in the SQR, you make $quarter_date =3D '03-MAR-2005' (Oracle will recognize 'DD-MON-YYYY' as a d= ate for comparing) and then say AND JB2.EFFDT <=3D $quarter_date, that would be used as a bind variable. just an idea. -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Gina Bencke Sent: Tuesday, April 05, 2005 1:15 PM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Performance Issue with Oracle9i Thanks to a suggestion from Rick I modified the SQL to include setid in the where clause. (Btw Rick "AND JC.SETID =3D JB.SETID_JOBCODE" did not help but "AND JC.SETID =3D $SetID" did.) This alone was not enough but placed me on = the path to actually try tuning the SQL. I remember reading a paper on simple tuning techniques which suggests adding all keys in the select list to help Oracle select the most effective select path. Now the SQL runs faster than before. SELECT JB.EMPLID, JB.EMPL_RCD, JB.EFFDT, JB.EFFSEQ, JC.SETID, JC.JOBCODE, JC.EFFDT,=20 JB.JOBCODE, JC.JOB_FUNCTION FROM PS_JOB JB, PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D :1 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 where JB2.EMPLID =3D JB.EMPLID and JB2.EMPL_RCD =3D JB.EMPL_RCD and JB2.EFFDT <=3D to_date('03/31/2005','mm/dd/yyyy')) AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 where JB3.EMPLID =3D JB.EMPLID and JB3.EMPL_RCD =3D JB.EMPL_RCD and JB3.EFFDT =3D JB.EFFDT) AND JB.JOB_INDICATOR =3D 'P' AND JB.JOBCODE =3D JC.JOBCODE=20 AND JC.SETID =3D :2=20 and JC.EFFDT =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 where JC1.Jobcode =3D JC.jobcode and jc1.effdt <=3D JB.effdt and jc1.eff_Status =3D 'A') When I ran the original SQL in SQP*PLUS, I received the same result as I did from the SQR but in less than a second compared to 15 or 20 minutes in SQR. I still do not understand why Oracle would chose a vastly different execution plan in SQL*Plus and SQR. Can anyone shed light on this issue? Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Gi= na Bencke Sent: Tuesday, April 05, 2005 11:34 AM To: sqr-users@sqrug.org Subject: [sqr-users] Performance Issue with Oracle9i Good Morning, =A0 We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.=A0 We have a program that ran i= n < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.=A0 = We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.=A0 When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.=A0 =A0(Obviously changing the bind variable to a hard coded val= ue is not a work around, but simply a step in trying to understand the problem.) =A0 I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion. =A0 I have provided the code for the procedure whose performance is unacceptable below.=A0 However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.=A0 Also executing the join from SQL*Plus does not result in a performance issue.=A0=20 =A0 Has anyone else experienced a similar issue?=A0 Is there a environment parameter that may need to be set? =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 !*************************************************************************** *********** begin-procedure Get-Skip-Students=20 !*************************************************************************** *********** =A0 =A0=A0 let $Skip_Student =3D 'Y' =A0 begin-SELECT loops=3D1 JB.JOBCODE JC.JOB_FUNCTION =A0 =A0=A0 evaluate &JC.JOB_FUNCTION =A0=A0=A0=A0 when =3D 'STW' =A0=A0=A0=A0 when =3D 'GTA' =A0=A0=A0=A0 when =3D 'NTG' =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'Y'=A0=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0=A0 when-other=20 =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'N'=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0 end-evaluate =A0=A0=20 =A0 FROM=A0 PS_JOB JB, =A0=A0=A0=A0=A0 PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D $Old_Emplid =A0 AND JB.EMPL_RCD =3D 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB2.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EFFDT = <=3D $Quarter_End_Dt) =A0 AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB3.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EFFDT = =3D JB.EFFDT) =A0 AND JB.JOBCODE =3D JC.JOBCODE =A0 and JC.EFFDT=A0=A0 =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JC1.Jobcode= =3D JC.jobcode =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.effdt <= =3D JB.effdt =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.eff_Statu= s =3D 'A') end-SELECT =A0 end-procedure =A0 =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 13:45:57 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] Performance Issue with Oracle9i Date: Tue, 5 Apr 2005 11:43:32 -0700 I have two suggestions about your subquery to the PS_JOBCODE_TBL table that may improve performance and accuracy. First, you probably want the current row as of the $Quarter_End_Dt, not as of the Effdt of the PS_JOB row. Suppose I started a job a year ago and had no other changes in PS_JOB. Then the value of JOB_FUNCTION changed six months ago. Do you want the job function code that was in effect the last time I had a change in PS_JOB, or do you want the code in effect today? Second, you probably want the current row of the PS_JOBCODE_TBL, not the most recent row that was active. Alternately, you could use load-lookup to bring all the PS_JOB values of JOBCODE and all PS_JOBCODE_TBL values of JOB_FUNCTION into memory in one pass. If you can do that for PS_JOBCODE_TBL, you can avoid the join. If you can do that for PS_JOB, you avoid running the same SQL thousands of times. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Tuesday, April 05, 2005 11:26 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Performance Issue with Oracle9i I dont know how often this particular SQL is running, but if it's running a lot there's a chance that it's reparsing it each time (which is slow). It might choose the fastest way to actually run the SQL, but if it has to rechoose that same way each time, that slows it down. One idea would be to do something about the date, because an actual string character and the 'to_date' function will most likely not be recognized as a bind variable. Then Oracle doesn't know that it's the exact same SQL line run other times in the program, and it will reparse it. If, earlier in the SQR, you make $quarter_date = '03-MAR-2005' (Oracle will recognize 'DD-MON-YYYY' as a date for comparing) and then say AND JB2.EFFDT <= $quarter_date, that would be used as a bind variable. just an idea. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Gina Bencke Sent: Tuesday, April 05, 2005 1:15 PM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Performance Issue with Oracle9i Thanks to a suggestion from Rick I modified the SQL to include setid in the where clause. (Btw Rick "AND JC.SETID = JB.SETID_JOBCODE" did not help but "AND JC.SETID = $SetID" did.) This alone was not enough but placed me on the path to actually try tuning the SQL. I remember reading a paper on simple tuning techniques which suggests adding all keys in the select list to help Oracle select the most effective select path. Now the SQL runs faster than before. SELECT JB.EMPLID, JB.EMPL_RCD, JB.EFFDT, JB.EFFSEQ, JC.SETID, JC.JOBCODE, JC.EFFDT, JB.JOBCODE, JC.JOB_FUNCTION FROM PS_JOB JB, PS_JOBCODE_TBL JC WHERE JB.EMPLID = :1 AND JB.EFFDT = (Select MAX(JB2.EFFDT) from PS_JOB JB2 where JB2.EMPLID = JB.EMPLID and JB2.EMPL_RCD = JB.EMPL_RCD and JB2.EFFDT <= to_date('03/31/2005','mm/dd/yyyy')) AND JB.EFFSEQ = (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 where JB3.EMPLID = JB.EMPLID and JB3.EMPL_RCD = JB.EMPL_RCD and JB3.EFFDT = JB.EFFDT) AND JB.JOB_INDICATOR = 'P' AND JB.JOBCODE = JC.JOBCODE AND JC.SETID = :2 and JC.EFFDT = (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 where JC1.Jobcode = JC.jobcode and jc1.effdt <= JB.effdt and jc1.eff_Status = 'A') When I ran the original SQL in SQP*PLUS, I received the same result as I did from the SQR but in less than a second compared to 15 or 20 minutes in SQR. I still do not understand why Oracle would chose a vastly different execution plan in SQL*Plus and SQR. Can anyone shed light on this issue? Gina Bencke 216-875-9630 -----Original Message----- From: sqr-users-bounces+gina.work=bencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=bencke.com@sqrug.org] On Behalf Of Gina Bencke Sent: Tuesday, April 05, 2005 11:34 AM To: sqr-users@sqrug.org Subject: [sqr-users] Performance Issue with Oracle9i Good Morning,   We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.  We have a program that ran in < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.  We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.  When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.   (Obviously changing the bind variable to a hard coded value is not a work around, but simply a step in trying to understand the problem.)   I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion.   I have provided the code for the procedure whose performance is unacceptable below.  However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.  Also executing the join from SQL*Plus does not result in a performance issue.    Has anyone else experienced a similar issue?  Is there a environment parameter that may need to be set?   Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:    (216) 687-9200     !*************************************************************************** *********** begin-procedure Get-Skip-Students !*************************************************************************** ***********      let $Skip_Student = 'Y'   begin-SELECT loops=1 JB.JOBCODE JC.JOB_FUNCTION      evaluate &JC.JOB_FUNCTION      when = 'STW'      when = 'GTA'      when = 'NTG'        let $Skip_Student = 'Y'         break      when-other        let $Skip_Student = 'N'        break     end-evaluate      FROM  PS_JOB JB,       PS_JOBCODE_TBL JC WHERE JB.EMPLID = $Old_Emplid   AND JB.EMPL_RCD = 0                                                          !RK 02/19/2003   AND JB.EFFDT = (Select MAX(JB2.EFFDT) from PS_JOB JB2                    where JB2.EMPLID = JB.EMPLID                      and JB2.EMPL_RCD = JB.EMPL_RCD                            !RK 02/19/2003                      and JB2.EFFDT <= $Quarter_End_Dt)   AND JB.EFFSEQ = (Select MAX(JB3.EFFSEQ) from PS_JOB JB3                    where JB3.EMPLID = JB.EMPLID                      and JB3.EMPL_RCD = JB.EMPL_RCD                            !RK 02/19/2003                      and JB3.EFFDT = JB.EFFDT)   AND JB.JOBCODE = JC.JOBCODE   and JC.EFFDT   = (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1                     where JC1.Jobcode = JC.jobcode                     and jc1.effdt <= JB.effdt                     and jc1.eff_Status = 'A') end-SELECT   end-procedure     Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:    (216) 687-9200     _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 13:49:19 2005 Date: Tue, 05 Apr 2005 14:48:38 -0400 From: Gina Bencke Subject: RE: [sqr-users] Performance Issue with Oracle9i My original SQL does actually use a $quarter_end_date variable, I changed this in my test program simply because my testing showed that using a bind variable for $Emplid instead of a value (e.g. '123121001') resulted in hugely different execution times. I began focusing on the $Emplid and removing all other variables.=20=20 Thanks for reminding me to add back the use of $quarter_end_date!=20 Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, April 05, 2005 2:26 PM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Performance Issue with Oracle9i I dont know how often this particular SQL is running, but if it's running a lot there's a chance that it's reparsing it each time (which is slow). It might choose the fastest way to actually run the SQL, but if it has to rechoose that same way each time, that slows it down. One idea would be to do something about the date, because an actual string character and the 'to_date' function will most likely not be recognized as a bind variable. Then Oracle doesn't know that it's the exact same SQL line run other times in the program, and it will reparse it. If, earlier in the SQR, you make $quarter_date =3D '03-MAR-2005' (Oracle will recognize 'DD-MON-YYYY' as a d= ate for comparing) and then say AND JB2.EFFDT <=3D $quarter_date, that would be used as a bind variable. just an idea. -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Gina Bencke Sent: Tuesday, April 05, 2005 1:15 PM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Performance Issue with Oracle9i Thanks to a suggestion from Rick I modified the SQL to include setid in the where clause. (Btw Rick "AND JC.SETID =3D JB.SETID_JOBCODE" did not help but "AND JC.SETID =3D $SetID" did.) This alone was not enough but placed me on = the path to actually try tuning the SQL. I remember reading a paper on simple tuning techniques which suggests adding all keys in the select list to help Oracle select the most effective select path. Now the SQL runs faster than before. SELECT JB.EMPLID, JB.EMPL_RCD, JB.EFFDT, JB.EFFSEQ, JC.SETID, JC.JOBCODE, JC.EFFDT,=20 JB.JOBCODE, JC.JOB_FUNCTION FROM PS_JOB JB, PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D :1 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 where JB2.EMPLID =3D JB.EMPLID and JB2.EMPL_RCD =3D JB.EMPL_RCD and JB2.EFFDT <=3D to_date('03/31/2005','mm/dd/yyyy')) AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 where JB3.EMPLID =3D JB.EMPLID and JB3.EMPL_RCD =3D JB.EMPL_RCD and JB3.EFFDT =3D JB.EFFDT) AND JB.JOB_INDICATOR =3D 'P' AND JB.JOBCODE =3D JC.JOBCODE=20 AND JC.SETID =3D :2=20 and JC.EFFDT =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 where JC1.Jobcode =3D JC.jobcode and jc1.effdt <=3D JB.effdt and jc1.eff_Status =3D 'A') When I ran the original SQL in SQP*PLUS, I received the same result as I did from the SQR but in less than a second compared to 15 or 20 minutes in SQR. I still do not understand why Oracle would chose a vastly different execution plan in SQL*Plus and SQR. Can anyone shed light on this issue? Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Gi= na Bencke Sent: Tuesday, April 05, 2005 11:34 AM To: sqr-users@sqrug.org Subject: [sqr-users] Performance Issue with Oracle9i Good Morning, =A0 We are experiencing a strange performance issue with an SQR that worked efficiently prior to our Oracle 9i Upgrade.=A0 We have a program that ran i= n < 5 minutes under Oracle 8 which is taking several hours using Oracle 9i.=A0 = We have identified the specific procedure containing a Select Paragraph that runs slow but can not understand why.=A0 When the logic of the program is changed to call this procedure using a hard coded value for one of the bind variables (which happens to be one of the key fields) the performance issue disappears.=A0 =A0(Obviously changing the bind variable to a hard coded val= ue is not a work around, but simply a step in trying to understand the problem.) =A0 I was able to isolate the problem by writing a test program which simply sets the values of the bind variables and then calls this procedure and the poor performance is repeatable when isolated in this fashion. =A0 I have provided the code for the procedure whose performance is unacceptable below.=A0 However I do not think that the problem is in the join itself . Other programs which use the two tables found in the select paragraph are not experiencing poor performance.=A0 Also executing the join from SQL*Plus does not result in a performance issue.=A0=20 =A0 Has anyone else experienced a similar issue?=A0 Is there a environment parameter that may need to be set? =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 !*************************************************************************** *********** begin-procedure Get-Skip-Students=20 !*************************************************************************** *********** =A0 =A0=A0 let $Skip_Student =3D 'Y' =A0 begin-SELECT loops=3D1 JB.JOBCODE JC.JOB_FUNCTION =A0 =A0=A0 evaluate &JC.JOB_FUNCTION =A0=A0=A0=A0 when =3D 'STW' =A0=A0=A0=A0 when =3D 'GTA' =A0=A0=A0=A0 when =3D 'NTG' =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'Y'=A0=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0=A0 when-other=20 =A0=A0=A0=A0=A0=A0 let $Skip_Student =3D 'N'=20 =A0=A0=A0=A0=A0=A0 break =A0=A0=A0 end-evaluate =A0=A0=20 =A0 FROM=A0 PS_JOB JB, =A0=A0=A0=A0=A0 PS_JOBCODE_TBL JC WHERE JB.EMPLID =3D $Old_Emplid =A0 AND JB.EMPL_RCD =3D 0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0 AND JB.EFFDT =3D (Select MAX(JB2.EFFDT) from PS_JOB JB2 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB2.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB2.EFFDT = <=3D $Quarter_End_Dt) =A0 AND JB.EFFSEQ =3D (Select MAX(JB3.EFFSEQ) from PS_JOB JB3 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JB3.EMPLID =3D= JB.EMPLID =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EMPL_R= CD =3D JB.EMPL_RCD=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 !RK 02/19/2003 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and JB3.EFFDT = =3D JB.EFFDT) =A0 AND JB.JOBCODE =3D JC.JOBCODE =A0 and JC.EFFDT=A0=A0 =3D (select max(JC1.EFFDT) from ps_JOBCODE_TBL JC1 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where JC1.Jobcode= =3D JC.jobcode =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.effdt <= =3D JB.effdt =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 and jc1.eff_Statu= s =3D 'A') end-SELECT =A0 end-procedure =A0 =A0 Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax:=A0=A0=A0 (216) 687-9200 =A0 =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 14:16:04 2005 Date: Tue, 05 Apr 2005 15:14:44 -0400 From: "George Jansen" Subject: RE: [sqr-users] Performance Issue with Oracle9i A suggestion to track down the issues between 8i and 9i: dump V$SQL_BIND_DA= TA: drop in a procedure in your select to see what is actually in use. I at= tach a file that can be included, with one procedure to call in your Begin-= Select paragraph, e.g. Begin-Select Z.col L.othercol dump_bind_data('bazball', 1) =46rom baz z, ball b Where .... End-Select ! dump_binds.sqc ! ! a procedure to dump the contents of v$sql_bind_data ! #define first_bind_dump_file_nbr 50000=20 #define max_bind_dumps_per_select 3 ! or however often you care to see i= t. ! ! Never called -- exists to ensure that the metadata array is created. ! Begin-Procedure create_bind_dump_array create-array name=3Dbind_dump_metadata size=3D50 field=3Dfileno:number field=3Drepeats:number field=3Dhas_been_opened:number field=3Dis_closed:number End-Procedure ! ! Called once per select to open the file and initialize array entries. ! Begin-Procedure setup_bind_dump($select_name, #select_nbr) let $file_name =3D '/tmp/' || $select_name || '.txt' let #fileno =3D {first_bind_dump_file_nbr} + #select_nbr open $file_name AS #fileno RECORD=3D1024:VARY FOR-WRITING put #fileno 0 1 INTO bind_dump_metadata(#select_nbr) fileno repeats has_b= een_o pened write #fileno from 'fileno:position:datatype:value' End-Procedure setup_bind_dump ! ! Once per select to close file and record it. ! Begin-Procedure cleanup_bind_dump(#select_nbr) get #fileno from bind_dump_metadata(#select_nbr) fileno close #fileno put 1 into bind_dump_metadata(#select_nbr) is_closed End-Procedure cleanup_bind_dump ! ! Called from dump_bind_data every time we wish to write. ! Begin-Procedure select_and_write_binds(#fileno) Begin-Select cursor_num &a position &b datatype &c value &d string &a &b &c &d by ':' into $pline write #fileno from $pline =46rom v$sql_bind_data Where value IS NOT NULL End-Select End-Procedure ! ! This is the only procedure to be called externally. ! Begin-Procedure dump_bind_data($select_name, #select_nbr) get #has_been_opened from bind_dump_metadata(#select_nbr) fileno if #has_been_opened =3D 0 Do setup_bind_dump($select_name, #select_nbr)=20=20 end-if get #fileno #repeats FROM bind_dump_metadata(#select_nbr) fileno repeats if #repeats < {max_bind_dumps_per_select} Do select_and_write_binds(#fileno) let #repeats =3D #repeats + 1 put #repeats into bind_dump_metadata(#select_nbr) repeats else get #is_closed from bind_dump_metadata(#select_nbr) is_closed if #is_closed =3D 0 Do cleanup_bind_dump(#select_nbr) end-if end-if End-Procedure _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 16:40:17 2005 Date: Tue, 5 Apr 2005 17:39:36 -0400 From: "Debbie Larney" Subject: [sqr-users] Dynamic database links Hello Everyone, I was wondering if it was possible to dynamically define database links in = sqr. I am trying to access a vendor's database via a database link. I know = that the database link is set up properly because if I hardcode the link na= me in my sql statement I am able to run my program to success. The problem = I have is that I want to define this value dynamically based on run control= parameters. I get compile errrors when I try this dynamically because the = database link variable name is not determined until after the program compi= les. I presume I could define the tables in the database that I am executing my = program from but I really don't want to have to do that. Anyone have any gr= eat ideas. Snippets of my code and the errors from the log file are listed below. Than= ks in advance for any assistance --Definition of the database link if $kronos_db =3D 'KPRD' let $dblink =3D {dblink_kprd}--This is defined gloablly else if $kronos_db =3D 'KTST' let $dblink =3D {dblink_ktst}--This is defined gloablly else if $kronos_db =3D 'KDEV' let $dblink =3D {dblink_kdev}--This is defined gloablly else if $kronos_db =3D 'KSYS' let $dblink =3D {dblink_ksys}--This is defined gloablly =20 end-if end-if end-if end-if=20 --One of the procedures with a compile error !--------------------------------------------------------------------------= ---! ! Procedure : Check-New-BU ! Called From: Get-RC-Params ! Description: Checks to see if payrules already exist for the selected=20 ! clone to bu !--------------------------------------------------------------------------= ---! begin-procedure Check-New-BU move 'Check-New-BU' to $operation_name #ifdef debugf show 'Procedure: ' $operation_name #end-if let $found_new_bu =3D 'N' begin-select loops=3D1 a.name=20=20 Let $found_new_bu =3D 'Y' show 'Error: new BU payrules already exist =3D ' $new_bu from payruleids [$dblink] a=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 where substr(a.name,1,5) =3D $new_bu=20 End-Select end-procedure Check-New-BU error below notice that the dblink is not defined at compile time and not p= art of the sql SQR 5528) ORACLE OCIStmtExecute error 942 in cursor 32:=20 ORA-00942: table or view does not exist=20 SQL: SELECT a.name from payruleids=20 Error on line 260: (SQR 3716) Error in SQL statement.=20 ********************************************************************=20 CONFIDENTIALITY NOTICE:=20 The information contained in this e-mail is legally privileged and confiden= tial information intended only for the use of the individual or entity to w= hom it is addressed. If the reader of this message is not the intended rec= ipient, you are hereby notified that any viewing, dissemination, distributi= on, or copying of this e-mail message is strictly prohibited. If you have = received and/or are viewing this e-mail in error, please immediately notify= the sender by reply e-mail, and delete this e-mail from your system. Thank you.=20 ********************************************************************=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 16:55:39 2005 From: Bob Stone Subject: RE: [sqr-users] Dynamic database links Date: Tue, 5 Apr 2005 16:54:32 -0500 I've got 2 different ideas for you. First, maybe try letting $dblink default to something you know will work before all the if statements (it's def on KDEV so 'let $dblink = 'KDEV' ' and then change it once you know what $kronos_db is). That way it compiles knowing that $dblink will have a value. As is, it looks like all the ifs could fail, and then $dblink has no value/doesn't exist. I'm speaking in terms of possibility...even though you may NEVER have a value other than those 4, there is no 'else !other ' statement that ensures the compiler that $dblink is set in one of those checks. Second, now I've never tried this, but maybe you could make the entire from clause dynamically. That way it will have to parse it at run time instead of compile time? maybe? (i could be wrong on this...dynamic from clauses isn't something I've tried). Just a suggestion...something to try. let $from_clause = 'FROM payruleids ' || $dblink || ' a' begin-select loops=1 a.name Let $found_new_bu = 'Y' [$from_clause] where ... end-select -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Debbie Larney Sent: Tuesday, April 05, 2005 4:40 PM To: sqr-users@sqrug.org Subject: [sqr-users] Dynamic database links Hello Everyone, I was wondering if it was possible to dynamically define database links in sqr. I am trying to access a vendor's database via a database link. I know that the database link is set up properly because if I hardcode the link name in my sql statement I am able to run my program to success. The problem I have is that I want to define this value dynamically based on run control parameters. I get compile errrors when I try this dynamically because the database link variable name is not determined until after the program compiles. I presume I could define the tables in the database that I am executing my program from but I really don't want to have to do that. Anyone have any great ideas. Snippets of my code and the errors from the log file are listed below. Thanks in advance for any assistance --Definition of the database link if $kronos_db = 'KPRD' let $dblink = {dblink_kprd}--This is defined gloablly else if $kronos_db = 'KTST' let $dblink = {dblink_ktst}--This is defined gloablly else if $kronos_db = 'KDEV' let $dblink = {dblink_kdev}--This is defined gloablly else if $kronos_db = 'KSYS' let $dblink = {dblink_ksys}--This is defined gloablly end-if end-if end-if end-if --One of the procedures with a compile error !--------------------------------------------------------------------------- --! ! Procedure : Check-New-BU ! Called From: Get-RC-Params ! Description: Checks to see if payrules already exist for the selected ! clone to bu !--------------------------------------------------------------------------- --! begin-procedure Check-New-BU move 'Check-New-BU' to $operation_name #ifdef debugf show 'Procedure: ' $operation_name #end-if let $found_new_bu = 'N' begin-select loops=1 a.name Let $found_new_bu = 'Y' show 'Error: new BU payrules already exist = ' $new_bu from payruleids [$dblink] a where substr(a.name,1,5) = $new_bu End-Select end-procedure Check-New-BU error below notice that the dblink is not defined at compile time and not part of the sql SQR 5528) ORACLE OCIStmtExecute error 942 in cursor 32: ORA-00942: table or view does not exist SQL: SELECT a.name from payruleids Error on line 260: (SQR 3716) Error in SQL statement. ******************************************************************** CONFIDENTIALITY NOTICE: The information contained in this e-mail is legally privileged and confidential information intended only for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any viewing, dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received and/or are viewing this e-mail in error, please immediately notify the sender by reply e-mail, and delete this e-mail from your system. Thank you. ******************************************************************** _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 17:11:18 2005 From: Gregory Jacobs Date: Tue, 5 Apr 2005 15:10:08 -0700 Subject: [sqr-users] SQR v8.3.2 and Email After reviewing much of the information concerning SQR and email, I realized this issue could/should be re-addressed. We are preparing to implement SQR v8.3.2 as part of the Hyperion Performance Suite. We need to provide the ability to send email out of the SQR application, so here are the questions. 1) Can we use Outlook as the mail client? If so, what else to I nee to do to make this work? 2) What the names of some 'FREE' email clients. We are running on a Windows Server 2003 platform. and have the need to send attachments with the emails. Please feel free to offer your help, opinion, etc. Regards, Greg Jacobs Business Systems Analyst, Sr. BAX Global 440 Exchange Irvine, CA 92602 714-442-7528 "At Your Service" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 05 18:26:48 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] Dynamic database links Date: Tue, 5 Apr 2005 16:25:18 -0700 In Oracle, tables that are accessed via a database link are written in the form "payruleids@kdev". It may be different in other databases, but I suspect you cannot have a space between the table name and the database instance name. Also, the SQR compiler wants to validate your fields, so it needs to know a table with the same layout as your dynamically selected table. You might write the FROM clause as: from [$table_at_db : payruleids@kdev] a That tells SQR to use the copy of payruleids in the kdev database instance to determine whether your fields are valid and what type they are. If you are not always connected to kdev (or any instance that includes payruleids), you can identify the type of each field - but I forget the syntax. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Tuesday, April 05, 2005 2:55 PM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Dynamic database links I've got 2 different ideas for you. First, maybe try letting $dblink default to something you know will work before all the if statements (it's def on KDEV so 'let $dblink = 'KDEV' ' and then change it once you know what $kronos_db is). That way it compiles knowing that $dblink will have a value. As is, it looks like all the ifs could fail, and then $dblink has no value/doesn't exist. I'm speaking in terms of possibility...even though you may NEVER have a value other than those 4, there is no 'else !other ' statement that ensures the compiler that $dblink is set in one of those checks. Second, now I've never tried this, but maybe you could make the entire from clause dynamically. That way it will have to parse it at run time instead of compile time? maybe? (i could be wrong on this...dynamic from clauses isn't something I've tried). Just a suggestion...something to try. let $from_clause = 'FROM payruleids ' || $dblink || ' a' begin-select loops=1 a.name Let $found_new_bu = 'Y' [$from_clause] where ... end-select -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Debbie Larney Sent: Tuesday, April 05, 2005 4:40 PM To: sqr-users@sqrug.org Subject: [sqr-users] Dynamic database links Hello Everyone, I was wondering if it was possible to dynamically define database links in sqr. I am trying to access a vendor's database via a database link. I know that the database link is set up properly because if I hardcode the link name in my sql statement I am able to run my program to success. The problem I have is that I want to define this value dynamically based on run control parameters. I get compile errrors when I try this dynamically because the database link variable name is not determined until after the program compiles. I presume I could define the tables in the database that I am executing my program from but I really don't want to have to do that. Anyone have any great ideas. Snippets of my code and the errors from the log file are listed below. Thanks in advance for any assistance --Definition of the database link if $kronos_db = 'KPRD' let $dblink = {dblink_kprd}--This is defined gloablly else if $kronos_db = 'KTST' let $dblink = {dblink_ktst}--This is defined gloablly else if $kronos_db = 'KDEV' let $dblink = {dblink_kdev}--This is defined gloablly else if $kronos_db = 'KSYS' let $dblink = {dblink_ksys}--This is defined gloablly end-if end-if end-if end-if --One of the procedures with a compile error !--------------------------------------------------------------------------- --! ! Procedure : Check-New-BU ! Called From: Get-RC-Params ! Description: Checks to see if payrules already exist for the selected ! clone to bu !--------------------------------------------------------------------------- --! begin-procedure Check-New-BU move 'Check-New-BU' to $operation_name #ifdef debugf show 'Procedure: ' $operation_name #end-if let $found_new_bu = 'N' begin-select loops=1 a.name Let $found_new_bu = 'Y' show 'Error: new BU payrules already exist = ' $new_bu from payruleids [$dblink] a where substr(a.name,1,5) = $new_bu End-Select end-procedure Check-New-BU error below notice that the dblink is not defined at compile time and not part of the sql SQR 5528) ORACLE OCIStmtExecute error 942 in cursor 32: ORA-00942: table or view does not exist SQL: SELECT a.name from payruleids Error on line 260: (SQR 3716) Error in SQL statement. ******************************************************************** CONFIDENTIALITY NOTICE: The information contained in this e-mail is legally privileged and confidential information intended only for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any viewing, dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received and/or are viewing this e-mail in error, please immediately notify the sender by reply e-mail, and delete this e-mail from your system. Thank you. ******************************************************************** _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 04:14:32 2005 From: "Steve Cavill" Subject: RE: [sqr-users] SQR v8.3.2 and Email Date: Wed, 6 Apr 2005 19:11:33 +1000 Hi Greg, When you say "SQR v8.3.2 as part of the Hyperion Performance Suite" do you mean you have SQR iServer? In which case it may be much easier to use the built in email notification system of HPSu instead of writing your own calls to call email. You need a mail server., not a mail client, like Microsoft Exchange, or an SMTP mail server. Search for SMTP mail server on download.com or similar. Cheers, Steve. -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of Gregory Jacobs Sent: Wednesday, 6 April 2005 8:10 AM To: sqr-users@sqrug.org Subject: [sqr-users] SQR v8.3.2 and Email After reviewing much of the information concerning SQR and email, I realized this issue could/should be re-addressed. We are preparing to implement SQR v8.3.2 as part of the Hyperion Performance Suite. We need to provide the ability to send email out of the SQR application, so here are the questions. 1) Can we use Outlook as the mail client? If so, what else to I nee to do to make this work? 2) What the names of some 'FREE' email clients. We are running on a Windows Server 2003 platform. and have the need to send attachments with the emails. Please feel free to offer your help, opinion, etc. Regards, Greg Jacobs Business Systems Analyst, Sr. BAX Global 440 Exchange Irvine, CA 92602 714-442-7528 "At Your Service" _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 11:07:44 2005 Date: Wed, 6 Apr 2005 09:06:59 -0700 (PDT) From: "fpickava@earthlink.net" Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, > > I am going to a client site that does not have SQRW installed. They develop SQR's in text and submit for execution via native Unix (ugly). How do I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 11:26:41 2005 Date: Wed, 6 Apr 2005 09:25:34 -0700 From: Robert Goshko Subject: Re: [sqr-users] SQRW Question On Apr 6, 2005 9:06 AM, fpickava@earthlink.net wrote: > Is there some way an Array can be sorted? Yes, you can use any type of algorithm, you just have to code it yourself, I have coded a simple bubble sort before, not the best or fastest, but fairly simple to code. You can find various sorting algorithms around the web -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 11:29:42 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] SQRW Question Date: Wed, 6 Apr 2005 09:27:01 -0700 Alas, there is no command in SQR to sort arrays, despite many requests to Brio/Hyperion for that feature. You have to write your own sorting subroutine. There are many ways to do that, and the best approach may depend on the situation. Do you have a specific problem to solve? -----Original Message----- From: fpickava@earthlink.net [mailto:fpickava@earthlink.net] Sent: Wednesday, April 06, 2005 9:07 AM To: This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions.; This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions. Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, > > I am going to a client site that does not have SQRW installed. They develop SQR's in text and submit for execution via native Unix (ugly). How do I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 12:06:27 2005 Date: Wed, 6 Apr 2005 13:05:37 -0400 (GMT-04:00) From: "fpickava@earthlink.net" Subject: Re: [sqr-users] SQRW Question Thanks. Please send me your simple bubble sort code. During unit testing I will try to improve on the performance and send the code back to you.....Frank -----Original Message----- From: Robert Goshko Sent: Apr 6, 2005 12:25 PM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Apr 6, 2005 9:06 AM, fpickava@earthlink.net wrote: > Is there some way an Array can be sorted? Yes, you can use any type of algorithm, you just have to code it yourself, I have coded a simple bubble sort before, not the best or fastest, but fairly simple to code. You can find various sorting algorithms around the web -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 12:13:07 2005 Subject: RE: [sqr-users] SQRW Question Date: Wed, 6 Apr 2005 11:11:54 -0600 From: "Bartlett, Dwain" This is a multi-part message in MIME format... ------_=_NextPart_001_01C53ACB.BB1E964F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Attached is code for sorting an array. Dwain Bartlett SABHRS Services Bureau, ITSD HR Systems Analyst (406) 444-0418 dbartlett@mt.gov -----Original Message----- From: sqr-users-bounces+dbartlett=3Dmt.gov@sqrug.org [mailto:sqr-users-bounces+dbartlett=3Dmt.gov@sqrug.org]On Behalf Of fpickava@earthlink.net Sent: Wednesday, April 06, 2005 10:07 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions.; This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, >=20 > I am going to a client site that does not have SQRW installed. They deve= lop SQR's in text and submit for execution via native Unix (ugly). How do = I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. --=20 ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ------_=_NextPart_001_01C53ACB.BB1E964F Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Description: AUTOMATIC WARNING Here was a non admissible message part of 'application/octet-stream' MIME type. It has been automatically discarded before sending the message to the list. ------_=_NextPart_001_01C53ACB.BB1E964F Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ------_=_NextPart_001_01C53ACB.BB1E964F-- From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 12:18:03 2005 Subject: RE: [sqr-users] SQRW Question Date: Wed, 6 Apr 2005 11:16:51 -0600 From: "Bartlett, Dwain" The attachment did get sent, so here is the code. !********************************************************************** !* * !* MODULE: TDSORTR.SQR * !* AUTHOR: TONY DELIA. * !* DATE: 03/01/1999. * !* SYSTEM: TD SQR UTILITY SERIES. * !* DESC: SQR RECURSIVE SORT EXPLANATION (QUICKSORT). * !* * !********************************************************************** !* * !* NOTE: THIS SAMPLE EXPANDS ON THE SQR TUTORIAL PROGRAM * !* EX24A.SQR (QUICKSORT SAMPLE CODE). THE QUICKSORT * !* ALGORITHM IS COMMONLY UTILIZED IN C, BASIC, JAVA, * !* ETC. BUT NOT COMMONLY UNDERSTOOD. SOME STRUCTURAL * !* CHANGES HAVE BEEN MADE TO THE QUICKSORT ROUTINE * !* AS FOLLOWS: * !* * !* A) ALLOW MULTIPLE SORT KEYS TO BE USED. * !* * !* EXAMPLE USES STATE AND AREA CODE AS KEYS. * !* * !* B) SENSIBLE POINTER NAMES REPLACING #m, #n, #i, #j. * !* * !* #qlo - LO ARRAY BOUNDARY. * !* #qhi - HI ARRAY BOUNDARY. * !* #qbwd - BACKWARD TRAVERSAL POINTER. * !* #qfwd - FORWARD TRAVERSAL POINTER. * !* * !* C) CHANGED MISLEADING POINTER LIMIT ON BACKWARD * !* TRAVERSAL. EX24A.SQR USES STATEMENT... * !* * !* while #j >=3D 0 TO CONTROL BACKWARD TRAVERSAL. * !* * !* THIS IMPLIES BACKWARD TRAVERSAL GOES THROUGH THE * !* START OF ARRAY. ACTUALLY THE BACKWARD TRAVERSAL * !* ENDS WHEN IT INTERSECTS WITH FORWARD POINTER. * !* BESIDES WHEN 2ND RECURSIVE SORT IS CALLED WITHIN * !* THE 'PARENT' SORT THE LO BOUNDARY IS NEVER ZERO. * !* * !* D) FURTHER CLARIFIED CODE ON FINAL SWAP. CURRENTLY * !* LO/BWD SWAP IS UNCONDITIONAL. IF ELEMENTS ARE IN * !* THEIR PROPER PLACE THERE'S NO NEED TO SWAP. ALSO * !* STREAMLINED RECURSIVE ARRAY POPULATION A BIT. * !* * !* E) COMMENTS INSERTED TO EXPLAIN FUNCTIONALITY OF * !* PROGRAM. * !* * !********************************************************************** !* * !* OVERVIEW: THE RECURSIVE 'QUICKSORT' PERFORMS SEVERAL TASKS. * !* NOTE THE FIRST ELEMENT IS USED AS THE 'OBJECT' KEY. * !* LO AND HI ARRAY BOUNDARIES ARE PASSED TO THE SORT. * !* * !* THE FIRST STEP USES A FORWARD POINTER TO FIND THE * !* 'NEXT' ELEMENT > OBJECT KEY. THEN STARTING FROM THE * !* HI BOUNDARY A BACKWARD POINTER IS USED TO FIND THE * !* 'NEXT' ELEMENT < OBJECT KEY. THE FWD AND BWD ARRAY * !* ELEMENTS MAY THEN BE SWAPPED. THIS IS BASED ON THE * !* SIMPLE ALGEBRAIC RULE: * !* * !* IF (KEY < FWD) AND (KEY > BWD) THEN (FWD > BWD). * !* * !* ABOVE PROCESS REPEATED UNTIL FWD/BWD POINTERS * !* INTERSECT. ONCE COMPLETE A FINAL SWAP 'MAY' BE * !* REQUIRED BETWEEN THE OBJECT KEY (LO) AND BACKWARD * !* POINTER. AT THIS POINT THE BACKWARD POINTER IS USED * !* AS A TABLE DIVIDER. FOR BOTH SECTIONS THE RECURSIVE * !* SORT IS PERFORMED AGAIN USING THE SECTION LO/HI * !* BOUNDARIES. SINCE SQR DOES NOT SUPPORT RECURSIVE * !* VARIABLES AN ARRAY IS USED TO STORE LO/HI BOUNDARY * !* PARAMETERS FOR THE SECOND HALF OF THE TABLE (THE * !* FIRST SECTION IS CALLED IMMEDIATELY). * !* * !* GRAPHIC: * !* ---------------------------------------------- * !* LEVEL LO FWD-> <-BWD HI * !* #1 0 1 2 3 4 5 6 . . . . n * !* /| * !* --------------------- ---------------------- * !* LEVEL LO FWD-> <-BWD HI LO FWD-> <-BWD HI * !* #2 0 1 2 3 4 5 6 . . . . n * !* /| /| * !* etc. etc. etc. etc. * !* --------- --------- --------- ---------- * !* #3 0 1 2 3 4 5 6 . . . . n * !* * !********************************************************************** !* * !* SEE TDSORTR.ALC FOR IBM/370 ASSEMBLER VERSION OF * !* RECURSIVE SORTING. COMMENTS GIVEN FOR EACH LINE. * !* SAME STATE/AREACODE/DESCRIPTION ARRAY USED IN BOTH * !* ASSEMBLER AND SQR VERSIONS. * !* * !********************************************************************** #include 'setenv.sqc' ! Set environment !********************************************************************** !* Setup Procedure * !********************************************************************** begin-setup #Include 'setup02a.sqc' ! Printer and page-size init landscape #define max_rows 5000 end-setup !********************************************************************** !* Mainline Processing * !********************************************************************** begin-report do Init-DateTime do Get-Current-DateTime move $AsOfToday to $AsOfDate do Process-Main end-report !********************************************************************** !* Set Defaults * !********************************************************************** begin-procedure Set-Defaults let $ReportId =3D 'TDSORTR' let $ReportTitle =3D 'SQR Recursive Sort (QuickSort)' display $ReportId noline display ' ' noline display $ReportTitle display ' ' end-procedure !********************************************************************** !* Process Main * !********************************************************************** begin-procedure Process-Main create-array name=3DQsort size=3D{max_rows} field=3DQlo:number field=3DQhi:number create-array name=3DQarray size=3D{max_rows} field=3DQkey:char field=3DQarea:char field=3DQdesc:char do Load-Array do QuickSort(0, 0, #Qmax) do Display-Results end-procedure !********************************************************************** !* Recursive Sort * !********************************************************************** begin-procedure QuickSort(#level, #Qlo, #Qhi) if #Qlo < #Qhi let #Qfwd =3D #Qlo ! Init forward pointer let #Qbwd =3D #Qhi + 1 ! Init backward pointer ! Lo Boundary is Key Object(s) let $Qkey =3D Qarray.Qkey (#Qlo) let $Qarea =3D Qarray.Qarea (#Qlo) while 1 =3D 1 ! Traverse Forward - find 'next' array.key > Qkey ! Bypass all keys less than Object Key (Qkey) let #Qfwd =3D #Qfwd + 1 while #Qfwd <=3D #Qbwd if $Qkey < Qarray.Qkey (#Qfwd) or $Qkey =3D Qarray.Qkey (#Qfwd) and $Qarea < Qarray.Qarea (#Qfwd) break end-if let #Qfwd =3D #Qfwd + 1 end-while ! Traverse Backward - find 'next' array.key < Qkey ! Bypass all keys more than Object Key (Qkey) let #Qbwd =3D #Qbwd - 1 while #Qbwd >=3D #Qfwd ! Logically #Qfwd is limit if $Qkey > Qarray.Qkey (#Qbwd) or $Qkey =3D Qarray.Qkey (#Qbwd) and $Qarea > Qarray.Qarea (#Qbwd) break end-if let #Qbwd =3D #Qbwd - 1 end-while ! Once traversed Boundaries meet exit main loop if #Qfwd >=3D #Qbwd break end-if ! Swap Forward/Backward Elements do QSortSwap(#Qfwd, #Qbwd) end-while ! Swap Lo Boundary / Backward Elements if $Qkey > Qarray.Qkey (#Qbwd) or $Qkey =3D Qarray.Qkey (#Qbwd) and $Qarea > Qarray.Qarea (#Qbwd) do QSortSwap(#Qlo, #Qbwd) end-if ! At this point the table is split in two sections. ! Save boundaries of 2nd half (due to non-recursive variables) let #level =3D #level + 1 let Qsort.Qlo (#level - 1) =3D #Qbwd + 1 let Qsort.Qhi (#level - 1) =3D #Qhi ! Now sort from Lo to New Hi let #Qhi =3D #Qbwd - 1 do QuickSort(#level, #Qlo, #Qhi) ! Now sort from New Lo to Hi (Restoring first) let #Qlo =3D Qsort.Qlo (#level - 1) let #Qhi =3D Qsort.Qhi (#level - 1) do QuickSort(#level, #Qlo, #Qhi) let #level =3D #level - 1 end-if end-procedure !********************************************************************** !* Sort Lo/Hi Array Elements * !********************************************************************** begin-procedure QSortSwap(#lo, #hi) get $Qkey $Qarea $Qdesc from Qarray (#lo) Qkey Qarea Qdesc let Qarray.Qkey (#lo) =3D Qarray.Qkey (#hi) let Qarray.Qarea (#lo) =3D Qarray.Qarea (#hi) let Qarray.Qdesc (#lo) =3D Qarray.Qdesc (#hi) put $Qkey $Qarea $Qdesc into Qarray (#hi) Qkey Qarea Qdesc end-procedure !********************************************************************** !* Load Array * !********************************************************************** begin-procedure Load-Array let #idx =3D 0 let $Qdata =3D 'AK907ALASKA' do Load-Element let $Qdata =3D 'DE302DELAWARE' do Load-Element let $Qdata =3D 'GA404GEORGIA' do Load-Element let $Qdata =3D 'GA706GEORGIA' do Load-Element let $Qdata =3D 'MD301MARYLAND' do Load-Element let $Qdata =3D 'NJ201NEW JERSEY' do Load-Element let $Qdata =3D 'WA206WASHINGTON' do Load-Element let $Qdata =3D 'NY607NEW YORK' do Load-Element let $Qdata =3D 'NJ908NEW JERSEY' do Load-Element let $Qdata =3D 'NJ609NEW JERSEY' do Load-Element let $Qdata =3D 'WA509WASHINGTON' do Load-Element let $Qdata =3D 'MD410MARYLAND' do Load-Element let $Qdata =3D 'PA610PENNSYLVANIA' do Load-Element let $Qdata =3D 'GA912GEORGIA' do Load-Element let $Qdata =3D 'NY212NEW YORK' do Load-Element let $Qdata =3D 'PA412PENNSYLVANIA' do Load-Element let $Qdata =3D 'NY914NEW YORK' do Load-Element let $Qdata =3D 'PA814PENNSYLVANIA' do Load-Element let $Qdata =3D 'NY315NEW YORK' do Load-Element let $Qdata =3D 'NY516NEW YORK' do Load-Element let $Qdata =3D 'NY716NEW YORK' do Load-Element let $Qdata =3D 'NY917NEW YORK' do Load-Element let $Qdata =3D 'NY917MANHATTEN' do Load-Element let $Qdata =3D 'PA215PENNSYLVANIA' do Load-Element let $Qdata =3D 'PA717PENNSYLVANIA' do Load-Element let $Qdata =3D 'NY518NEW YORK' do Load-Element let $Qdata =3D 'NY718NEW YORK' do Load-Element let $Qdata =3D 'PA724PENNSYLVANIA' do Load-Element let $Qdata =3D 'NJ732NEW JERSEY' do Load-Element let $Qdata =3D 'MD240MARYLAND' do Load-Element let $Qdata =3D 'MD443MARYLAND' do Load-Element let $Qdata =3D 'WA360WASHINGTON' do Load-Element let $Qdata =3D 'GA770GEORGIA' do Load-Element let $Qdata =3D 'NJ973NEW JERSEY' do Load-Element let $Qdata =3D 'GA678GEORGIA' do Load-Element let #Qmax =3D #idx - 1 end-procedure !********************************************************************** !* Load Element * !********************************************************************** begin-procedure Load-Element let Qarray.Qkey (#idx) =3D substr($Qdata,1,2) let Qarray.Qarea (#idx) =3D substr($Qdata,3,3) let Qarray.Qdesc (#idx) =3D rtrim(substr($Qdata,6,20),' ') let #idx =3D #idx + 1 end-procedure !********************************************************************** !* Display Results * !********************************************************************** begin-procedure Display-Results display ' ' display 'Sorted Results' display ' ' display 'State Area Description' display '----- ---- --------------------' display ' ' let #idx =3D 0 while #idx <=3D #Qmax let $Qkey =3D Qarray.Qkey (#idx) let $Qarea =3D Qarray.Qarea (#idx) let $Qdesc =3D Qarray.Qdesc (#idx) let $Qdata =3D rpad($Qkey,7,' ') || rpad($Qarea,6,' ') || $Qdesc display $Qdata let #idx =3D #idx + 1 end-while display ' ' end-procedure !********************************************************************** !* Include Members: * !********************************************************************** #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'datetime.sqc' !Routines for date and time formatting !Init-DateTime procedure Dwain Bartlett SABHRS Services Bureau, ITSD HR Systems Analyst (406) 444-0418 dbartlett@mt.gov -----Original Message----- From: sqr-users-bounces+dbartlett=3Dmt.gov@sqrug.org [mailto:sqr-users-bounces+dbartlett=3Dmt.gov@sqrug.org]On Behalf Of fpickava@earthlink.net Sent: Wednesday, April 06, 2005 10:07 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions.; This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, >=20 > I am going to a client site that does not have SQRW installed. They deve= lop SQR's in text and submit for execution via native Unix (ugly). How do = I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. --=20 ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 13:10:54 2005 From: "Don Duwe" Subject: RE: [sqr-users] SQRW Question (SORT ARRAYS) Date: Wed, 6 Apr 2005 14:10:38 -0400 MAYBE YOU CAN USE THIS SORT. Begin-Procedure SORT-FDVSQ ! SORT FDVSQ LET #ix1 = 0 WHILE #ix1 < 400 GET $F1 #F0 #F1 #F2 #F3 #F4 #F5 #F6 #F7 #F8 #F9 #F10 #F11 FROM FDVSQ(#ix1) FDQ FDD(0) FDD(1) FDD(2) FDD(3) FDD(4) FDD(5) FDD(6) FDD(7) FDD(8) FDD(9) FDD(10) FDD(11) IF $TS1 = '' BREAK END-IF LET $sortkey1 = $TS1 LET #ix2 = #ix1 + 1 WHILE #ix2 < 400 GET $F12 #F02 #F12 #F22 #F32 #F42 #F52 #F62 #F72 #F82 #F92 #F102 #F112 FROM FDVSQ(#ix1) FDQ FDD(0) FDD(1) FDD(2) FDD(3) FDD(4) FDD(5) FDD(6) FDD(7) FDD(8) FDD(9) FDD(10) FDD(11) IF $TS2 = '' BREAK END-IF LET $sortkey2 = $TS2 IF ($sortkey1 >= $sortkey2) PUT $TS2 #S12 INTO FDVSQ(#ix1) FDQ FDD(0) PUT $TS1 #S11 INTO FDVSQ(#ix2) FDQ FDD(0) LET $TS1 = $TS2 LET #F1 = #F12 LET #F2 = #F22 LET #F3 = #F32 LET #F4 = #F42 LET #F5 = #F52 LET #F6 = #F62 LET #F7 = #F72 LET #F8 = #F82 LET #F9 = #F92 LET #F10 = #F102 LET #F11 = #F112 LET $sortkey1 = $TS1 END-IF ADD 1 to #ix2 END-WHILE ADD 1 to #ix1 END-WHILE End-Procedure ! SORT FDVSQ -----Original Message----- From: sqr-users-bounces+dduwe=nookind.com@sqrug.org [mailto:sqr-users-bounces+dduwe=nookind.com@sqrug.org]On Behalf Of Bartlett, Dwain Sent: Wednesday, April 06, 2005 1:17 PM To: This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions. Subject: RE: [sqr-users] SQRW Question The attachment did get sent, so here is the code. !********************************************************************** !* * !* MODULE: TDSORTR.SQR * !* AUTHOR: TONY DELIA. * !* DATE: 03/01/1999. * !* SYSTEM: TD SQR UTILITY SERIES. * !* DESC: SQR RECURSIVE SORT EXPLANATION (QUICKSORT). * !* * !********************************************************************** !* * !* NOTE: THIS SAMPLE EXPANDS ON THE SQR TUTORIAL PROGRAM * !* EX24A.SQR (QUICKSORT SAMPLE CODE). THE QUICKSORT * !* ALGORITHM IS COMMONLY UTILIZED IN C, BASIC, JAVA, * !* ETC. BUT NOT COMMONLY UNDERSTOOD. SOME STRUCTURAL * !* CHANGES HAVE BEEN MADE TO THE QUICKSORT ROUTINE * !* AS FOLLOWS: * !* * !* A) ALLOW MULTIPLE SORT KEYS TO BE USED. * !* * !* EXAMPLE USES STATE AND AREA CODE AS KEYS. * !* * !* B) SENSIBLE POINTER NAMES REPLACING #m, #n, #i, #j. * !* * !* #qlo - LO ARRAY BOUNDARY. * !* #qhi - HI ARRAY BOUNDARY. * !* #qbwd - BACKWARD TRAVERSAL POINTER. * !* #qfwd - FORWARD TRAVERSAL POINTER. * !* * !* C) CHANGED MISLEADING POINTER LIMIT ON BACKWARD * !* TRAVERSAL. EX24A.SQR USES STATEMENT... * !* * !* while #j >= 0 TO CONTROL BACKWARD TRAVERSAL. * !* * !* THIS IMPLIES BACKWARD TRAVERSAL GOES THROUGH THE * !* START OF ARRAY. ACTUALLY THE BACKWARD TRAVERSAL * !* ENDS WHEN IT INTERSECTS WITH FORWARD POINTER. * !* BESIDES WHEN 2ND RECURSIVE SORT IS CALLED WITHIN * !* THE 'PARENT' SORT THE LO BOUNDARY IS NEVER ZERO. * !* * !* D) FURTHER CLARIFIED CODE ON FINAL SWAP. CURRENTLY * !* LO/BWD SWAP IS UNCONDITIONAL. IF ELEMENTS ARE IN * !* THEIR PROPER PLACE THERE'S NO NEED TO SWAP. ALSO * !* STREAMLINED RECURSIVE ARRAY POPULATION A BIT. * !* * !* E) COMMENTS INSERTED TO EXPLAIN FUNCTIONALITY OF * !* PROGRAM. * !* * !********************************************************************** !* * !* OVERVIEW: THE RECURSIVE 'QUICKSORT' PERFORMS SEVERAL TASKS. * !* NOTE THE FIRST ELEMENT IS USED AS THE 'OBJECT' KEY. * !* LO AND HI ARRAY BOUNDARIES ARE PASSED TO THE SORT. * !* * !* THE FIRST STEP USES A FORWARD POINTER TO FIND THE * !* 'NEXT' ELEMENT > OBJECT KEY. THEN STARTING FROM THE * !* HI BOUNDARY A BACKWARD POINTER IS USED TO FIND THE * !* 'NEXT' ELEMENT < OBJECT KEY. THE FWD AND BWD ARRAY * !* ELEMENTS MAY THEN BE SWAPPED. THIS IS BASED ON THE * !* SIMPLE ALGEBRAIC RULE: * !* * !* IF (KEY < FWD) AND (KEY > BWD) THEN (FWD > BWD). * !* * !* ABOVE PROCESS REPEATED UNTIL FWD/BWD POINTERS * !* INTERSECT. ONCE COMPLETE A FINAL SWAP 'MAY' BE * !* REQUIRED BETWEEN THE OBJECT KEY (LO) AND BACKWARD * !* POINTER. AT THIS POINT THE BACKWARD POINTER IS USED * !* AS A TABLE DIVIDER. FOR BOTH SECTIONS THE RECURSIVE * !* SORT IS PERFORMED AGAIN USING THE SECTION LO/HI * !* BOUNDARIES. SINCE SQR DOES NOT SUPPORT RECURSIVE * !* VARIABLES AN ARRAY IS USED TO STORE LO/HI BOUNDARY * !* PARAMETERS FOR THE SECOND HALF OF THE TABLE (THE * !* FIRST SECTION IS CALLED IMMEDIATELY). * !* * !* GRAPHIC: * !* ---------------------------------------------- * !* LEVEL LO FWD-> <-BWD HI * !* #1 0 1 2 3 4 5 6 . . . . n * !* /| * !* --------------------- ---------------------- * !* LEVEL LO FWD-> <-BWD HI LO FWD-> <-BWD HI * !* #2 0 1 2 3 4 5 6 . . . . n * !* /| /| * !* etc. etc. etc. etc. * !* --------- --------- --------- ---------- * !* #3 0 1 2 3 4 5 6 . . . . n * !* * !********************************************************************** !* * !* SEE TDSORTR.ALC FOR IBM/370 ASSEMBLER VERSION OF * !* RECURSIVE SORTING. COMMENTS GIVEN FOR EACH LINE. * !* SAME STATE/AREACODE/DESCRIPTION ARRAY USED IN BOTH * !* ASSEMBLER AND SQR VERSIONS. * !* * !********************************************************************** #include 'setenv.sqc' ! Set environment !********************************************************************** !* Setup Procedure * !********************************************************************** begin-setup #Include 'setup02a.sqc' ! Printer and page-size init landscape #define max_rows 5000 end-setup !********************************************************************** !* Mainline Processing * !********************************************************************** begin-report do Init-DateTime do Get-Current-DateTime move $AsOfToday to $AsOfDate do Process-Main end-report !********************************************************************** !* Set Defaults * !********************************************************************** begin-procedure Set-Defaults let $ReportId = 'TDSORTR' let $ReportTitle = 'SQR Recursive Sort (QuickSort)' display $ReportId noline display ' ' noline display $ReportTitle display ' ' end-procedure !********************************************************************** !* Process Main * !********************************************************************** begin-procedure Process-Main create-array name=Qsort size={max_rows} field=Qlo:number field=Qhi:number create-array name=Qarray size={max_rows} field=Qkey:char field=Qarea:char field=Qdesc:char do Load-Array do QuickSort(0, 0, #Qmax) do Display-Results end-procedure !********************************************************************** !* Recursive Sort * !********************************************************************** begin-procedure QuickSort(#level, #Qlo, #Qhi) if #Qlo < #Qhi let #Qfwd = #Qlo ! Init forward pointer let #Qbwd = #Qhi + 1 ! Init backward pointer ! Lo Boundary is Key Object(s) let $Qkey = Qarray.Qkey (#Qlo) let $Qarea = Qarray.Qarea (#Qlo) while 1 = 1 ! Traverse Forward - find 'next' array.key > Qkey ! Bypass all keys less than Object Key (Qkey) let #Qfwd = #Qfwd + 1 while #Qfwd <= #Qbwd if $Qkey < Qarray.Qkey (#Qfwd) or $Qkey = Qarray.Qkey (#Qfwd) and $Qarea < Qarray.Qarea (#Qfwd) break end-if let #Qfwd = #Qfwd + 1 end-while ! Traverse Backward - find 'next' array.key < Qkey ! Bypass all keys more than Object Key (Qkey) let #Qbwd = #Qbwd - 1 while #Qbwd >= #Qfwd ! Logically #Qfwd is limit if $Qkey > Qarray.Qkey (#Qbwd) or $Qkey = Qarray.Qkey (#Qbwd) and $Qarea > Qarray.Qarea (#Qbwd) break end-if let #Qbwd = #Qbwd - 1 end-while ! Once traversed Boundaries meet exit main loop if #Qfwd >= #Qbwd break end-if ! Swap Forward/Backward Elements do QSortSwap(#Qfwd, #Qbwd) end-while ! Swap Lo Boundary / Backward Elements if $Qkey > Qarray.Qkey (#Qbwd) or $Qkey = Qarray.Qkey (#Qbwd) and $Qarea > Qarray.Qarea (#Qbwd) do QSortSwap(#Qlo, #Qbwd) end-if ! At this point the table is split in two sections. ! Save boundaries of 2nd half (due to non-recursive variables) let #level = #level + 1 let Qsort.Qlo (#level - 1) = #Qbwd + 1 let Qsort.Qhi (#level - 1) = #Qhi ! Now sort from Lo to New Hi let #Qhi = #Qbwd - 1 do QuickSort(#level, #Qlo, #Qhi) ! Now sort from New Lo to Hi (Restoring first) let #Qlo = Qsort.Qlo (#level - 1) let #Qhi = Qsort.Qhi (#level - 1) do QuickSort(#level, #Qlo, #Qhi) let #level = #level - 1 end-if end-procedure !********************************************************************** !* Sort Lo/Hi Array Elements * !********************************************************************** begin-procedure QSortSwap(#lo, #hi) get $Qkey $Qarea $Qdesc from Qarray (#lo) Qkey Qarea Qdesc let Qarray.Qkey (#lo) = Qarray.Qkey (#hi) let Qarray.Qarea (#lo) = Qarray.Qarea (#hi) let Qarray.Qdesc (#lo) = Qarray.Qdesc (#hi) put $Qkey $Qarea $Qdesc into Qarray (#hi) Qkey Qarea Qdesc end-procedure !********************************************************************** !* Load Array * !********************************************************************** begin-procedure Load-Array let #idx = 0 let $Qdata = 'AK907ALASKA' do Load-Element let $Qdata = 'DE302DELAWARE' do Load-Element let $Qdata = 'GA404GEORGIA' do Load-Element let $Qdata = 'GA706GEORGIA' do Load-Element let $Qdata = 'MD301MARYLAND' do Load-Element let $Qdata = 'NJ201NEW JERSEY' do Load-Element let $Qdata = 'WA206WASHINGTON' do Load-Element let $Qdata = 'NY607NEW YORK' do Load-Element let $Qdata = 'NJ908NEW JERSEY' do Load-Element let $Qdata = 'NJ609NEW JERSEY' do Load-Element let $Qdata = 'WA509WASHINGTON' do Load-Element let $Qdata = 'MD410MARYLAND' do Load-Element let $Qdata = 'PA610PENNSYLVANIA' do Load-Element let $Qdata = 'GA912GEORGIA' do Load-Element let $Qdata = 'NY212NEW YORK' do Load-Element let $Qdata = 'PA412PENNSYLVANIA' do Load-Element let $Qdata = 'NY914NEW YORK' do Load-Element let $Qdata = 'PA814PENNSYLVANIA' do Load-Element let $Qdata = 'NY315NEW YORK' do Load-Element let $Qdata = 'NY516NEW YORK' do Load-Element let $Qdata = 'NY716NEW YORK' do Load-Element let $Qdata = 'NY917NEW YORK' do Load-Element let $Qdata = 'NY917MANHATTEN' do Load-Element let $Qdata = 'PA215PENNSYLVANIA' do Load-Element let $Qdata = 'PA717PENNSYLVANIA' do Load-Element let $Qdata = 'NY518NEW YORK' do Load-Element let $Qdata = 'NY718NEW YORK' do Load-Element let $Qdata = 'PA724PENNSYLVANIA' do Load-Element let $Qdata = 'NJ732NEW JERSEY' do Load-Element let $Qdata = 'MD240MARYLAND' do Load-Element let $Qdata = 'MD443MARYLAND' do Load-Element let $Qdata = 'WA360WASHINGTON' do Load-Element let $Qdata = 'GA770GEORGIA' do Load-Element let $Qdata = 'NJ973NEW JERSEY' do Load-Element let $Qdata = 'GA678GEORGIA' do Load-Element let #Qmax = #idx - 1 end-procedure !********************************************************************** !* Load Element * !********************************************************************** begin-procedure Load-Element let Qarray.Qkey (#idx) = substr($Qdata,1,2) let Qarray.Qarea (#idx) = substr($Qdata,3,3) let Qarray.Qdesc (#idx) = rtrim(substr($Qdata,6,20),' ') let #idx = #idx + 1 end-procedure !********************************************************************** !* Display Results * !********************************************************************** begin-procedure Display-Results display ' ' display 'Sorted Results' display ' ' display 'State Area Description' display '----- ---- --------------------' display ' ' let #idx = 0 while #idx <= #Qmax let $Qkey = Qarray.Qkey (#idx) let $Qarea = Qarray.Qarea (#idx) let $Qdesc = Qarray.Qdesc (#idx) let $Qdata = rpad($Qkey,7,' ') || rpad($Qarea,6,' ') || $Qdesc display $Qdata let #idx = #idx + 1 end-while display ' ' end-procedure !********************************************************************** !* Include Members: * !********************************************************************** #Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'datetime.sqc' !Routines for date and time formatting !Init-DateTime procedure Dwain Bartlett SABHRS Services Bureau, ITSD HR Systems Analyst (406) 444-0418 dbartlett@mt.gov -----Original Message----- From: sqr-users-bounces+dbartlett=mt.gov@sqrug.org [mailto:sqr-users-bounces+dbartlett=mt.gov@sqrug.org]On Behalf Of fpickava@earthlink.net Sent: Wednesday, April 06, 2005 10:07 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions.; This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, > > I am going to a client site that does not have SQRW installed. They develop SQR's in text and submit for execution via native Unix (ugly). How do I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ********************************************************************* Note: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. ********************************************************************* _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 14:07:18 2005 Subject: RE: [sqr-users] Dynamic database links Date: Wed, 6 Apr 2005 15:06:36 -0400 From: "Debbie Larney" Thanks for the advice. I did just as you suggested and it worked like a cha= rm. -----Original Message----- From: Alexander, Steve [mailto:Steven.Alexander@sanjoseca.gov] Sent: Tuesday, April 05, 2005 7:25 PM To: 'This list is for discussion about the SQR database reportinglanguagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Dynamic database links In Oracle, tables that are accessed via a database link are written in the form "payruleids@kdev". It may be different in other databases, but I suspect you cannot have a space between the table name and the database instance name. Also, the SQR compiler wants to validate your fields, so it needs to know a table with the same layout as your dynamically selected table. You might write the FROM clause as: from [$table_at_db : payruleids@kdev] a That tells SQR to use the copy of payruleids in the kdev database instance to determine whether your fields are valid and what type they are. If you are not always connected to kdev (or any instance that includes payruleids), you can identify the type of each field - but I forget the syntax. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Tuesday, April 05, 2005 2:55 PM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Dynamic database links I've got 2 different ideas for you. First, maybe try letting $dblink default to something you know will work before all the if statements (it's def on KDEV so 'let $dblink =3D 'KDEV' ' and then change it once you know what $kronos_db is). That way it compiles knowing that $dblink will have a value. As is, it looks like all the ifs could fail, and then $dblink has no value/doesn't exist. I'm speaking in terms of possibility...even though you may NEVER have a value other than those 4, there is no 'else !other ' statement that ensures the compiler that $dblink is set in one of those checks. Second, now I've never tried this, but maybe you could make the entire from clause dynamically. That way it will have to parse it at run time instead of compile time? maybe? (i could be wrong on this...dynamic from clauses isn't something I've tried). Just a suggestion...something to try.=20=20 let $from_clause =3D 'FROM payruleids ' || $dblink || ' a' begin-select loops=3D1 a.name=20=20 Let $found_new_bu =3D 'Y' [$from_clause] where ... end-select -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Debbie Larney Sent: Tuesday, April 05, 2005 4:40 PM To: sqr-users@sqrug.org Subject: [sqr-users] Dynamic database links Hello Everyone, I was wondering if it was possible to dynamically define database links in sqr. I am trying to access a vendor's database via a database link. I know that the database link is set up properly because if I hardcode the link name in my sql statement I am able to run my program to success. The problem I have is that I want to define this value dynamically based on run control parameters. I get compile errrors when I try this dynamically because the database link variable name is not determined until after the program compiles. I presume I could define the tables in the database that I am executing my program from but I really don't want to have to do that. Anyone have any great ideas. Snippets of my code and the errors from the log file are listed below. Thanks in advance for any assistance --Definition of the database link if $kronos_db =3D 'KPRD' let $dblink =3D {dblink_kprd}--This is defined gloablly else if $kronos_db =3D 'KTST' let $dblink =3D {dblink_ktst}--This is defined gloablly else if $kronos_db =3D 'KDEV' let $dblink =3D {dblink_kdev}--This is defined gloablly else if $kronos_db =3D 'KSYS' let $dblink =3D {dblink_ksys}--This is defined gloablly =20 end-if end-if end-if end-if=20 --One of the procedures with a compile error !--------------------------------------------------------------------------- --! ! Procedure : Check-New-BU ! Called From: Get-RC-Params ! Description: Checks to see if payrules already exist for the selected=20 ! clone to bu !--------------------------------------------------------------------------- --! begin-procedure Check-New-BU move 'Check-New-BU' to $operation_name #ifdef debugf show 'Procedure: ' $operation_name #end-if let $found_new_bu =3D 'N' begin-select loops=3D1 a.name=20=20 Let $found_new_bu =3D 'Y' show 'Error: new BU payrules already exist =3D ' $new_bu from payruleids [$dblink] a=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 where substr(a.name,1,5) =3D $new_bu=20 End-Select end-procedure Check-New-BU error below notice that the dblink is not defined at compile time and not part of the sql SQR 5528) ORACLE OCIStmtExecute error 942 in cursor 32:=20 ORA-00942: table or view does not exist=20 SQL: SELECT a.name from payruleids=20 Error on line 260: (SQR 3716) Error in SQL statement.=20 ********************************************************************=20 CONFIDENTIALITY NOTICE:=20 The information contained in this e-mail is legally privileged and confidential information intended only for the use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any viewing, dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received and/or are viewing this e-mail in error, please immediately notify the sender by reply e-mail, and delete this e-mail from your system. Thank you.=20 ********************************************************************=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 06 14:19:24 2005 Date: Wed, 6 Apr 2005 12:18:40 -0700 (PDT) From: "fpickava@earthlink.net" Subject: RE: [sqr-users] SQRW Question Thank you....Frank -----Original Message----- From: "Bartlett, Dwain" Sent: Apr 6, 2005 10:11 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: RE: [sqr-users] SQRW Question Attached is code for sorting an array. Dwain Bartlett SABHRS Services Bureau, ITSD HR Systems Analyst (406) 444-0418 dbartlett@mt.gov -----Original Message----- From: sqr-users-bounces+dbartlett=mt.gov@sqrug.org [mailto:sqr-users-bounces+dbartlett=mt.gov@sqrug.org]On Behalf Of fpickava@earthlink.net Sent: Wednesday, April 06, 2005 10:07 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions.; This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] SQRW Question Is there some way an Array can be sorted? Thanks -----Original Message----- From: Robert Goshko Sent: Feb 25, 2005 6:52 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: Re: [sqr-users] SQRW Question On Fri, 25 Feb 2005 07:47:01 -0500 (GMT-05:00), fpickava@earthlink.net wrote: > To All, > > I am going to a client site that does not have SQRW installed. They develop SQR's in text and submit for execution via native Unix (ugly). How do I go abount obtaining the SQRW software and documentation? SQR programs are always text files, unless compiled to an SQT. If they do not own an SQRW license, then you would have to get one. I usually run SQR from the command line in UNIX, if you think that is ugly, try running SQR on MVS. -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 1 GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 07 12:50:10 2005 Date: Thu, 7 Apr 2005 10:51:24 -0700 From: "Nanci Lawson" Subject: [sqr-users] Simple text file Hello, I am a novice to sqr and have written a fairly simple one to extract a text file. The problem I am having is that there is a space between my heading and the first line of data and I really don't have a good way of knowing how many lines of data I will end up with. Thus the use of max-lines. I would appreciate any help with refinement. Thanks, Nanci=20 !*********************************************************************** ! SALLIE_MAE - produces file for payment plan !*********************************************************************** !*********************************************************************** !*********************************************************************** ! * ! $Release: * ! $Revision: 2 * ! $Version-ID: * ! NOTES: need to change the record count down in the trailer each * ! time and to make sure the max_lines are set to include all * ! in the first pass * ! * !*********************************************************************** #Include 'SETENV1.SQC' !#Include 'curdttim.sqc' !Get-Current-DateTime procedure #Include 'datetime.sqc' !Routines for date and time formatting Begin-Setup =20=20 Declare-Layout Default =20 Line-width=3D320 Left-margin=3D0 Top-margin=3D0 Formfeed=3DNO Max-lines=3D401 =20 End-Declare End-Setup begin-report ! do Get-Current-DateTime=20=20 do Process-Main begin-SELECT {DateTimeOut-Prefix}GETDATE(){DateTimeOut-Suffix} &_SysDateTime FROM PSCLOCK end-SELECT let $tempDate =3D datetostr(&_SysDateTime,'YYYYMMDDHHMISS') =20=20 end-report #define C1 1 #define C2 96 #define C3 61 #define C4 313 #define C5 45 begin-heading 1 Let $space =3D '*' Let $header =3D 'HR002101500000899984002101500'||$tempDate||RPAD('PIL',276,' ')||$space =20 print $header (0,1) =20=20=20=20 =20=20=20 end-heading=20 !*********************************************************************** ! PROC PROCESS-MAIN ! Main Procedure !*********************************************************************** BEGIN-PROCEDURE Process-Main BEGIN-SELECT=20 '01' (+1,{C1}) B.FIRST_NAME_SRCH (0,{C2})=20=20=20 B.LAST_NAME_SRCH (0,{C3})=20=20 B.BIRTHDATE (0,{C4}) edit YYYYMMDD =20=20=20 B.EMPLID (0,{C5}) FROM PS_ACAD_PROG A, PS_PERS_DATA_SA_VW B WHERE A.EFFDT =3D=20 (SELECT MAX(A_ED.EFFDT) FROM PS_ACAD_PROG A_ED=20 WHERE A.EMPLID =3D A_ED.EMPLID=20 AND A.ACAD_CAREER =3D A_ED.ACAD_CAREER=20 AND A.STDNT_CAR_NBR =3D A_ED.STDNT_CAR_NBR=20 AND A_ED.EFFDT <=3D SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10))=20 AND A.EFFSEQ =3D=20 (SELECT MAX(A_ES.EFFSEQ) FROM PS_ACAD_PROG A_ES=20 WHERE A.EMPLID =3D A_ES.EMPLID=20 AND A.ACAD_CAREER =3D A_ES.ACAD_CAREER=20 AND A.STDNT_CAR_NBR =3D A_ES.STDNT_CAR_NBR=20 AND A.EFFDT =3D A_ES.EFFDT)=20 AND A.EMPLID =3D B.EMPLID=20 AND A.PROG_STATUS =3D 'AC' END-SELECT END-PROCEDURE begin-footing 1 Let $space =3D '*'=20=20 Let $footer =3D RPAD('TR003790000020030424185700',319,' ')||$space =20 print $footer (0,1) =20=20=20=20 end-footing=20 Nanci Lawson ANGEL Administrator PeopleSoft Programmer/Analyst Soka University=20 949-480-4222 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 07 13:00:45 2005 Date: Thu, 7 Apr 2005 11:59:39 -0600 From: Robert Goshko Subject: Re: [sqr-users] Simple text file On Apr 7, 2005 11:51 AM, Nanci Lawson wrote: > Hello, > > I am a novice to sqr and have written a fairly simple one to extract a > text file. The problem I am having is that there is a space between my > heading and the first line of data and I really don't have a good way of > knowing how many lines of data I will end up with. Thus the use of > max-lines. I would appreciate any help with refinement. Welcome Nanci, For something like this you would be better off using the OPEN / WRITE / CLOSE commands in SQR as these handle writing to flat files petter, when you use the print functions you are subject to the rules defined by a layout, print is mainly used in the creation of reports that you would like formatted for printing out. -- ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. ==================================================================== Robert Goshko Registered Linux User #260513 Want a Gmail account, 2+ GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 07 13:47:36 2005 Date: Thu, 7 Apr 2005 11:46:31 -0700 (PDT) From: Dattatraya Shetty Subject: Re: [sqr-users] Simple text file Hi Nanci, Looks like you want to create a fixed with File after reading from a Table. Most simple thing to do is open file for output Begin-select columns write 1 from $str --- Nanci Lawson wrote: > Hello, > > I am a novice to sqr and have written a fairly simple one to extract > a > text file. The problem I am having is that there is a space between > my > heading and the first line of data and I really don't have a good way > of > knowing how many lines of data I will end up with. Thus the use of > max-lines. I would appreciate any help with refinement. > Thanks, > Nanci > > > !*********************************************************************** > ! SALLIE_MAE - produces file for payment plan > !*********************************************************************** > !*********************************************************************** > !*********************************************************************** > ! > * > ! $Release: > * > ! $Revision: 2 > * > ! $Version-ID: > * > ! NOTES: need to change the record count down in the trailer each > * > ! time and to make sure the max_lines are set to include all > * > ! in the first pass > * > ! > * > !*********************************************************************** > > #Include 'SETENV1.SQC' > !#Include 'curdttim.sqc' !Get-Current-DateTime procedure > #Include 'datetime.sqc' !Routines for date and time formatting > > > > > Begin-Setup > > > Declare-Layout Default > > Line-width=320 > Left-margin=0 > Top-margin=0 > Formfeed=NO > Max-lines=401 > > End-Declare > > > End-Setup > > > begin-report > ! do Get-Current-DateTime > do Process-Main > > > begin-SELECT > {DateTimeOut-Prefix}GETDATE(){DateTimeOut-Suffix} &_SysDateTime > FROM PSCLOCK > end-SELECT > let $tempDate = datetostr(&_SysDateTime,'YYYYMMDDHHMISS') > > > end-report > > > #define C1 1 > #define C2 96 > #define C3 61 > #define C4 313 > #define C5 45 > > > begin-heading 1 > Let $space = '*' > Let $header = > 'HR002101500000899984002101500'||$tempDate||RPAD('PIL',276,' > ')||$space > > print $header (0,1) > > > end-heading > > !*********************************************************************** > ! PROC PROCESS-MAIN > ! Main Procedure > !*********************************************************************** > > BEGIN-PROCEDURE Process-Main > BEGIN-SELECT > '01' (+1,{C1}) > B.FIRST_NAME_SRCH (0,{C2}) > B.LAST_NAME_SRCH (0,{C3}) > B.BIRTHDATE (0,{C4}) edit YYYYMMDD > > B.EMPLID (0,{C5}) > FROM PS_ACAD_PROG A, PS_PERS_DATA_SA_VW B > WHERE A.EFFDT = > (SELECT MAX(A_ED.EFFDT) FROM PS_ACAD_PROG A_ED > WHERE A.EMPLID = A_ED.EMPLID > AND A.ACAD_CAREER = A_ED.ACAD_CAREER > AND A.STDNT_CAR_NBR = A_ED.STDNT_CAR_NBR > AND A_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10)) > AND A.EFFSEQ = > (SELECT MAX(A_ES.EFFSEQ) FROM PS_ACAD_PROG A_ES > WHERE A.EMPLID = A_ES.EMPLID > AND A.ACAD_CAREER = A_ES.ACAD_CAREER > AND A.STDNT_CAR_NBR = A_ES.STDNT_CAR_NBR > AND A.EFFDT = A_ES.EFFDT) > AND A.EMPLID = B.EMPLID > AND A.PROG_STATUS = 'AC' > > END-SELECT > END-PROCEDURE > > begin-footing 1 > Let $space = '*' > Let $footer = RPAD('TR003790000020030424185700',319,' ')||$space > > > print $footer (0,1) > > end-footing > > > > > > Nanci Lawson > ANGEL Administrator > PeopleSoft Programmer/Analyst > Soka University > 949-480-4222 > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 07 13:51:14 2005 Date: Thu, 7 Apr 2005 11:50:05 -0700 (PDT) From: Dattatraya Shetty Subject: Re: [sqr-users] Simple text file Sorry about the prevoius message folks. Hit send by accident. Nanci, Here is what you need open file write $head begin-select column1 column2 ... let $col1 = &column1 let $col2 = &column2 ... write 1 from $col: $col2: ... from Table write $Tail Close 1 HTH Datta. --- Nanci Lawson wrote: > Hello, > > I am a novice to sqr and have written a fairly simple one to extract > a > text file. The problem I am having is that there is a space between > my > heading and the first line of data and I really don't have a good way > of > knowing how many lines of data I will end up with. Thus the use of > max-lines. I would appreciate any help with refinement. > Thanks, > Nanci > > > !*********************************************************************** > ! SALLIE_MAE - produces file for payment plan > !*********************************************************************** > !*********************************************************************** > !*********************************************************************** > ! > * > ! $Release: > * > ! $Revision: 2 > * > ! $Version-ID: > * > ! NOTES: need to change the record count down in the trailer each > * > ! time and to make sure the max_lines are set to include all > * > ! in the first pass > * > ! > * > !*********************************************************************** > > #Include 'SETENV1.SQC' > !#Include 'curdttim.sqc' !Get-Current-DateTime procedure > #Include 'datetime.sqc' !Routines for date and time formatting > > > > > Begin-Setup > > > Declare-Layout Default > > Line-width=320 > Left-margin=0 > Top-margin=0 > Formfeed=NO > Max-lines=401 > > End-Declare > > > End-Setup > > > begin-report > ! do Get-Current-DateTime > do Process-Main > > > begin-SELECT > {DateTimeOut-Prefix}GETDATE(){DateTimeOut-Suffix} &_SysDateTime > FROM PSCLOCK > end-SELECT > let $tempDate = datetostr(&_SysDateTime,'YYYYMMDDHHMISS') > > > end-report > > > #define C1 1 > #define C2 96 > #define C3 61 > #define C4 313 > #define C5 45 > > > begin-heading 1 > Let $space = '*' > Let $header = > 'HR002101500000899984002101500'||$tempDate||RPAD('PIL',276,' > ')||$space > > print $header (0,1) > > > end-heading > > !*********************************************************************** > ! PROC PROCESS-MAIN > ! Main Procedure > !*********************************************************************** > > BEGIN-PROCEDURE Process-Main > BEGIN-SELECT > '01' (+1,{C1}) > B.FIRST_NAME_SRCH (0,{C2}) > B.LAST_NAME_SRCH (0,{C3}) > B.BIRTHDATE (0,{C4}) edit YYYYMMDD > > B.EMPLID (0,{C5}) > FROM PS_ACAD_PROG A, PS_PERS_DATA_SA_VW B > WHERE A.EFFDT = > (SELECT MAX(A_ED.EFFDT) FROM PS_ACAD_PROG A_ED > WHERE A.EMPLID = A_ED.EMPLID > AND A.ACAD_CAREER = A_ED.ACAD_CAREER > AND A.STDNT_CAR_NBR = A_ED.STDNT_CAR_NBR > AND A_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10)) > AND A.EFFSEQ = > (SELECT MAX(A_ES.EFFSEQ) FROM PS_ACAD_PROG A_ES > WHERE A.EMPLID = A_ES.EMPLID > AND A.ACAD_CAREER = A_ES.ACAD_CAREER > AND A.STDNT_CAR_NBR = A_ES.STDNT_CAR_NBR > AND A.EFFDT = A_ES.EFFDT) > AND A.EMPLID = B.EMPLID > AND A.PROG_STATUS = 'AC' > > END-SELECT > END-PROCEDURE > > begin-footing 1 > Let $space = '*' > Let $footer = RPAD('TR003790000020030424185700',319,' ')||$space > > > print $footer (0,1) > > end-footing > > > > > > Nanci Lawson > ANGEL Administrator > PeopleSoft Programmer/Analyst > Soka University > 949-480-4222 > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun Apr 10 11:40:59 2005 From: "radhika reddy" Date: Sun, 10 Apr 2005 11:39:56 -0500 Subject: [sqr-users] Flat File Hi, I am reading a flat file and inserting into tables(Inbound interface). I am having a problem reading it, when i reach end of file it is still looking for data and taking it as empty record. The program is working good except that the number of errors is added by 1 though it's not. I use While loop for looping through the flat file and also i am checking end of file condition too. Is this the bad flat file or am I missing something? Thanks. Any input would be appreciated. _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun Apr 10 12:47:38 2005 Date: Sun, 10 Apr 2005 13:46:31 -0400 From: "Larry Roux" Subject: Re: [sqr-users] Flat File Can't you just check for the existence of data? ie if (RTRIM($inputline,' ') <> '' add 1 to #count do insert-line end-if Larry Roux Syracuse University lroux@syr.edu >>> radhika_05@hotmail.com 04/10/05 12:39 PM >>> Hi, I am reading a flat file and inserting into tables(Inbound interface). I am having a problem reading it, when i reach end of file it is still looking for data and taking it as empty record. The program is working good except that the number of errors is added by 1 though it's not. I use While loop for looping through the flat file and also i am checking end of file condition too. Is this the bad flat file or am I missing something? Thanks. Any input would be appreciated. _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun Apr 10 18:11:00 2005 From: "Prasanna Menta" Date: Sun, 10 Apr 2005 19:09:57 -0400 Subject: Re: [sqr-users] Flat File Post the code and will be able to debug the issue. Prasana ----- Original Message ----- From: "radhika reddy" Date: Sunday, April 10, 2005 12:39 pm Subject: [sqr-users] Flat File > Hi, >=20 > I am reading a flat file and inserting into tables(Inbound=20 > interface). I=20 > am having a problem reading it, > when i reach end of file it is still looking for data and taking=20 > it as empty=20 > record. The program is working good except that the number of=20 > errors is=20 > added by 1 though it's not. >=20 > I use While loop for looping through the flat file and also i am=20 > checking=20 > end of file condition too. Is this the bad flat file or am I=20 > missing=20 > something? >=20 > Thanks. Any input would be appreciated. >=20 > _________________________________________________________________ > Don=92t just search. Find. Check out the new MSN Search!=20 > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ >=20 >=20 > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 11 08:16:40 2005 Subject: RE: [sqr-users] Flat File Date: Mon, 11 Apr 2005 09:15:52 -0400 From: "Kaithi, Murali" Hi Radhika, I am hoping its bad text file. I experienced this kind of problem before. Check your text file thoroughly. Murali.=20 -----Original Message----- From: sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org [mailto:sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org] On Behalf Of radhika reddy Sent: Sunday, April 10, 2005 12:40 PM To: sqr-users@sqrug.org Subject: [sqr-users] Flat File Hi, I am reading a flat file and inserting into tables(Inbound interface). I am having a problem reading it, when i reach end of file it is still looking for data and taking it as empty record. The program is working good except that the number of errors is added by 1 though it's not. I use While loop for looping through the flat file and also i am checking end of file condition too. Is this the bad flat file or am I missing something? Thanks. Any input would be appreciated. _________________________________________________________________ Don't just search. Find. Check out the new MSN Search!=20 http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 11 09:08:22 2005 From: "radhika reddy" Subject: RE: [sqr-users] Flat File Date: Mon, 11 Apr 2005 09:07:18 -0500 Murali, You are right. It's bad flat file. It has extra line with no data. Thanks to everybody. Radhika >From: "Kaithi, Murali" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] Flat File >Date: Mon, 11 Apr 2005 09:15:52 -0400 > >Hi Radhika, >I am hoping its bad text file. I experienced this kind of problem >before. >Check your text file thoroughly. > >Murali. > >-----Original Message----- >From: sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org >[mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] On >Behalf Of radhika reddy >Sent: Sunday, April 10, 2005 12:40 PM >To: sqr-users@sqrug.org >Subject: [sqr-users] Flat File > >Hi, > > I am reading a flat file and inserting into tables(Inbound >interface). I am having a problem reading it, when i reach end of file >it is still looking for data and taking it as empty record. The program >is working good except that the number of errors is added by 1 though >it's not. > >I use While loop for looping through the flat file and also i am >checking end of file condition too. Is this the bad flat file or am I >missing something? > >Thanks. Any input would be appreciated. > >_________________________________________________________________ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >______________________________________________________________________ >This email has been scanned by the MessageLabs Email Security System. >For more information please visit http://www.messagelabs.com/email >______________________________________________________________________ > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 11 20:27:51 2005 Date: Mon, 11 Apr 2005 19:27:17 -0600 From: marc pechaitis Subject: [sqr-users] blank line being inserted unexpectedly while issuing print commands Hello All - You've been super helpful to me in the past, and I've got another problem that has me stumped. I am writing a report that selects a row of data from a table and based on the data in that row, it may decide to omit the line from the report. So let's say I have table: row 1 - a1 row 2 - a2 row 3 - a3 row 4 - b1 row 5 - b2 row 6 - b3 row 7 - c1 row 8 - c2 row 9 - c3 And I know that, based on the content of row 5 (b2) that I want to omit rows 4-6 (the b's). I've got the logic working so that all three rows are omiitted, but for some reason the output is: a1 a2 a3 c1 c2 c3 and not: a1 a2 a3 c1 c2 c3 I'm just using a basic "print $var (+1,1)" command and have been through the code about a million times to see if I might have an extra "print" statement in my exclusion processing, but I can't find anything. Has anyone encountered anything like this? Any suggestions of things to check that could cause this? Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 11 20:42:13 2005 Date: Mon, 11 Apr 2005 21:41:21 -0400 From: "Larry Roux" Subject: Re: [sqr-users] blank line being inserted unexpectedly while issuingprint commands It appears that you are still printing a line in your loop, but the variable is coming out a space so you don't see the results. As a method of debugging try something like Let $var = $var || ' row: ' || some data from the row that might tell you which row is still printing. also, instead of blanking out the variable (Let $var = ' ') try putting something in there to see if that is, in fact, what is happening. Larry Roux Syracuse University lroux@syr.edu >>> fromthehills@gmail.com 04/11/05 9:27 PM >>> Hello All - You've been super helpful to me in the past, and I've got another problem that has me stumped. I am writing a report that selects a row of data from a table and based on the data in that row, it may decide to omit the line from the report. So let's say I have table: row 1 - a1 row 2 - a2 row 3 - a3 row 4 - b1 row 5 - b2 row 6 - b3 row 7 - c1 row 8 - c2 row 9 - c3 And I know that, based on the content of row 5 (b2) that I want to omit rows 4-6 (the b's). I've got the logic working so that all three rows are omiitted, but for some reason the output is: a1 a2 a3 c1 c2 c3 and not: a1 a2 a3 c1 c2 c3 I'm just using a basic "print $var (+1,1)" command and have been through the code about a million times to see if I might have an extra "print" statement in my exclusion processing, but I can't find anything. Has anyone encountered anything like this? Any suggestions of things to check that could cause this? Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 12 04:06:08 2005 Date: Tue, 12 Apr 2005 09:04:47 +0000 From: marc.taquoi@bluewin.ch Subject: =?ISO-8859-1?Q?Re=3A=20=5Bsqr=2Dusers=5D=20blank=20line=20being=20inserted=20unexpectedly=20while=09issuingprint=20commands?= >-- Message original -- >Date: Mon, 11 Apr 2005 21:41:21 -0400 >From: "Larry Roux" >To: >Subject: Re: [sqr-users] blank line being inserted unexpectedly while > issuingprint commands >Reply-To: "This list is for discussion about the SQR database reporting > language from Hyperion Solutions." > > >It appears that you are still printing a line in your loop, but the >variable is coming out a space so you don't see the results. As a >method of debugging try something like > >Let $var = $var || ' row: ' || some data from the row > >that might tell you which row is still printing. > >also, instead of blanking out the variable (Let $var = ' ') try putting >something in there to see if that is, in fact, what is happening. > > > > > >Larry Roux >Syracuse University >lroux@syr.edu > >>>> fromthehills@gmail.com 04/11/05 9:27 PM >>> >Hello All - >You've been super helpful to me in the past, and I've got another >problem that has me stumped. > >I am writing a report that selects a row of data from a table and >based on the data in that row, it may decide to omit the line from the >report. > >So let's say I have table: >row 1 - a1 >row 2 - a2 >row 3 - a3 >row 4 - b1 >row 5 - b2 >row 6 - b3 >row 7 - c1 >row 8 - c2 >row 9 - c3 > >And I know that, based on the content of row 5 (b2) that I want to >omit rows 4-6 (the b's). I've got the logic working so that all three >rows are omiitted, but for some reason the output is: > >a1 >a2 >a3 > >c1 >c2 >c3 > >and not: >a1 >a2 >a3 >c1 >c2 >c3 > >I'm just using a basic "print $var (+1,1)" command and have been >through the code about a million times to see if I might have an extra >"print" statement in my exclusion processing, but I can't find >anything. > >Has anyone encountered anything like this? Any suggestions of things >to check that could cause this? > >Thanks! >Marc > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users Marc TAQUOI Chemin des Vignes 1127 CLARMONT Fixe : +41 (0)21 624 21 27 Mobile : +41 (0)79 818 52 35 Email : marc.taquoi@bluewin.ch _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 12 05:11:48 2005 From: "Steve Cavill" Subject: RE: [sqr-users] blank line being inserted unexpectedly while issuingprint commands Date: Tue, 12 Apr 2005 20:10:12 +1000 Do you have a next-listing or position() command, they also cause line feeds. Steve -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of marc pechaitis Sent: Tuesday, 12 April 2005 11:27 AM To: sqr-users@sqrug.org Subject: [sqr-users] blank line being inserted unexpectedly while issuingprint commands Hello All - You've been super helpful to me in the past, and I've got another problem that has me stumped. I am writing a report that selects a row of data from a table and based on the data in that row, it may decide to omit the line from the report. So let's say I have table: row 1 - a1 row 2 - a2 row 3 - a3 row 4 - b1 row 5 - b2 row 6 - b3 row 7 - c1 row 8 - c2 row 9 - c3 And I know that, based on the content of row 5 (b2) that I want to omit rows 4-6 (the b's). I've got the logic working so that all three rows are omiitted, but for some reason the output is: a1 a2 a3 c1 c2 c3 and not: a1 a2 a3 c1 c2 c3 I'm just using a basic "print $var (+1,1)" command and have been through the code about a million times to see if I might have an extra "print" statement in my exclusion processing, but I can't find anything. Has anyone encountered anything like this? Any suggestions of things to check that could cause this? Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 12 08:41:00 2005 Date: Tue, 12 Apr 2005 07:40:23 -0600 From: marc pechaitis Subject: Re: [sqr-users] blank line being inserted unexpectedly while issuingprint commands Steve, This is what I am using for the processing of the report: @#@#@#@#@#@#@#@#@#@#@#start begin-procedure Get-Transcript-Info Columns 1 90 Let #bottom-line = 56 begin-Select A.REPORT_REQUEST_NBR, A.REQUEST_SEQ_NBR, C.TSCRPT_TYPE, A.REPORT_NUMBER, B.COPY_NUMBER, A.REPORT_LINE_NBR, A.TSCRPT_COMP_CODE, A.TSCRPT_COMP_DATA, A.DISPLAY_ATTR, B.TSCRPT_TITLE, B.TSCRPT_INS_ADDR1, B.TSCRPT_INS_ADDR2, B.TSCRPT_INS_ADDR3, B.TSCRPT_INS_ADDR4, B.TSCRPT_INS_ADDR5, B.TSCRPT_INS_ADDR6, B.TSCRPT_INS_ADDR7, B.TSCRPT_EM_ADDR1, B.TSCRPT_EM_ADDR2, B.TSCRPT_EM_ADDR3, B.TSCRPT_EM_ADDR4, B.TSCRPT_EM_ADDR5, B.TSCRPT_EM_ADDR6, B.TSCRPT_EM_ADDR7, B.TSCRPT_EM_ADDR8, B.TSCRPT_EM_ADDR9, B.TSCRPT_EM_ADDR10, B.TSCRPT_EM_ADDR11, Let $DisplayAttr = Rtrim(&A.DISPLAY_ATTR,' ') Let $TranscriptLine = Rtrim(&A.TSCRPT_COMP_DATA,' ') Let $TranscriptType = Rtrim(&C.TSCRPT_TYPE, ' ') Let $TrimmedTransLine = Ltrim($TranscriptLine, ' ') Let $OtherLine = 'Y' if #current-line >= #bottom-line Next-Column Goto-Top=1 At-End=NewPage Let $Subject = substr($TranscriptLine, 1, 8) Let $CatalogNbr = substr($TranscriptLine, 11, 10) Evaluate $TranscriptType When = 'OFFIC' do Proc-Transcript-Line-OFFIC break When = 'OFFEX' do Proc-Transcript-Line-OFFEX break When-Other if ($DisplayAttr = 'B') print $TranscriptLine (+1,1) bold else print $TranscriptLine (+1,1) end-if end-evaluate else Let $Subject = substr($TranscriptLine, 1, 8) Let $CatalogNbr = substr($TranscriptLine, 11, 10) Evaluate $TranscriptType When = 'OFFIC' do Proc-Transcript-Line-OFFIC break When = 'OFFEX' do Proc-Transcript-Line-OFFEX break When-Other if ($DisplayAttr = 'B') print $TranscriptLine (+1,1) bold else print $TranscriptLine (+1,1) end-if end-evaluate end-if FROM PS_SA_REPORT_RSLT A, PS_SA_RPT_RSLT_HDR B, PS_SA_REQUEST_HDR C WHERE A.REPORT_REQUEST_NBR = $ReptReqstID AND A.REQUEST_SEQ_NBR = $ReptReqstSeq AND A.REPORT_REQUEST_NBR = B.REPORT_REQUEST_NBR AND A.REPORT_REQUEST_NBR = $ReptReqstID AND A.REPORT_REQUEST_NBR = C.REPORT_REQUEST_NBR AND A.REQUEST_SEQ_NBR = B.REQUEST_SEQ_NBR AND A.REPORT_NUMBER = B.REPORT_NUMBER AND A.TSCRPT_COMP_CODE NOT LIKE 'T0%' AND A.TSCRPT_COMP_CODE NOT LIKE 'IN%' AND A.TSCRPT_COMP_CODE NOT LIKE 'EM%' ORDER BY 1, 2, 3, 5 end-Select end-procedure !Get-Transcript-Info @#@#@#@#@#@#@#@#@#@#@#end And I suspect that the lines: if #current-line >= #bottom-line Next-Column Goto-Top=1 At-End=NewPage are the ones that could be issuing the line extra line feeds...is this possible? Is there any way to supress this? (I have included these lines to print the report two columns of one "page" to a landscape sheet). Thanks, Marc On Apr 12, 2005 4:10 AM, Steve Cavill wrote: > Do you have a next-listing or position() command, they also cause line > feeds. > Steve > > -----Original Message----- > From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org > [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On > Behalf Of marc pechaitis > Sent: Tuesday, 12 April 2005 11:27 AM > To: sqr-users@sqrug.org > Subject: [sqr-users] blank line being inserted unexpectedly while > issuingprint commands > > Hello All - > You've been super helpful to me in the past, and I've got another problem > that has me stumped. > > I am writing a report that selects a row of data from a table and based on > the data in that row, it may decide to omit the line from the report. > > So let's say I have table: > row 1 - a1 > row 2 - a2 > row 3 - a3 > row 4 - b1 > row 5 - b2 > row 6 - b3 > row 7 - c1 > row 8 - c2 > row 9 - c3 > > And I know that, based on the content of row 5 (b2) that I want to omit rows > 4-6 (the b's). I've got the logic working so that all three rows are > omiitted, but for some reason the output is: > > a1 > a2 > a3 > > c1 > c2 > c3 > > and not: > a1 > a2 > a3 > c1 > c2 > c3 > > I'm just using a basic "print $var (+1,1)" command and have been through the > code about a million times to see if I might have an extra "print" > statement in my exclusion processing, but I can't find anything. > > Has anyone encountered anything like this? Any suggestions of things to > check that could cause this? > > Thanks! > Marc > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 12 08:47:38 2005 Date: Tue, 12 Apr 2005 15:43:33 +0200 From: edwin.hommes@bluewin.ch Subject: RE: [sqr-users] blank line being inserted unexpectedly while issuing Hi Marc, As suggested you could try something like "print $var (+1,1) | 'X' "=20 to see if your select parses a blank value Some thing else might be your pagesize if the break appears at regular inte= vals (every 42 lines or so). If so, you should increase your page-size to 32000. Alternatively you could change your print command to a writeline command. Hope this helps, Edwin Beginn der beigef=FCgten Nachricht From: marc pechaitis Subject: [sqr-users] blank line being inserted unexpectedly while issuing print commands Date: Mon, 11 Apr 2005 19:27:17 -0600 To: sqr-users@sqrug.org Hello All - You've been super helpful to me in the past, and I've got another problem that has me stumped. I am writing a report that selects a row of data from a table and based on the data in that row, it may decide to omit the line from the report. So let's say I have table: row 1 - a1 row 2 - a2 row 3 - a3 row 4 - b1 row 5 - b2 row 6 - b3 row 7 - c1 row 8 - c2 row 9 - c3 And I know that, based on the content of row 5 (b2) that I want to omit rows 4-6 (the b's). I've got the logic working so that all three rows are omiitted, but for some reason the output is: a1 a2 a3 c1 c2 c3 and not: a1 a2 a3 c1 c2 c3 I'm just using a basic "print $var (+1,1)" command and have been through the code about a million times to see if I might have an extra "print" statement in my exclusion processing, but I can't find anything. Has anyone encountered anything like this? Any suggestions of things to check that could cause this? Thanks! Marc _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 12 08:50:38 2005 From: "Lynds,Rick" Subject: RE: [sqr-users] blank line being inserted unexpectedly whileissui ngprint commands Date: Tue, 12 Apr 2005 06:46:45 -0700 -----Original Message----- From: sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org [mailto:sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org] On Behalf Of marc pechaitis Sent: Tuesday, April 12, 2005 6:40 AM To: This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions. Subject: Re: [sqr-users] blank line being inserted unexpectedly whileissuingprint commands Steve, This is what I am using for the processing of the report: @#@#@#@#@#@#@#@#@#@#@#start begin-procedure Get-Transcript-Info Columns 1 90 Let #bottom-line = 56 begin-Select A.REPORT_REQUEST_NBR, A.REQUEST_SEQ_NBR, C.TSCRPT_TYPE, A.REPORT_NUMBER, B.COPY_NUMBER, A.REPORT_LINE_NBR, A.TSCRPT_COMP_CODE, A.TSCRPT_COMP_DATA, A.DISPLAY_ATTR, B.TSCRPT_TITLE, B.TSCRPT_INS_ADDR1, B.TSCRPT_INS_ADDR2, B.TSCRPT_INS_ADDR3, B.TSCRPT_INS_ADDR4, B.TSCRPT_INS_ADDR5, B.TSCRPT_INS_ADDR6, B.TSCRPT_INS_ADDR7, B.TSCRPT_EM_ADDR1, B.TSCRPT_EM_ADDR2, B.TSCRPT_EM_ADDR3, B.TSCRPT_EM_ADDR4, B.TSCRPT_EM_ADDR5, B.TSCRPT_EM_ADDR6, B.TSCRPT_EM_ADDR7, B.TSCRPT_EM_ADDR8, B.TSCRPT_EM_ADDR9, B.TSCRPT_EM_ADDR10, B.TSCRPT_EM_ADDR11, Let $DisplayAttr = Rtrim(&A.DISPLAY_ATTR,' ') Let $TranscriptLine = Rtrim(&A.TSCRPT_COMP_DATA,' ') Let $TranscriptType = Rtrim(&C.TSCRPT_TYPE, ' ') Let $TrimmedTransLine = Ltrim($TranscriptLine, ' ') Let $OtherLine = 'Y' if #current-line >= #bottom-line Next-Column Goto-Top=1 At-End=NewPage Let $Subject = substr($TranscriptLine, 1, 8) Let $CatalogNbr = substr($TranscriptLine, 11, 10) Evaluate $TranscriptType When = 'OFFIC' do Proc-Transcript-Line-OFFIC break When = 'OFFEX' do Proc-Transcript-Line-OFFEX break When-Other if ($DisplayAttr = 'B') print $TranscriptLine (+1,1) bold else print $TranscriptLine (+1,1) end-if end-evaluate else Let $Subject = substr($TranscriptLine, 1, 8) Let $CatalogNbr = substr($TranscriptLine, 11, 10) Evaluate $TranscriptType When = 'OFFIC' do Proc-Transcript-Line-OFFIC break When = 'OFFEX' do Proc-Transcript-Line-OFFEX break When-Other if ($DisplayAttr = 'B') print $TranscriptLine (+1,1) bold else print $TranscriptLine (+1,1) end-if end-evaluate end-if FROM PS_SA_REPORT_RSLT A, PS_SA_RPT_RSLT_HDR B, PS_SA_REQUEST_HDR C WHERE A.REPORT_REQUEST_NBR = $ReptReqstID AND A.REQUEST_SEQ_NBR = $ReptReqstSeq AND A.REPORT_REQUEST_NBR = B.REPORT_REQUEST_NBR AND A.REPORT_REQUEST_NBR = $ReptReqstID AND A.REPORT_REQUEST_NBR = C.REPORT_REQUEST_NBR AND A.REQUEST_SEQ_NBR = B.REQUEST_SEQ_NBR AND A.REPORT_NUMBER = B.REPORT_NUMBER AND A.TSCRPT_COMP_CODE NOT LIKE 'T0%' AND A.TSCRPT_COMP_CODE NOT LIKE 'IN%' AND A.TSCRPT_COMP_CODE NOT LIKE 'EM%' ORDER BY 1, 2, 3, 5 end-Select end-procedure !Get-Transcript-Info @#@#@#@#@#@#@#@#@#@#@#end And I suspect that the lines: if #current-line >= #bottom-line Next-Column Goto-Top=1 At-End=NewPage are the ones that could be issuing the line extra line feeds...is this possible? Is there any way to supress this? (I have included these lines to print the report two columns of one "page" to a landscape sheet). Thanks, Marc On Apr 12, 2005 4:10 AM, Steve Cavill wrote: > Do you have a next-listing or position() command, they also cause line > feeds. > Steve > > -----Original Message----- > From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org > [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] > On Behalf Of marc pechaitis > Sent: Tuesday, 12 April 2005 11:27 AM > To: sqr-users@sqrug.org > Subject: [sqr-users] blank line being inserted unexpectedly while > issuingprint commands > > Hello All - > You've been super helpful to me in the past, and I've got another > problem that has me stumped. > > I am writing a report that selects a row of data from a table and > based on the data in that row, it may decide to omit the line from the report. > > So let's say I have table: > row 1 - a1 > row 2 - a2 > row 3 - a3 > row 4 - b1 > row 5 - b2 > row 6 - b3 > row 7 - c1 > row 8 - c2 > row 9 - c3 > > And I know that, based on the content of row 5 (b2) that I want to > omit rows > 4-6 (the b's). I've got the logic working so that all three rows are > omiitted, but for some reason the output is: > > a1 > a2 > a3 > > c1 > c2 > c3 > > and not: > a1 > a2 > a3 > c1 > c2 > c3 > > I'm just using a basic "print $var (+1,1)" command and have been > through the code about a million times to see if I might have an extra "print" > statement in my exclusion processing, but I can't find anything. > > Has anyone encountered anything like this? Any suggestions of things > to check that could cause this? > > Thanks! > Marc > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 14 15:22:02 2005 Date: Thu, 14 Apr 2005 16:21:24 -0400 From: "Bolton, Kathleen" Subject: [sqr-users] How to get the PDF Format when direct printing I'm a PeopleSoft user and I'm working with the Purchase Order printing SQR (POPO005.sqr). I've modified the code to format the PO and it prints great when the PDF format is selected. The problem is my users want to send the output directly to the printer ---- Type =3D Printer, Format=3DHP. When I send the output directly to the printer the formatting is off ---- margins are pushed out, footer goes to multiple pages, boxes are cut-off. =20 Is there an easy way to retain the formatting and get the 'direct to printer' option to work? I'd rather not modify the SQR further because I'll just have a printer version that works and then the PDF option will be off. =20 Any suggestions? =20 Kathy Bolton _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 10:16:10 2005 Date: Fri, 15 Apr 2005 11:15:14 -0400 From: "Kaithi, Murali" Subject: [sqr-users] Insert duplicates Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 10:55:38 2005 Subject: RE: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 11:54:48 -0400 From: "Kaithi, Murali" Hi Gina, Thanks for your response. The value of #sql-status is -9 Even if I added break its doing the same thing. I don't believe that the Current value of -9 and when-other are executing the code under the when-other clause. Any suggestions. Thanks, Murali -----Original Message----- From: Gina Bencke [mailto:g.bencke@csuohio.edu]=20 Sent: Friday, April 15, 2005 11:28 AM To: Kaithi, Murali Subject: RE: [sqr-users] Insert duplicates Kaithi, What is the value of #sql-status? If it is -9 and you want to skip the error you need to add a break statement=20 when =3D -9 !unique constraint for Oracle Environments break Currently values of -9 and when-other are executing the code under the when-other clause Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:15 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] Insert duplicates Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 10:58:43 2005 Date: Fri, 15 Apr 2005 11:54:17 -0400 From: "Jamie Harris" Subject: Re: [sqr-users] Insert duplicates One sure way to prevent a dupe is to perform a select first and look for a row matching the keys of what you are about to insert. This works well if you are inserting rows one at a time - perhaps from a datafile or something. Like this: let #found = 0 begin-select FIELD let #found = 1 from TABLE WHERE (etc.) end-select if (not #found) begin-sql INSERT INTO (etc.) end-sql end-if Of course this slows everything down - so be aware of that. ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> Murali.Kaithi@spencergifts.com 4/15/2005 11:15 AM >>> Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like begin-sql ON-ERROR=SQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when = 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when = 6100 !DB2 error for empty-table result set break #end-if when = -99999 !Token "when" clause for non-DB2 environments when = -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement = ' display $SQL-STATEMENT display 'SQL Status =' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error = ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 11:13:25 2005 Subject: RE: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 11:12:50 -0500 From: "Knapp, Richard" A faster way (one pass) may be to order the select on the key of interest, store the key in a temp variable, get the next row, compare the key values and act accordingly, replace the value in the temp variable, get the next row, etc.. You have to make sure you handle the first and last rows appropriately in this method. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Jamie Harris Sent: Friday, April 15, 2005 10:54 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Insert duplicates =20 One sure way to prevent a dupe is to perform a select first and look for a row matching the keys of what you are about to insert.=20=20 =20 This works well if you are inserting rows one at a time - perhaps from a datafile or something.=20=20 =20 Like this: =20 let #found =3D 0 begin-select FIELD let #found =3D 1 from TABLE WHERE (etc.) end-select =20 if (not #found) begin-sql INSERT INTO (etc.) end-sql end-if =20 Of course this slows everything down - so be aware of that. =20 ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> Murali.Kaithi@spencergifts.com 4/15/2005 11:15 AM >>> Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 11:18:38 2005 Subject: RE: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 12:17:27 -0400 From: "Gallagher, Neil \(IT HR Support\)" You might try adding a clause to your Insert SQL to say something like and not exists=20 (Select * from target-table Where target.key1=3D source.key1 And target.key2=3D source.key2 And target.key3=3D source.key3 ) This would nip the errors in the bud. Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 -----Original Message----- From: sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org [mailto:sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:55 AM To: g.bencke@csuohio.edu Cc: This list is for discussion about the SQR database reportinglanguagefromHyperion Solutions. Subject: RE: [sqr-users] Insert duplicates Hi Gina, Thanks for your response. The value of #sql-status is -9 Even if I added break its doing the same thing. I don't believe that the Current value of -9 and when-other are executing the code under the when-other clause. Any suggestions. Thanks, Murali -----Original Message----- From: Gina Bencke [mailto:g.bencke@csuohio.edu]=20 Sent: Friday, April 15, 2005 11:28 AM To: Kaithi, Murali Subject: RE: [sqr-users] Insert duplicates Kaithi, What is the value of #sql-status? If it is -9 and you want to skip the error you need to add a break statement=20 when =3D -9 !unique constraint for Oracle Environments break Currently values of -9 and when-other are executing the code under the when-other clause Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:15 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] Insert duplicates Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 13:38:08 2005 Subject: RE: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 13:37:25 -0500 From: "Turner, Ivan" To really, truly do it in one pass, use "exists" INSERT INTO INVC_CUST_REPORT (CUSTOMER_ACCT_ID, REPORT_ID) SELECT #customer_id, 1 FROM DUAL WHERE NOT EXISTS (SELECT 'X' FROM INVC_CUST_REPORT WHERE CUSTOMER_ACCT_ID =3D #customer_id AND REPORT_ID =3D 1) and exists ( select 'x' from customer_acct where customer_acct_id =3D #Customer_ID ) -----Original Message----- From: sqr-users-bounces+ivan.turner=3Dqwest.com@sqrug.org [mailto:sqr-users-bounces+ivan.turner=3Dqwest.com@sqrug.org] On Behalf Of Gallagher, Neil (IT HR Support) Sent: Friday, April 15, 2005 12:17 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions.; g.bencke@csuohio.edu Subject: RE: [sqr-users] Insert duplicates You might try adding a clause to your Insert SQL to say something like and not exists=20 (Select * from target-table Where target.key1=3D source.key1 And target.key2=3D source.key2 And target.key3=3D source.key3 ) This would nip the errors in the bud. Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 -----Original Message----- From: sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org [mailto:sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:55 AM To: g.bencke@csuohio.edu Cc: This list is for discussion about the SQR database reportinglanguagefromHyperion Solutions. Subject: RE: [sqr-users] Insert duplicates Hi Gina, Thanks for your response. The value of #sql-status is -9 Even if I added break its doing the same thing. I don't believe that the Current value of -9 and when-other are executing the code under the when-other clause. Any suggestions. Thanks, Murali -----Original Message----- From: Gina Bencke [mailto:g.bencke@csuohio.edu]=20 Sent: Friday, April 15, 2005 11:28 AM To: Kaithi, Murali Subject: RE: [sqr-users] Insert duplicates Kaithi, What is the value of #sql-status? If it is -9 and you want to skip the error you need to add a break statement=20 when =3D -9 !unique constraint for Oracle Environments break Currently values of -9 and when-other are executing the code under the when-other clause Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:15 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] Insert duplicates Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 14:43:16 2005 From: Al H Subject: Re: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 12:38:24 -0700 I've found that the -9 in #sql-status is unreliable in Oracle environments. Use $sql-error instead. Try this: if instr($sql-error,'unique constraint',0) =3D 0 ! Not a duplicate key else ! duplicate key end-if On Fri, 15 Apr 2005 11:54:48 -0400, you wrote: >Hi Gina, >Thanks for your response. >The value of #sql-status is -9 >Even if I added break its doing the same thing. >I don't believe that the Current value of -9 and when-other are >executing the code under the when-other clause. >Any suggestions. > >Thanks, >Murali > >-----Original Message----- >From: Gina Bencke [mailto:g.bencke@csuohio.edu]=20 >Sent: Friday, April 15, 2005 11:28 AM >To: Kaithi, Murali >Subject: RE: [sqr-users] Insert duplicates > > >Kaithi, > >What is the value of #sql-status? If it is -9 and you want to skip the >error you need to add a break statement=20 > when =3D -9 !unique constraint for Oracle Environments > break > >Currently values of -9 and when-other are executing the code under the >when-other clause > >Gina Bencke >216-875-9630 >=20 >=20 >-----Original Message----- >From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org >[mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of >Kaithi, Murali >Sent: Friday, April 15, 2005 11:15 AM >To: This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions. >Subject: [sqr-users] Insert duplicates > >Hi, >I am trying to insert into a table from another table. >If I get across the duplicates, I would like to skip them and insert >rest of the rows. >I remember the below code worked before but is not now, I am confused. >Could someone help me. >My insert statement would start like=20 > >begin-sql ON-ERROR=3DSQL-Error1 > >And below is my SQL-Error1 procedure > >begin-procedure SQL-Error1 > show '#sql-status is ' #sql-status > evaluate #sql-status >#ifdef DB2 > when =3D 6100 !DB2 error for empty-table result set > break >#end-if > >#ifdef DB2UNIX > when =3D 6100 !DB2 error for empty-table result set > break >#end-if > > when =3D -99999 !Token "when" clause for non-DB2 environments > when =3D -9 !unique constraint for Oracle Environments > when-other > display $sqr-program noline > display ': ' noline > display $ReportID noline > display ' - SQL Statement =3D ' > display $SQL-STATEMENT > display 'SQL Status =3D' noline > display #sql-status 99999 noline > display ' ' noline > display 'SQL Error =3D ' noline > display $sql-error > display $Sql-Msg > SHOW $loadrecord > Do Rollback-Transaction > stop > end-evaluate >end-procedure SQL-Error1 > >Thanks, >Murali > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 14:56:00 2005 Date: Fri, 15 Apr 2005 15:54:55 -0400 From: "Gallagher, Neil \(IT HR Support\)" Subject: [sqr-users] Getting complete listing of SQR code We run SQRs as batch jobs on a z/OS mainframe. When we have a syntax error, the diagnostics show line numbers, but we do not get a full listing that expands all the included members. =20 Is there any way to get a full listing? =20 Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 15:07:19 2005 Subject: RE: [sqr-users] Getting complete listing of SQR code Date: Fri, 15 Apr 2005 15:06:39 -0500 From: "Knapp, Richard" I have never found a way to get a comprehensive line number. The best you can hope for is the name of the module where the error occurred (in my experience). Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Gallagher, Neil (IT HR Support) Sent: Friday, April 15, 2005 2:55 PM To: sqr-users@sqrug.org Subject: [sqr-users] Getting complete listing of SQR code We run SQRs as batch jobs on a z/OS mainframe. When we have a syntax error, the diagnostics show line numbers, but we do not get a full listing that expands all the included members. =20 Is there any way to get a full listing? =20 Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 15:10:16 2005 Subject: RE: [sqr-users] Insert duplicates Date: Fri, 15 Apr 2005 15:08:41 -0500 From: "Raja Iqbal" Any duplicates can be ignored using flag concept.=20 e.g: Before inserting record into table, check flag value True/False. i.e: var1, var2, var3 --> Recordset variables fvar1, fvar2, fvar3 --> Flag Variables or Temp Variables. If var1 =3D fvar1 and var2 =3D fvar2 and var3 =3D fvar3 Then ** It means previous record selected or inserted is same=20 --- Ignore Insert statement. Else --- execute insert statement=20 --- assign variable values to flag variables. End If Try out this. Raja -----Original Message----- From: sqr-users-bounces+riqbal=3Droosevelt.edu@sqrug.org [mailto:sqr-users-bounces+riqbal=3Droosevelt.edu@sqrug.org]On Behalf Of Turner, Ivan Sent: Friday, April 15, 2005 1:37 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions.; g.bencke@csuohio.edu Subject: RE: [sqr-users] Insert duplicates To really, truly do it in one pass, use "exists" INSERT INTO INVC_CUST_REPORT (CUSTOMER_ACCT_ID, REPORT_ID) SELECT #customer_id, 1 FROM DUAL WHERE NOT EXISTS (SELECT 'X' FROM INVC_CUST_REPORT WHERE CUSTOMER_ACCT_ID =3D #customer_id AND REPORT_ID =3D 1) and exists ( select 'x' from customer_acct where customer_acct_id =3D #Customer_ID ) -----Original Message----- From: sqr-users-bounces+ivan.turner=3Dqwest.com@sqrug.org [mailto:sqr-users-bounces+ivan.turner=3Dqwest.com@sqrug.org] On Behalf Of Gallagher, Neil (IT HR Support) Sent: Friday, April 15, 2005 12:17 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions.; g.bencke@csuohio.edu Subject: RE: [sqr-users] Insert duplicates You might try adding a clause to your Insert SQL to say something like and not exists=20 (Select * from target-table Where target.key1=3D source.key1 And target.key2=3D source.key2 And target.key3=3D source.key3 ) This would nip the errors in the bud. Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 -----Original Message----- From: sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org [mailto:sqr-users-bounces+ngallagher=3Dunumprovident.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:55 AM To: g.bencke@csuohio.edu Cc: This list is for discussion about the SQR database reportinglanguagefromHyperion Solutions. Subject: RE: [sqr-users] Insert duplicates Hi Gina, Thanks for your response. The value of #sql-status is -9 Even if I added break its doing the same thing. I don't believe that the Current value of -9 and when-other are executing the code under the when-other clause. Any suggestions. Thanks, Murali -----Original Message----- From: Gina Bencke [mailto:g.bencke@csuohio.edu]=20 Sent: Friday, April 15, 2005 11:28 AM To: Kaithi, Murali Subject: RE: [sqr-users] Insert duplicates Kaithi, What is the value of #sql-status? If it is -9 and you want to skip the error you need to add a break statement=20 when =3D -9 !unique constraint for Oracle Environments break Currently values of -9 and when-other are executing the code under the when-other clause Gina Bencke 216-875-9630 =20 =20 -----Original Message----- From: sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=3Dbencke.com@sqrug.org] On Behalf Of Kaithi, Murali Sent: Friday, April 15, 2005 11:15 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] Insert duplicates Hi, I am trying to insert into a table from another table. If I get across the duplicates, I would like to skip them and insert rest of the rows. I remember the below code worked before but is not now, I am confused. Could someone help me. My insert statement would start like=20 begin-sql ON-ERROR=3DSQL-Error1 And below is my SQL-Error1 procedure begin-procedure SQL-Error1 show '#sql-status is ' #sql-status evaluate #sql-status #ifdef DB2 when =3D 6100 !DB2 error for empty-table result set break #end-if #ifdef DB2UNIX when =3D 6100 !DB2 error for empty-table result set break #end-if when =3D -99999 !Token "when" clause for non-DB2 environments when =3D -9 !unique constraint for Oracle Environments when-other display $sqr-program noline display ': ' noline display $ReportID noline display ' - SQL Statement =3D ' display $SQL-STATEMENT display 'SQL Status =3D' noline display #sql-status 99999 noline display ' ' noline display 'SQL Error =3D ' noline display $sql-error display $Sql-Msg SHOW $loadrecord Do Rollback-Transaction stop end-evaluate end-procedure SQL-Error1 Thanks, Murali ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 15:16:18 2005 Subject: RE: [sqr-users] Getting complete listing of SQR code Date: Fri, 15 Apr 2005 15:17:33 -0500 From: "Raja Iqbal" Follow SQR Server Version 4.3.4 and the bin directory contains the SQR Serv= er executable files and any associated run-time files. Check the option for= bin or run time file which should provide to view detailed error listing. Also the sample directory contains sample SQR programs and associated data = files. The tutorial directory contains SQR tutorial programs, and tutorial = output files used in the SQR User's Guide Raja Iqbal -----Original Message----- From: sqr-users-bounces+riqbal=3Droosevelt.edu@sqrug.org [mailto:sqr-users-bounces+riqbal=3Droosevelt.edu@sqrug.org]On Behalf Of Knapp, Richard Sent: Friday, April 15, 2005 3:07 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: RE: [sqr-users] Getting complete listing of SQR code I have never found a way to get a comprehensive line number. The best you can hope for is the name of the module where the error occurred (in my experience). Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Gallagher, Neil (IT HR Support) Sent: Friday, April 15, 2005 2:55 PM To: sqr-users@sqrug.org Subject: [sqr-users] Getting complete listing of SQR code We run SQRs as batch jobs on a z/OS mainframe. When we have a syntax error, the diagnostics show line numbers, but we do not get a full listing that expands all the included members. =20 Is there any way to get a full listing? =20 Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 15:21:57 2005 Subject: RE: [sqr-users] Insert duplicates Date: Sat, 16 Apr 2005 01:47:22 +0530 From: "Karunakaran Perumbrayoor" --===============1948603872== content-class: urn:content-classes:message Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 TXVyYWxpLA0KIA0KICAgICAgICAgIERpZCB1IHRyeSBwcmludGluZyB0aGUg I3NxbC1zdGF0dXM/IFdoeSBkbyBVIG5lZWQgdG8gdXNlIHByb2NlZHVyZXMg bGlrZSBTUUwtRXJyb3IxLiBUaGVyZSB3aWxsIGJlIGF0IHByZXNlbnQgb25s eSBhbiBVbmlxdWUgQ29uc3RyYWludCBFcnJvciB0byBiZSB0YWtlbiBjYXJl IG9mLiBJIGRvbnQgc2VlIHVyIGNvZGUgY2hlY2tpbmcgZm9yIG90aGVyIGNv bmRpdGlvbnMuIEkgdGhpbmsgYnkgc29tZSB3YXksIHlvdXIgY29kZSBpcyBl eGVjdXRpbmcgd2hlbi1vdGhlciBsb29wIGFuZCBwcm9jZXNzaW5nIFJvbGxC YWNrLVRyYW5zYWN0aW9uIFByb2NlZHVyZSB3aGljaCB3aWxsIGJlIHNlZW4g aW4gc3FsZXJyLnNxYy4gVGhlbiBhIFN0b3AgaXMgaXNzdWVkLiBJbiB0aGUg ZW5kLCB0aGUgUHJvZ3JhbSBhYm9ydHMgZHVlIHRvIFVuaXF1ZSBDb25zdHJh aW50LiBTbyB3aGF0IGRvIFUgZG8gZm9yIHRoYXQ/Pw0KIA0Kd2hlbi1vdGhl cg0KPiAgICAgIGRpc3BsYXkgJHNxci1wcm9ncmFtIG5vbGluZQ0KPiAgICAg IGRpc3BsYXkgJzogJyBub2xpbmUNCj4gICAgICBkaXNwbGF5ICRSZXBvcnRJ RCBub2xpbmUNCj4gICAgICBkaXNwbGF5ICcgLSBTUUwgU3RhdGVtZW50ID0g Jw0KPiAgICAgIGRpc3BsYXkgJFNRTC1TVEFURU1FTlQNCj4gICAgICBkaXNw bGF5ICdTUUwgU3RhdHVzID0nIG5vbGluZQ0KPiAgICAgIGRpc3BsYXkgI3Nx bC1zdGF0dXMgOTk5OTkgbm9saW5lDQo+ICAgICAgZGlzcGxheSAnICcgbm9s aW5lDQo+ICAgICAgZGlzcGxheSAnU1FMIEVycm9yICA9ICcgbm9saW5lDQo+ ICAgICAgZGlzcGxheSAkc3FsLWVycm9yDQo+ICAgICAgZGlzcGxheSAkU3Fs LU1zZw0KPiAgIFNIT1cgICRsb2FkcmVjb3JkDQo+ICAgICAgRG8gUm9sbGJh Y2stVHJhbnNhY3Rpb24NCj4gICAgICBzdG9wDQogDQogDQpJdCBpcyBiZXR0 ZXIsIFUgZG8gYSBkaXNwbGF5IG9mIHRoZSBlcnJvciBtZXNzYWdlIGFuZCBz dGF0dXMuIERvbnQgZG8gYW55IHN1Y2ggYWN0aXZpdGllcyBsaWtlIFJvbGxi YWNrIG9yIFN0b3AuIFRoYXQgc2hvdWxkIHNlcnZlIHRoZSBwdXJwb3NlLg0K WW91ciBzZWxlY3Qgd2lsbCBjb250aW51ZSB0byBwcm9jZXNzIHJlc3Qgb2Yg dGhlIHJvd3MuDQogDQpSZWdhcmRzLi4uDQpLYXJ1bg0KDQoJLS0tLS1Pcmln aW5hbCBNZXNzYWdlLS0tLS0gDQoJRnJvbTogQWwgSCBbbWFpbHRvOm1haWxs aXN0c0BzdGFyYnVja2submV0XSANCglTZW50OiBTYXQgMTYtQXByLTIwMDUg MTowOCBBTSANCglUbzogc3FyLXVzZXJzQHNxcnVnLm9yZyANCglDYzogDQoJ U3ViamVjdDogUmU6IFtzcXItdXNlcnNdIEluc2VydCBkdXBsaWNhdGVzDQoJ DQoJDQpJJ3ZlIGZvdW5kIHRoYXQgdGhlIC05IGluICNzcWwtc3RhdHVzIGlz IHVucmVsaWFibGUgaW4gT3JhY2xlDQplbnZpcm9ubWVudHMuIFVzZSAkc3Fs LWVycm9yIGluc3RlYWQuICBUcnkgdGhpczoNCg0KICAgaWYgaW5zdHIoJHNx bC1lcnJvciwndW5pcXVlIGNvbnN0cmFpbnQnLDApID0gIDANCiAgICAgICAh IE5vdCBhIGR1cGxpY2F0ZSBrZXkNCiAgZWxzZQ0KICAgICAgICEgZHVwbGlj YXRlIGtleQ0KICBlbmQtaWYNCg0KDQpPbiBGcmksIDE1IEFwciAyMDA1IDEx OjU0OjQ4IC0wNDAwLCB5b3Ugd3JvdGU6DQoNCj5IaSBHaW5hLA0KPlRoYW5r cyBmb3IgeW91ciByZXNwb25zZS4NCj5UaGUgdmFsdWUgb2YgI3NxbC1zdGF0 dXMgaXMgLTkNCj5FdmVuIGlmIEkgYWRkZWQgYnJlYWsgaXRzIGRvaW5nIHRo ZSBzYW1lIHRoaW5nLg0KPkkgZG9uJ3QgYmVsaWV2ZSB0aGF0IHRoZSBDdXJy ZW50IHZhbHVlIG9mIC05IGFuZCB3aGVuLW90aGVyIGFyZQ0KPmV4ZWN1dGlu ZyB0aGUgY29kZSB1bmRlciB0aGUgd2hlbi1vdGhlciBjbGF1c2UuDQo+QW55 IHN1Z2dlc3Rpb25zLg0KPg0KPlRoYW5rcywNCj5NdXJhbGkNCj4NCj4tLS0t LU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPkZyb206IEdpbmEgQmVuY2tlIFtt YWlsdG86Zy5iZW5ja2VAY3N1b2hpby5lZHVdDQo+U2VudDogRnJpZGF5LCBB cHJpbCAxNSwgMjAwNSAxMToyOCBBTQ0KPlRvOiBLYWl0aGksIE11cmFsaQ0K PlN1YmplY3Q6IFJFOiBbc3FyLXVzZXJzXSBJbnNlcnQgZHVwbGljYXRlcw0K Pg0KPg0KPkthaXRoaSwNCj4NCj5XaGF0IGlzIHRoZSB2YWx1ZSBvZiAjc3Fs LXN0YXR1cz8gIElmIGl0IGlzIC05IGFuZCB5b3Ugd2FudCB0byBza2lwIHRo ZQ0KPmVycm9yIHlvdSBuZWVkIHRvIGFkZCBhIGJyZWFrIHN0YXRlbWVudA0K PiAgICB3aGVuID0gLTkgICAgICAhdW5pcXVlIGNvbnN0cmFpbnQgZm9yIE9y YWNsZSBFbnZpcm9ubWVudHMNCj4gICAgIGJyZWFrDQo+DQo+Q3VycmVudGx5 IHZhbHVlcyBvZiAtOSBhbmQgd2hlbi1vdGhlciBhcmUgZXhlY3V0aW5nIHRo ZSBjb2RlIHVuZGVyIHRoZQ0KPndoZW4tb3RoZXIgY2xhdXNlDQo+DQo+R2lu YSBCZW5ja2UNCj4yMTYtODc1LTk2MzANCj4NCj4NCj4tLS0tLU9yaWdpbmFs IE1lc3NhZ2UtLS0tLQ0KPkZyb206IHNxci11c2Vycy1ib3VuY2VzK2dpbmEu d29yaz1iZW5ja2UuY29tQHNxcnVnLm9yZw0KPlttYWlsdG86c3FyLXVzZXJz LWJvdW5jZXMrZ2luYS53b3JrPWJlbmNrZS5jb21Ac3FydWcub3JnXSBPbiBC ZWhhbGYgT2YNCj5LYWl0aGksIE11cmFsaQ0KPlNlbnQ6IEZyaWRheSwgQXBy aWwgMTUsIDIwMDUgMTE6MTUgQU0NCj5UbzogVGhpcyBsaXN0IGlzIGZvciBk aXNjdXNzaW9uIGFib3V0IHRoZSBTUVIgZGF0YWJhc2UgcmVwb3J0aW5nbGFu Z3VhZ2UNCj5mcm9tSHlwZXJpb24gU29sdXRpb25zLg0KPlN1YmplY3Q6IFtz cXItdXNlcnNdIEluc2VydCBkdXBsaWNhdGVzDQo+DQo+SGksDQo+SSBhbSB0 cnlpbmcgdG8gaW5zZXJ0IGludG8gYSB0YWJsZSBmcm9tIGFub3RoZXIgdGFi bGUuDQo+SWYgSSBnZXQgYWNyb3NzIHRoZSBkdXBsaWNhdGVzLCBJIHdvdWxk IGxpa2UgdG8gc2tpcCB0aGVtIGFuZCBpbnNlcnQNCj5yZXN0IG9mIHRoZSBy b3dzLg0KPkkgcmVtZW1iZXIgdGhlIGJlbG93IGNvZGUgd29ya2VkIGJlZm9y ZSBidXQgaXMgbm90IG5vdywgSSBhbSBjb25mdXNlZC4NCj5Db3VsZCBzb21l b25lIGhlbHAgbWUuDQo+TXkgaW5zZXJ0IHN0YXRlbWVudCB3b3VsZCBzdGFy dCBsaWtlDQo+DQo+YmVnaW4tc3FsIE9OLUVSUk9SPVNRTC1FcnJvcjENCj4N Cj5BbmQgYmVsb3cgaXMgbXkgU1FMLUVycm9yMSBwcm9jZWR1cmUNCj4NCj5i ZWdpbi1wcm9jZWR1cmUgU1FMLUVycm9yMQ0KPiAgc2hvdyAnI3NxbC1zdGF0 dXMgaXMgJyAjc3FsLXN0YXR1cw0KPiAgZXZhbHVhdGUgI3NxbC1zdGF0dXMN Cj4jaWZkZWYgREIyDQo+ICAgIHdoZW4gPSA2MTAwICAgICFEQjIgZXJyb3Ig Zm9yIGVtcHR5LXRhYmxlIHJlc3VsdCBzZXQNCj4gICAgICBicmVhaw0KPiNl bmQtaWYNCj4NCj4jaWZkZWYgREIyVU5JWA0KPiAgICB3aGVuID0gNjEwMCAg ICAhREIyIGVycm9yIGZvciBlbXB0eS10YWJsZSByZXN1bHQgc2V0DQo+ICAg ICAgYnJlYWsNCj4jZW5kLWlmDQo+DQo+ICAgIHdoZW4gPSAtOTk5OTkgICFU b2tlbiAid2hlbiIgY2xhdXNlIGZvciBub24tREIyIGVudmlyb25tZW50cw0K PiAgICB3aGVuID0gLTkgICAgICAhdW5pcXVlIGNvbnN0cmFpbnQgZm9yIE9y YWNsZSBFbnZpcm9ubWVudHMNCj4gICAgd2hlbi1vdGhlcg0KPiAgICAgIGRp c3BsYXkgJHNxci1wcm9ncmFtIG5vbGluZQ0KPiAgICAgIGRpc3BsYXkgJzog JyBub2xpbmUNCj4gICAgICBkaXNwbGF5ICRSZXBvcnRJRCBub2xpbmUNCj4g ICAgICBkaXNwbGF5ICcgLSBTUUwgU3RhdGVtZW50ID0gJw0KPiAgICAgIGRp c3BsYXkgJFNRTC1TVEFURU1FTlQNCj4gICAgICBkaXNwbGF5ICdTUUwgU3Rh dHVzID0nIG5vbGluZQ0KPiAgICAgIGRpc3BsYXkgI3NxbC1zdGF0dXMgOTk5 OTkgbm9saW5lDQo+ICAgICAgZGlzcGxheSAnICcgbm9saW5lDQo+ICAgICAg ZGlzcGxheSAnU1FMIEVycm9yICA9ICcgbm9saW5lDQo+ICAgICAgZGlzcGxh eSAkc3FsLWVycm9yDQo+ICAgICAgZGlzcGxheSAkU3FsLU1zZw0KPiAgIFNI T1cgICRsb2FkcmVjb3JkDQo+ICAgICAgRG8gUm9sbGJhY2stVHJhbnNhY3Rp b24NCj4gICAgICBzdG9wDQo+ICBlbmQtZXZhbHVhdGUNCj5lbmQtcHJvY2Vk dXJlIFNRTC1FcnJvcjENCj4NCj5UaGFua3MsDQo+TXVyYWxpDQo+DQoNCg0K X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18NCnNxci11c2VycyBtYWlsaW5nIGxpc3QNCnNxci11c2Vyc0BzcXJ1Zy5v cmcNCmh0dHA6Ly93d3cuc3FydWcub3JnL21haWxtYW4vbGlzdGluZm8vc3Fy LXVzZXJzDQoNCg0KDQo= --===============1948603872== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --===============1948603872==-- From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 15 16:03:50 2005 Subject: Re: [sqr-users] Getting complete listing of SQR code Date: Fri, 15 Apr 2005 21:03:19 -0000 From: In cases like this, you can establish a mirror of the mainframe SQRs by putting the source code through a tool like SQR Tree. It won't help on error identification but the tree like visual allows you to drill down into the includes and trace the code. See "dash board" white paper at http://www.dssltd.com for some examples or search SQRUG for SQR Tree. I have a legitmate copy but can not remember the author. (Not at my regular site). John Willson "Gallagher, Neil (IT HR Support)" said: > We run SQRs as batch jobs on a z/OS mainframe. When we have a syntax > error, the diagnostics show line numbers, but we do not get a full > listing that expands all the included members. > > > > Is there any way to get a full listing? > > > > Neil Gallagher > > UNUM Provident Corporation > > Corporate HR Systems Support Team > > (207) 575-8046 > > Mailstop T211 > > Colonel Westbrook Executive Park > > Westbrook, Maine 04092 > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > -- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun Apr 17 16:54:14 2005 From: "SRI Technologies" Subject: RE: [sqr-users] Getting complete listing of SQR code Date: Mon, 18 Apr 2005 07:54:50 -0700 SqrPlus is a comprehensive SQR development tool. It is an answer to all such questions/requirements. With latest version you can develop/debug SQR programs on Unix or any other windows or non-windows platforms. Further details available at www.sritech.com.au Susan. -----Original Message----- From: Gallagher, Neil (IT HR Support) [mailto:ngallagher@unumprovident.com] Sent: Friday, April 15, 2005 12:55 PM To: sqr-users@sqrug.org Subject: [sqr-users] Getting complete listing of SQR code We run SQRs as batch jobs on a z/OS mainframe. When we have a syntax error, the diagnostics show line numbers, but we do not get a full listing that expands all the included members. Is there any way to get a full listing? Neil Gallagher UNUM Provident Corporation Corporate HR Systems Support Team (207) 575-8046 Mailstop T211 Colonel Westbrook Executive Park Westbrook, Maine 04092 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 19 18:26:44 2005 Date: Tue, 19 Apr 2005 19:26:08 -0400 From: Meena Kandasamy Subject: [sqr-users] New hire Hi Everybody, I am designing a new hire report that will allow date mask of DD-MON-YYYY. I am validating the input with format='DD-MON-YYYY' But the publisher and program accepts the date value as DD-MON-YY. One of my collegues says its possible to do such format. She says we have to use type=date format. Any ideas? _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Apr 19 18:37:28 2005 From: Bob Stone Subject: RE: [sqr-users] New hire Date: Tue, 19 Apr 2005 18:36:24 -0500 is that date input coming from a file or a database table? because if it's coming from the database table you can use date masks to bring it in...otherwise, you can turn it into the correct date format on the insert. For example you can grab the 'DD-MON-YY' from the table, and make it a DD-MON-YYYY in the string: begin-select to_char(a_date_DD_MON_YY, 'DD-MON-YYYY') &my_date let $my_date = &my_date from table where [$clause] end-select Or if it's an input from a file and you're trying to put it into the table you can put it in whatever format you need, and read it from the table like above: unstring $input by $sepchar $my_date BEGIN-SQL insert into table ( a_date_DD_MON_YY ) values ( to_date($my_date , 'DD-MON-YY') ) END-SQL If your SQR report doesn't make use of that date in any database tables, well that sorta confuses me, but maybe setting up a date variable and using the SQR edit masks would do it for you too. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Meena Kandasamy Sent: Tuesday, April 19, 2005 6:26 PM To: sqr-users@sqrug.org Subject: [sqr-users] New hire Hi Everybody, I am designing a new hire report that will allow date mask of DD-MON-YYYY. I am validating the input with format='DD-MON-YYYY' But the publisher and program accepts the date value as DD-MON-YY. One of my collegues says its possible to do such format. She says we have to use type=date format. Any ideas? _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 20 10:10:08 2005 From: "radhika reddy" Date: Wed, 20 Apr 2005 10:09:01 -0500 Subject: [sqr-users] Evaluate - When Hi, I am having a problem with delivered SQR. It has Evaluate Statement which codes like the following: Evaluate &Paygroup when = 'A' ! processing A break; when = 'B' when = 'C' !processing B or C Break; when = 'D' when = 'E' when-other ! processing D or E or other Break; End-Evaluate Here when the value of paygroup is B or C it goes into processing B or C. But when the value is D or E it doesn't go to Processing D or E or other. I can remove the lines of code when = 'D' and when = 'E' . But before making changes to the delivered one, i would like to know is there any reason for peoplesoft to code like this? Any input would be appreciated. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 20 10:16:04 2005 Date: Wed, 20 Apr 2005 11:15:05 -0400 From: "Larry Roux" Subject: Re: [sqr-users] Evaluate - When I believe what is happening is that it is processing nothing for the 'D' 'E' options....that is it is acting like this: when = 'D' when = 'E' ! Do nothing when-other ! processing D or E or other Break; End-Evaluate If that is what they intended, then it is working. If they want the D E options to flow to the when-other clause then they just plain don't know what they are doing (no surprise there). Remove the 2 lines for D and E and it should work. Larry Roux Syracuse University lroux@syr.edu >>> radhika_05@hotmail.com 4/20/2005 11:09:01 AM >>> Hi, I am having a problem with delivered SQR. It has Evaluate Statement which codes like the following: Evaluate &Paygroup when = 'A' ! processing A break; when = 'B' when = 'C' !processing B or C Break; when = 'D' when = 'E' when-other ! processing D or E or other Break; End-Evaluate Here when the value of paygroup is B or C it goes into processing B or C. But when the value is D or E it doesn't go to Processing D or E or other. I can remove the lines of code when = 'D' and when = 'E' . But before making changes to the delivered one, i would like to know is there any reason for peoplesoft to code like this? Any input would be appreciated. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 20 10:20:57 2005 Subject: Re: [sqr-users] Evaluate - When From: rick.hansen@rsmi.com Date: Wed, 20 Apr 2005 10:20:24 -0500 By removing the lines when='D' and when'E', I believe you will actually change the way this evaluate works. It appears that the original author does not want anything to occur if D or E. By removing the when's, then a D or E would fall into the OTHER clause. You would think that a break is needed but it appears that the when-other is handled a little bit differently. So, the question is: Should anything happen when D or E. If the answer is no, then I would leave it alone or perhaps put a break after the when='E' for better clarity. If the answer is, it should do the "other", then you would want to remove the when's. Rick Hansen Sr. Application Systems Analyst D - (563) 333-2321, F - (563) 324-0211 ________________________________________________________________________________ This e-mail is only intended for the person(s) to whom it is addressed and may contain confidential information. Unless stated to the contrary, any opinions or comments are personal to the writer and do not represent the official view of the company. If you have received this e-mail in error, please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. Thank you for your cooperation. "radhika reddy" Sent by: sqr-users-bounces+rick.hansen=rsmi.com@sqrug.org 04/20/2005 10:09 AM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." To: sqr-users@sqrug.org cc: Subject: [sqr-users] Evaluate - When Hi, I am having a problem with delivered SQR. It has Evaluate Statement which codes like the following: Evaluate &Paygroup when = 'A' ! processing A break; when = 'B' when = 'C' !processing B or C Break; when = 'D' when = 'E' when-other ! processing D or E or other Break; End-Evaluate Here when the value of paygroup is B or C it goes into processing B or C. But when the value is D or E it doesn't go to Processing D or E or other. I can remove the lines of code when = 'D' and when = 'E' . But before making changes to the delivered one, i would like to know is there any reason for peoplesoft to code like this? Any input would be appreciated. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 20 10:23:59 2005 Date: Wed, 20 Apr 2005 11:21:34 -0400 From: "Jamie Harris" Subject: Re: [sqr-users] Evaluate - When That's strange. :) It looks like it should fall-through into the when-other if the value is D or E. I guess the programmer at Peoplesoft thought that's what it would do (and didn't test it!). You are correct about needing to remove the when = 'D' and when = 'E'. I would open a case with PS though, and let them know what you found and what you did to correct it. What PS delivered SQR was this in? ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> radhika_05@hotmail.com 4/20/2005 11:09 AM >>> Hi, I am having a problem with delivered SQR. It has Evaluate Statement which codes like the following: Evaluate &Paygroup when = 'A' ! processing A break; when = 'B' when = 'C' !processing B or C Break; when = 'D' when = 'E' when-other ! processing D or E or other Break; End-Evaluate Here when the value of paygroup is B or C it goes into processing B or C. But when the value is D or E it doesn't go to Processing D or E or other. I can remove the lines of code when = 'D' and when = 'E' . But before making changes to the delivered one, i would like to know is there any reason for peoplesoft to code like this? Any input would be appreciated. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 20 11:23:14 2005 From: "radhika reddy" Subject: Re: [sqr-users] Evaluate - When Date: Wed, 20 Apr 2005 11:22:06 -0500 Thanks for replying. I opened a ticket with peoplesoft. This Sqr is in Health & Safety and the name of Sqr is OHS019. It should definetly go into the processing section when value is D or E. Will update. Thanks. >From: "Jamie Harris" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: >Subject: Re: [sqr-users] Evaluate - When >Date: Wed, 20 Apr 2005 11:21:34 -0400 > >That's strange. :) > >It looks like it should fall-through into the when-other if the value >is D or E. I guess the programmer at Peoplesoft thought that's what it >would do (and didn't test it!). > >You are correct about needing to remove the when = 'D' and when = 'E'. >I would open a case with PS though, and let them know what you found and >what you did to correct it. > >What PS delivered SQR was this in? > > >----------------------------------------------------- >James Harris >Junior Systems Programmer/Analyst >Information Technology Division >Frederick Community College >----------------------------------------------------- > > >>> radhika_05@hotmail.com 4/20/2005 11:09 AM >>> > >Hi, > > I am having a problem with delivered SQR. It has Evaluate Statement >which >codes like the following: > >Evaluate &Paygroup >when = 'A' > ! processing A > break; >when = 'B' >when = 'C' > !processing B or C > Break; >when = 'D' >when = 'E' >when-other > ! processing D or E or other > Break; >End-Evaluate > > Here when the value of paygroup is B or C it goes into processing B >or >C. But when the value is D or E it doesn't go to Processing D or E or >other. > >I can remove the lines of code when = 'D' and when = 'E' . But before >making >changes to the delivered one, i would like to know is there any reason >for >peoplesoft to code like this? > >Any input would be appreciated. > >Thanks. > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's >FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:23:23 2005 From: Bob Stone Date: Thu, 21 Apr 2005 11:22:17 -0500 Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:30:54 2005 From: James Womeldorf Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:29:48 -0500 Hi Bob, What are the values of the two dynamic where variables? Is it dying during compilation or during execution? Jim -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:33:49 2005 Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:31:23 -0500 From: "Knapp, Richard" Sometimes the error message is correct. Does your dynamic where string have a missing right paren? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it.=20=20 Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date =3D &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt =3D #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage=20 where 1=3D1=20 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 =3D 1=20 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone=20=20 Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:40:02 2005 From: James Womeldorf Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:38:57 -0500 Try adding $necessary as I have done here. I think SQR is trying to compile this statement rather than waiting for run-time. It happens sometimes when there is a subselect. I usually signal SQR to wait by placing a dynamic sql variable after each 'from'. Jim let $necessary = '' BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM [$necessary] (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from [$necessary] sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:43:08 2005 From: Bob Stone Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:39:25 -0500 for the specific run i was doing the dynamic where clause was ' ' ...with no parens. It's not seeing the 2nd paren (which is there), that's the problem. And since it finds that 2nd paren when I comment out the ![$month_where_clause_1], that leads me to believe that the []'s of that dyamic where clause are what's causing it not to read the order by clause. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Knapp, Richard Sent: Thursday, April 21, 2005 11:31 AM To: This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions. Subject: RE: [sqr-users] dynamic where clause in subselect Sometimes the error message is correct. Does your dynamic where string have a missing right paren? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:46:24 2005 From: Bob Stone Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:45:20 -0500 Jim (and Jeff), The $month_where_clause_1 is created to allow a date-range run of off the run cntl panel. 99% of the time they'll probably just run the default, but it's something i added and I would like it to work if possible. let $month_where_clause_1 = 'and ( (calendar_year = ' || $to_date_yr || ' and to_number(monthcd) <= ' || $to_date_mon || ') ' || ' or (calendar_year = ' || $from_date_yr || ' and to_number(monthcd) > ' || $from_date_mon || ') )' example: date range (12-01-2004, 04-01-2005). I grab out $to_date_yr (=2005) $to_date_mon (=04), etc. $month_where_clause_1 = "and ( (calendar_year = 2005 and to_number(monthcd) <= 4) or(calendar_year = 2004 and to_number(monthcd) > 12) )" I guess that's not exactly perfect (if run for 24 or 36 months, for example), but hey, that's a different problem. It's dying during compilation. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Thursday, April 21, 2005 11:30 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect Hi Bob, What are the values of the two dynamic where variables? Is it dying during compilation or during execution? Jim -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:50:22 2005 Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 11:48:36 -0500 From: Could you then pre-build your entire sub-query and include or not include the content of $month_where_clause_1 as appropriate? -----Original Message----- From: sqr-users-bounces+jeff.steinfeldt=3Dwellsfargo.com@sqrug.org [mailto:sqr-users-bounces+jeff.steinfeldt=3Dwellsfargo.com@sqrug.org] On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:39 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect for the specific run i was doing the dynamic where clause was ' ' ...with no parens.=20=20 It's not seeing the 2nd paren (which is there), that's the problem. And since it finds that 2nd paren when I comment out the ![$month_where_clause_1], that leads me to believe that the []'s of that dyamic where clause are what's causing it not to read the order by clause. -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Knapp, Richard Sent: Thursday, April 21, 2005 11:31 AM To: This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions. Subject: RE: [sqr-users] dynamic where clause in subselect Sometimes the error message is correct. Does your dynamic where string have a missing right paren? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it.=20=20 Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date =3D &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt =3D #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage=20 where 1=3D1=20 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 =3D 1=20 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone=20=20 Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 11:59:20 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 09:58:10 -0700 A $month_where_clause_1 will probably not make your query run much faster. The to_number function eliminates the possibility of using indexes, so you're examining every row anyway. The "or" in this example will make it harder for your SQL optimizer. You might be no worse off leaving out the dynamic clause. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Thursday, April 21, 2005 9:45 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect Jim (and Jeff), The $month_where_clause_1 is created to allow a date-range run of off the run cntl panel. 99% of the time they'll probably just run the default, but it's something i added and I would like it to work if possible. let $month_where_clause_1 = 'and ( (calendar_year = ' || $to_date_yr || ' and to_number(monthcd) <= ' || $to_date_mon || ') ' || ' or (calendar_year = ' || $from_date_yr || ' and to_number(monthcd) > ' || $from_date_mon || ') )' example: date range (12-01-2004, 04-01-2005). I grab out $to_date_yr (=2005) $to_date_mon (=04), etc. $month_where_clause_1 = "and ( (calendar_year = 2005 and to_number(monthcd) <= 4) or(calendar_year = 2004 and to_number(monthcd) > 12) )" I guess that's not exactly perfect (if run for 24 or 36 months, for example), but hey, that's a different problem. It's dying during compilation. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Thursday, April 21, 2005 11:30 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect Hi Bob, What are the values of the two dynamic where variables? Is it dying during compilation or during execution? Jim -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 12:02:25 2005 Subject: Re: [sqr-users] dynamic where clause in subselect From: Olga.Gal@bbh.com Date: Thu, 21 Apr 2005 13:00:12 -0400 Bob, Just to make sure that you don't have a bug there, I suggest you add ON-ERROR clause to your BEGIN-SELECT statement, and add show_sql procedure where you display the oracle statement being executed: BEGIN-SELECT ON-ERROR=show_sql . . END-SELECT END-PROCEDURE BEGIN-PROCEDURE show_sql SHOW $sql-error SHOW 'Error in SQL statement: ' $sql-text END-PROCEDURE show_sql Bob Stone Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To sqr-users@sqrug.org 04/21/2005 12:22 PM cc Subject Please respond to [sqr-users] dynamic where clause in subselect "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 14:10:40 2005 From: Bob Stone Subject: RE: [sqr-users] dynamic where clause in subselect Date: Thu, 21 Apr 2005 14:09:30 -0500 The 'dynamic' part of it is that 90% of the time I want it to be ' ' (no where clause)...but the rest of the time it might have that extra where clause. Yes, I could set up about 4 different non-dynamic SQLs that only get run inside certain IF statements, but performance isn't an issue in a Report that runs in under 2 seconds. I dont care how fast it runs, there's about 2-3000 rows in that table, 1337 rows in the other table. everything's fast. I just wanted it to run. It didn't run because it wasn't compiling. SQR was trying to parse out the SQL at compile time (it must not have noticed the 2 dynamic sections, which should make it parse at run time) and it got to the [] and was confused because it thought it was looking for the right paren ). Jim Womeldorf had the solution to incude more useless dynamic sections right after the FROM to make sure it knows that SQL section is dynamic (run time parsing). It worked for me. I was able to compile and the SQR compiled and ran fine. let $necessary = '' BEGIN-SELECT .... FROM [$necessary] (select .... from [$necessary] sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT Thanks for everyone's suggestions. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Alexander, Steve Sent: Thursday, April 21, 2005 11:58 AM To: 'This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect A $month_where_clause_1 will probably not make your query run much faster. The to_number function eliminates the possibility of using indexes, so you're examining every row anyway. The "or" in this example will make it harder for your SQL optimizer. You might be no worse off leaving out the dynamic clause. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Thursday, April 21, 2005 9:45 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect Jim (and Jeff), The $month_where_clause_1 is created to allow a date-range run of off the run cntl panel. 99% of the time they'll probably just run the default, but it's something i added and I would like it to work if possible. let $month_where_clause_1 = 'and ( (calendar_year = ' || $to_date_yr || ' and to_number(monthcd) <= ' || $to_date_mon || ') ' || ' or (calendar_year = ' || $from_date_yr || ' and to_number(monthcd) > ' || $from_date_mon || ') )' example: date range (12-01-2004, 04-01-2005). I grab out $to_date_yr (=2005) $to_date_mon (=04), etc. $month_where_clause_1 = "and ( (calendar_year = 2005 and to_number(monthcd) <= 4) or(calendar_year = 2004 and to_number(monthcd) > 12) )" I guess that's not exactly perfect (if run for 24 or 36 months, for example), but hey, that's a different problem. It's dying during compilation. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Thursday, April 21, 2005 11:30 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] dynamic where clause in subselect Hi Bob, What are the values of the two dynamic where variables? Is it dying during compilation or during execution? Jim -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Thursday, April 21, 2005 11:22 AM To: sqr-users@sqrug.org Subject: [sqr-users] dynamic where clause in subselect Hi there...i'm having a few problems with using a dynamic where clause within a subselect in the from clause (i forget the technical term for that). If I comment out the [$month_where_clause_1] the SQL runs in the SQR. When I have it in there it says 'ORA-00907: missing right parenthesis' meaning that it doesn't get as far as the ' monthcd desc )' of the order clause. The [] stop it. Has anybody seen this before? Any work arounds? I would really like to do this date logic (it's confusing because the table was made ~not by me, mind you~ with the 'date' being kept in a 'month' column and a 'year' column. since we only care what month it is..), and I would really like to not rewrite this sql (it was confusing enough the first time). Let me know if you see anything. ------------------------------------------------------------- BEGIN-SELECT calendar_year &year monthcd_num &monthcd full_date &full_date let $full_date = &full_date put $full_date into MONTHS_RUN_FOR(#monthcnt) month !YYYY-MM-DD let #monthcnt = #monthcnt + 1 FROM (select distinct calendar_year, monthcd, to_number(monthcd) as monthcd_num, calendar_year || '-' || monthcd || '-01' as full_date from sysadm.ps_fas_scan_usage where 1=1 [$month_where_clause_1] order by calendar_year desc, monthcd desc ) WHERE 1 = 1 [$month_where_clause_2] END-SELECT --------------------------------------------------- Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 21 17:51:30 2005 Date: Thu, 21 Apr 2005 15:50:12 -0700 From: Raghvendra Dharwada Subject: [sqr-users] Transferring output file within environments using SQR when the SQR Report is run on NT Hi all, Can anyone help me how to write a script in an SQR program that can transfer (copy) a file from one environment to another (say DEV to TST) (network folders) in Windows NT ? The scenario is like this: The SQR is run on NT. It creates an output file in DEV (in some folder) This file should be transferred to TST (in some folder) Here are the software versions I am using $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle 8.0.6/Mar 26= 2004 PeopleSoft: 8.8 Oracle: 9i I came across a script that transfers file from UNIX to NT i.e After the SQR runs on UNIX it transfers to NT. The code that I came across is as follows: I write the script in a file, execute it using the move-files procedure begin-procedure write-sh-file let $file-path =3D 'cd /home/out/payroll'=20=20 let $L1 =3D 'HOST=3D' || '''x.x.x.x''' let $L2 =3D 'USER=3D' || '''usename''' let $L3 =3D 'PASSWD=3D' || '''pwd''' let $L4 =3D 'echo ' || '"remote Login attempted"' let $L5 =3D 'ftp -n $HOST < 0 display ' call status: ' noline display #status3 end-if if #status3 =3D 0 display 'Unix script Executed' end-if End-Procedure Now I need a similar or any script, that when the SQR is run on NT and after it creates an output file in a specific folder in DEV, it should get transferred to a folder in TST or vice versa. Pls let me know Thanks Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 22 08:14:38 2005 Date: Fri, 22 Apr 2005 06:13:26 -0700 (PDT) From: Dattatraya Shetty Subject: Re: [sqr-users] Transferring output file within environments using SQR when the SQR Report is run on NT Hi Raghav, This might be fairly simple if you can create a share for the TST box and create a mapping on the machine where the SQR is running. e.g map Z: = \\TSTSERVER\sharedrive. Once you have this you can simply execute a copy command using the system call to copy the file that might be the quickest of all options. let $cmd = 'copy \\DEVSERVER\filename Z:\filename' call system using $cmd status=#stat ! check the return status. if not you may have to do an ftp. like in the script below, make sure there is an ftp program available on the NT box and try to manually ftp to the TST box from DEV and then you can use the script below with changes to hostname userid and password. etc HTH Datta. --- Raghvendra Dharwada wrote: > Hi all, > Can anyone help me how to write a script in an SQR program that can > transfer (copy) a file from one environment to another (say DEV to > TST) (network folders) in Windows NT ? > > The scenario is like this: > > The SQR is run on NT. > It creates an output file in DEV (in some folder) > This file should be transferred to TST (in some folder) > > Here are the software versions I am using > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > 8.0.6/Mar 26 2004 > PeopleSoft: 8.8 > Oracle: 9i > > I came across a script that transfers file from UNIX to NT i.e After > the SQR runs on UNIX > it transfers to NT. > The code that I came across is as follows: > I write the script in a file, execute it using the move-files > procedure > > begin-procedure write-sh-file > let $file-path = 'cd /home/out/payroll' > let $L1 = 'HOST=' || '''x.x.x.x''' > let $L2 = 'USER=' || '''usename''' > let $L3 = 'PASSWD=' || '''pwd''' > let $L4 = 'echo ' || '"remote Login attempted"' > let $L5 = 'ftp -n $HOST < let $L6 = 'quote USER $USER' > let $L7 = 'quote PASS $PASSWD' > let $L8 = 'cd /GL/Reports' > let $L9 = 'prompt' > let $L10 = 'put ' || $filename1 > let $L11 = 'END_SCRIPT' > let $L12 = 'FTP_RETURN_CODE=$?' > let $L13 = 'if [ $FTP_RETURN_CODE = 0 ]; then' > let $L14 = 'echo ' || '"Transfered Successful, deleting > source files"' > let $L15 = 'cd /home/out/payroll' > let $L16 = 'delete ' || $filename1 > let $L17 = 'exit 0' > let $L18 = 'else' > let $L19 = 'echo' || '"Transfered failed"' > let $L20 = 'exit 1' > let $L21 = 'fi' > > > write 2 from $file-path > write 2 from $L1 > ----- > ----- > > End-procedure > > In the above procedure : > $filename1 = $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > || '.csv' > > !----------------------------------------------------------------------- > !Procedure : move-files > !Called By : wrap-up > !----------------------------------------------------------------------- > begin-procedure move-files > let $path = '/export/home/psadmin/scripts/' > let $file = 'sh ' || $path || 'cbgl0007.sh' > > call system using $file #status3 > > if #status3 <> 0 > display ' call status: ' noline > display #status3 > end-if > if #status3 = 0 > display 'Unix script Executed' > end-if > > End-Procedure > > Now I need a similar or any script, that when the SQR is run on NT > and > after it creates an > output file in a specific folder in DEV, it should get transferred > to > a folder in TST > or vice versa. > Pls let me know > > Thanks > Raghav > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 22 08:34:15 2005 From: jeff_molloy@adp.com Subject: RE: [sqr-users] Transferring output file within environments usin g SQR when the SQR Report is run on NT Date: Fri, 22 Apr 2005 09:32:37 -0400 Also, if you do not want to map the drive, just put the \\TSTSERVER\sharedrive in double quotes. That will work also. "\\TSTSERVER\sharedrive" Jeff Molloy -----Original Message----- From: Dattatraya Shetty [mailto:datta_shetty@yahoo.com] Sent: Friday, April 22, 2005 9:13 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] Transferring output file within environments using SQR when the SQR Report is run on NT Hi Raghav, This might be fairly simple if you can create a share for the TST box and create a mapping on the machine where the SQR is running. e.g map Z: = \\TSTSERVER\sharedrive. Once you have this you can simply execute a copy command using the system call to copy the file that might be the quickest of all options. let $cmd = 'copy \\DEVSERVER\filename Z:\filename' call system using $cmd status=#stat ! check the return status. if not you may have to do an ftp. like in the script below, make sure there is an ftp program available on the NT box and try to manually ftp to the TST box from DEV and then you can use the script below with changes to hostname userid and password. etc HTH Datta. --- Raghvendra Dharwada wrote: > Hi all, > Can anyone help me how to write a script in an SQR program that can > transfer (copy) a file from one environment to another (say DEV to > TST) (network folders) in Windows NT ? > > The scenario is like this: > > The SQR is run on NT. > It creates an output file in DEV (in some folder) > This file should be transferred to TST (in some folder) > > Here are the software versions I am using > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > 8.0.6/Mar 26 2004 > PeopleSoft: 8.8 > Oracle: 9i > > I came across a script that transfers file from UNIX to NT i.e After > the SQR runs on UNIX > it transfers to NT. > The code that I came across is as follows: > I write the script in a file, execute it using the move-files > procedure > > begin-procedure write-sh-file > let $file-path = 'cd /home/out/payroll' > let $L1 = 'HOST=' || '''x.x.x.x''' > let $L2 = 'USER=' || '''usename''' > let $L3 = 'PASSWD=' || '''pwd''' > let $L4 = 'echo ' || '"remote Login attempted"' > let $L5 = 'ftp -n $HOST < let $L6 = 'quote USER $USER' > let $L7 = 'quote PASS $PASSWD' > let $L8 = 'cd /GL/Reports' > let $L9 = 'prompt' > let $L10 = 'put ' || $filename1 > let $L11 = 'END_SCRIPT' > let $L12 = 'FTP_RETURN_CODE=$?' > let $L13 = 'if [ $FTP_RETURN_CODE = 0 ]; then' > let $L14 = 'echo ' || '"Transfered Successful, deleting > source files"' > let $L15 = 'cd /home/out/payroll' > let $L16 = 'delete ' || $filename1 > let $L17 = 'exit 0' > let $L18 = 'else' > let $L19 = 'echo' || '"Transfered failed"' > let $L20 = 'exit 1' > let $L21 = 'fi' > > > write 2 from $file-path > write 2 from $L1 > ----- > ----- > > End-procedure > > In the above procedure : > $filename1 = $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > || '.csv' > > !----------------------------------------------------------------------- > !Procedure : move-files > !Called By : wrap-up > !----------------------------------------------------------------------- > begin-procedure move-files > let $path = '/export/home/psadmin/scripts/' > let $file = 'sh ' || $path || 'cbgl0007.sh' > > call system using $file #status3 > > if #status3 <> 0 > display ' call status: ' noline > display #status3 > end-if > if #status3 = 0 > display 'Unix script Executed' > end-if > > End-Procedure > > Now I need a similar or any script, that when the SQR is run on NT > and > after it creates an > output file in a specific folder in DEV, it should get transferred > to > a folder in TST > or vice versa. > Pls let me know > > Thanks > Raghav > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ----------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sat Apr 23 06:55:33 2005 Date: Sat, 23 Apr 2005 04:54:45 -0700 (PDT) From: "Satheesh M.S" Subject: [sqr-users] (no subject) is there any downloadable third party tool which can convert .sqr or .sqt files into .srm files Satheesh M.S Maximo Administrator GAC Abu Dhabi UAE __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sat Apr 23 10:50:38 2005 From: Ray Ontko Date: Sat, 23 Apr 2005 10:50:08 -0500 Subject: Re: [sqr-users] (no subject) None that I'm aware of. Ray On Sat, Apr 23, 2005 at 04:54:45AM -0700, Satheesh M.S wrote: > is there any downloadable third party tool which can convert .sqr or .sqt files into .srm files > > > Satheesh M.S > Maximo Administrator > GAC > Abu Dhabi > UAE > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users ---------------------------------------------------------------------- Ray Ontko rayo@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788 Ray Ontko & Co. Software Consulting Services http://www.ontko.com/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun Apr 24 23:10:00 2005 Date: Sun, 24 Apr 2005 21:08:53 -0700 From: Raghvendra Dharwada Subject: [sqr-users] Re: Transferring output file within environments using SQR when the SQR Report is run on NT (Dattatraya Shetty) Hi Datta, Thank you very much for the reply regarding the transfer of files. I will try as per your suggestion Raghav On 4/23/05, sqr-users-request@sqrug.org wrote: > Send sqr-users mailing list submissions to > sqr-users@sqrug.org >=20 > To subscribe or unsubscribe via the World Wide Web, visit > http://www.sqrug.org/mailman/listinfo/sqr-users > or, via email, send a message with subject or body 'help' to > sqr-users-request@sqrug.org >=20 > You can reach the person managing the list at > sqr-users-owner@sqrug.org >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sqr-users digest..." >=20 >=20 > Today's Topics: >=20 > 1. Re: Transferring output file within environments using SQR > when the SQR Report is run on NT (Dattatraya Shetty) > 2. RE: Transferring output file within environments usin g SQR > when the SQR Report is run on NT (jeff_molloy@adp.com) >=20 >=20 >=20 > ---------- Forwarded message ---------- > From: Dattatraya Shetty > To: "This list is for discussion about the SQR database reporting languag= e from Hyperion Solutions." > Date: Fri, 22 Apr 2005 06:13:26 -0700 (PDT) > Subject: Re: [sqr-users] Transferring output file within environments usi= ng SQR when the SQR Report is run on NT > Hi Raghav, > This might be fairly simple if you can create a share for the TST > box and create a mapping on the machine where the SQR is running. >=20 > e.g > map Z: =3D \\TSTSERVER\sharedrive. >=20 > Once you have this you can simply execute a copy command using the > system call to copy the file that might be the quickest of all options. >=20 > let $cmd =3D 'copy \\DEVSERVER\filename Z:\filename' >=20 > call system using $cmd status=3D#stat >=20 > ! check the return status. >=20 > if not you may have to do an ftp. like in the script below, make sure > there is an ftp program available on the NT box and try to manually ftp > to the TST box from DEV and then you can use the script below with > changes to hostname userid and password. etc >=20 > HTH > Datta. > --- Raghvendra Dharwada wrote: > > Hi all, > > Can anyone help me how to write a script in an SQR program that can > > transfer (copy) a file from one environment to another (say DEV to > > TST) (network folders) in Windows NT ? > > > > The scenario is like this: > > > > The SQR is run on NT. > > It creates an output file in DEV (in some folder) > > This file should be transferred to TST (in some folder) > > > > Here are the software versions I am using > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > 8.0.6/Mar 26 2004 > > PeopleSoft: 8.8 > > Oracle: 9i > > > > I came across a script that transfers file from UNIX to NT i.e After > > the SQR runs on UNIX > > it transfers to NT. > > The code that I came across is as follows: > > I write the script in a file, execute it using the move-files > > procedure > > > > begin-procedure write-sh-file > > let $file-path =3D 'cd /home/out/payroll' > > let $L1 =3D 'HOST=3D' || '''x.x.x.x''' > > let $L2 =3D 'USER=3D' || '''usename''' > > let $L3 =3D 'PASSWD=3D' || '''pwd''' > > let $L4 =3D 'echo ' || '"remote Login attempted"' > > let $L5 =3D 'ftp -n $HOST < > let $L6 =3D 'quote USER $USER' > > let $L7 =3D 'quote PASS $PASSWD' > > let $L8 =3D 'cd /GL/Reports' > > let $L9 =3D 'prompt' > > let $L10 =3D 'put ' || $filename1 > > let $L11 =3D 'END_SCRIPT' > > let $L12 =3D 'FTP_RETURN_CODE=3D$?' > > let $L13 =3D 'if [ $FTP_RETURN_CODE =3D 0 ]; then' > > let $L14 =3D 'echo ' || '"Transfered Successful, deleting > > source files"' > > let $L15 =3D 'cd /home/out/payroll' > > let $L16 =3D 'delete ' || $filename1 > > let $L17 =3D 'exit 0' > > let $L18 =3D 'else' > > let $L19 =3D 'echo' || '"Transfered failed"' > > let $L20 =3D 'exit 1' > > let $L21 =3D 'fi' > > > > > > write 2 from $file-path > > write 2 from $L1 > > ----- > > ----- > > > > End-procedure > > > > In the above procedure : > > $filename1 =3D $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > || '.csv' > > > > > !----------------------------------------------------------------------- > > !Procedure : move-files > > !Called By : wrap-up > > > !----------------------------------------------------------------------- > > begin-procedure move-files > > let $path =3D '/export/home/psadmin/scripts/' > > let $file =3D 'sh ' || $path || 'cbgl0007.sh' > > > > call system using $file #status3 > > > > if #status3 <> 0 > > display ' call status: ' noline > > display #status3 > > end-if > > if #status3 =3D 0 > > display 'Unix script Executed' > > end-if > > > > End-Procedure > > > > Now I need a similar or any script, that when the SQR is run on NT > > and > > after it creates an > > output file in a specific folder in DEV, it should get transferred > > to > > a folder in TST > > or vice versa. > > Pls let me know > > > > Thanks > > Raghav > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >=20 >=20 >=20 > ---------- Forwarded message ---------- > From: jeff_molloy@adp.com > To: sqr-users@sqrug.org > Date: Fri, 22 Apr 2005 09:32:37 -0400 > Subject: RE: [sqr-users] Transferring output file within environments usi= n g SQR when the SQR Report is run on NT > Also, if you do not want to map the drive, just put the > \\TSTSERVER\sharedrive in double quotes. That will work also. >=20 > "\\TSTSERVER\sharedrive" >=20 > Jeff Molloy >=20 > -----Original Message----- > From: Dattatraya Shetty [mailto:datta_shetty@yahoo.com] > Sent: Friday, April 22, 2005 9:13 AM > To: This list is for discussion about the SQR database reporting language > from Hyperion Solutions. > Subject: Re: [sqr-users] Transferring output file within environments usi= ng > SQR when the SQR Report is run on NT >=20 > Hi Raghav, > This might be fairly simple if you can create a share for the TST > box and create a mapping on the machine where the SQR is running. >=20 > e.g > map Z: =3D \\TSTSERVER\sharedrive. >=20 > Once you have this you can simply execute a copy command using the > system call to copy the file that might be the quickest of all options. >=20 > let $cmd =3D 'copy \\DEVSERVER\filename Z:\filename' >=20 > call system using $cmd status=3D#stat >=20 > ! check the return status. >=20 > if not you may have to do an ftp. like in the script below, make sure > there is an ftp program available on the NT box and try to manually ftp > to the TST box from DEV and then you can use the script below with > changes to hostname userid and password. etc >=20 > HTH > Datta. > --- Raghvendra Dharwada wrote: > > Hi all, > > Can anyone help me how to write a script in an SQR program that can > > transfer (copy) a file from one environment to another (say DEV to > > TST) (network folders) in Windows NT ? > > > > The scenario is like this: > > > > The SQR is run on NT. > > It creates an output file in DEV (in some folder) > > This file should be transferred to TST (in some folder) > > > > Here are the software versions I am using > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > 8.0.6/Mar 26 2004 > > PeopleSoft: 8.8 > > Oracle: 9i > > > > I came across a script that transfers file from UNIX to NT i.e After > > the SQR runs on UNIX > > it transfers to NT. > > The code that I came across is as follows: > > I write the script in a file, execute it using the move-files > > procedure > > > > begin-procedure write-sh-file > > let $file-path =3D 'cd /home/out/payroll' > > let $L1 =3D 'HOST=3D' || '''x.x.x.x''' > > let $L2 =3D 'USER=3D' || '''usename''' > > let $L3 =3D 'PASSWD=3D' || '''pwd''' > > let $L4 =3D 'echo ' || '"remote Login attempted"' > > let $L5 =3D 'ftp -n $HOST < > let $L6 =3D 'quote USER $USER' > > let $L7 =3D 'quote PASS $PASSWD' > > let $L8 =3D 'cd /GL/Reports' > > let $L9 =3D 'prompt' > > let $L10 =3D 'put ' || $filename1 > > let $L11 =3D 'END_SCRIPT' > > let $L12 =3D 'FTP_RETURN_CODE=3D$?' > > let $L13 =3D 'if [ $FTP_RETURN_CODE =3D 0 ]; then' > > let $L14 =3D 'echo ' || '"Transfered Successful, deleting > > source files"' > > let $L15 =3D 'cd /home/out/payroll' > > let $L16 =3D 'delete ' || $filename1 > > let $L17 =3D 'exit 0' > > let $L18 =3D 'else' > > let $L19 =3D 'echo' || '"Transfered failed"' > > let $L20 =3D 'exit 1' > > let $L21 =3D 'fi' > > > > > > write 2 from $file-path > > write 2 from $L1 > > ----- > > ----- > > > > End-procedure > > > > In the above procedure : > > $filename1 =3D $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > || '.csv' > > > > > !----------------------------------------------------------------------- > > !Procedure : move-files > > !Called By : wrap-up > > > !----------------------------------------------------------------------- > > begin-procedure move-files > > let $path =3D '/export/home/psadmin/scripts/' > > let $file =3D 'sh ' || $path || 'cbgl0007.sh' > > > > call system using $file #status3 > > > > if #status3 <> 0 > > display ' call status: ' noline > > display #status3 > > end-if > > if #status3 =3D 0 > > display 'Unix script Executed' > > end-if > > > > End-Procedure > > > > Now I need a similar or any script, that when the SQR is run on NT > > and > > after it creates an > > output file in a specific folder in DEV, it should get transferred > > to > > a folder in TST > > or vice versa. > > Pls let me know > > > > Thanks > > Raghav > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > >=20 > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >=20 > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users >=20 > ----------------------------------------- > This message and any attachments are intended only for the use of the > addressee and may contain information that is privileged and confidential. > If the reader of the message is not the intended recipient or an authoriz= ed > representative of the intended recipient, you are hereby notified that any > dissemination of this communication is strictly prohibited. If you have > received this communication in error, notify the sender immediately by > return email and delete the message and any attachments from your system. >=20 >=20 > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users >=20 >=20 > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 25 17:26:56 2005 Date: Mon, 25 Apr 2005 15:25:40 -0700 From: Raghvendra Dharwada Subject: [sqr-users] Issue with the FTP script in deleting files in UNIX Hi Datta, I have one more problem with the ftp script (UNIX). After the output file is created and transferred to NT, the file should get deleted in UNIX as per the script ($L16). But for some reason this delete isnt working. Can you=20 suggest me what I can do? here is the script: let $file-path =3D 'cd /d01/psadmin/out/payroll'=20=20 let $L1 =3D 'HOST=3D' || '''172.21.1.109''' let $L2 =3D 'USER=3D' || '''psadmin''' let $L3 =3D 'PASSWD=3D' || '''psadmin''' let $L4 =3D 'echo ' || '"remote Login attempted"' let $L5 =3D 'ftp -n $HOST < wrote: > Send sqr-users mailing list submissions to > sqr-users@sqrug.org >=20 > To subscribe or unsubscribe via the World Wide Web, visit > http://www.sqrug.org/mailman/listinfo/sqr-users > or, via email, send a message with subject or body 'help' to > sqr-users-request@sqrug.org >=20 > You can reach the person managing the list at > sqr-users-owner@sqrug.org >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sqr-users digest..." >=20 >=20 > Today's Topics: >=20 > 1. Re: Transferring output file within environments using SQR > when the SQR Report is run on NT (Dattatraya Shetty) > (Raghvendra Dharwada) >=20 >=20 >=20 > ---------- Forwarded message ---------- > From: Raghvendra Dharwada > To: sqr-users@sqrug.org > Date: Sun, 24 Apr 2005 21:08:53 -0700 > Subject: [sqr-users] Re: Transferring output file within environments usi= ng SQR when the SQR Report is run on NT (Dattatraya Shetty) > Hi Datta, >=20 > Thank you very much for the reply regarding the transfer of files. I > will try as per your suggestion >=20 > Raghav >=20 > On 4/23/05, sqr-users-request@sqrug.org wro= te: > > Send sqr-users mailing list submissions to > > sqr-users@sqrug.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://www.sqrug.org/mailman/listinfo/sqr-users > > or, via email, send a message with subject or body 'help' to > > sqr-users-request@sqrug.org > > > > You can reach the person managing the list at > > sqr-users-owner@sqrug.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of sqr-users digest..." > > > > > > Today's Topics: > > > > 1. Re: Transferring output file within environments using SQR > > when the SQR Report is run on NT (Dattatraya Shetty) > > 2. RE: Transferring output file within environments usin g SQR > > when the SQR Report is run on NT (jeff_molloy@adp.com) > > > > > > > > ---------- Forwarded message ---------- > > From: Dattatraya Shetty > > To: "This list is for discussion about the SQR database reporting langu= age from Hyperion Solutions." > > Date: Fri, 22 Apr 2005 06:13:26 -0700 (PDT) > > Subject: Re: [sqr-users] Transferring output file within environments u= sing SQR when the SQR Report is run on NT > > Hi Raghav, > > This might be fairly simple if you can create a share for the TST > > box and create a mapping on the machine where the SQR is running. > > > > e.g > > map Z: =3D \\TSTSERVER\sharedrive. > > > > Once you have this you can simply execute a copy command using the > > system call to copy the file that might be the quickest of all options. > > > > let $cmd =3D 'copy \\DEVSERVER\filename Z:\filename' > > > > call system using $cmd status=3D#stat > > > > ! check the return status. > > > > if not you may have to do an ftp. like in the script below, make sure > > there is an ftp program available on the NT box and try to manually ftp > > to the TST box from DEV and then you can use the script below with > > changes to hostname userid and password. etc > > > > HTH > > Datta. > > --- Raghvendra Dharwada wrote: > > > Hi all, > > > Can anyone help me how to write a script in an SQR program that can > > > transfer (copy) a file from one environment to another (say DEV to > > > TST) (network folders) in Windows NT ? > > > > > > The scenario is like this: > > > > > > The SQR is run on NT. > > > It creates an output file in DEV (in some folder) > > > This file should be transferred to TST (in some folder) > > > > > > Here are the software versions I am using > > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > > 8.0.6/Mar 26 2004 > > > PeopleSoft: 8.8 > > > Oracle: 9i > > > > > > I came across a script that transfers file from UNIX to NT i.e After > > > the SQR runs on UNIX > > > it transfers to NT. > > > The code that I came across is as follows: > > > I write the script in a file, execute it using the move-files > > > procedure > > > > > > begin-procedure write-sh-file > > > let $file-path =3D 'cd /home/out/payroll' > > > let $L1 =3D 'HOST=3D' || '''x.x.x.x''' > > > let $L2 =3D 'USER=3D' || '''usename''' > > > let $L3 =3D 'PASSWD=3D' || '''pwd''' > > > let $L4 =3D 'echo ' || '"remote Login attempted"' > > > let $L5 =3D 'ftp -n $HOST < > > let $L6 =3D 'quote USER $USER' > > > let $L7 =3D 'quote PASS $PASSWD' > > > let $L8 =3D 'cd /GL/Reports' > > > let $L9 =3D 'prompt' > > > let $L10 =3D 'put ' || $filename1 > > > let $L11 =3D 'END_SCRIPT' > > > let $L12 =3D 'FTP_RETURN_CODE=3D$?' > > > let $L13 =3D 'if [ $FTP_RETURN_CODE =3D 0 ]; then' > > > let $L14 =3D 'echo ' || '"Transfered Successful, deleting > > > source files"' > > > let $L15 =3D 'cd /home/out/payroll' > > > let $L16 =3D 'delete ' || $filename1 > > > let $L17 =3D 'exit 0' > > > let $L18 =3D 'else' > > > let $L19 =3D 'echo' || '"Transfered failed"' > > > let $L20 =3D 'exit 1' > > > let $L21 =3D 'fi' > > > > > > > > > write 2 from $file-path > > > write 2 from $L1 > > > ----- > > > ----- > > > > > > End-procedure > > > > > > In the above procedure : > > > $filename1 =3D $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > > || '.csv' > > > > > > > > !----------------------------------------------------------------------- > > > !Procedure : move-files > > > !Called By : wrap-up > > > > > !----------------------------------------------------------------------- > > > begin-procedure move-files > > > let $path =3D '/export/home/psadmin/scripts/' > > > let $file =3D 'sh ' || $path || 'cbgl0007.sh' > > > > > > call system using $file #status3 > > > > > > if #status3 <> 0 > > > display ' call status: ' noline > > > display #status3 > > > end-if > > > if #status3 =3D 0 > > > display 'Unix script Executed' > > > end-if > > > > > > End-Procedure > > > > > > Now I need a similar or any script, that when the SQR is run on NT > > > and > > > after it creates an > > > output file in a specific folder in DEV, it should get transferred > > > to > > > a folder in TST > > > or vice versa. > > > Pls let me know > > > > > > Thanks > > > Raghav > > > > > > _______________________________________________ > > > sqr-users mailing list > > > sqr-users@sqrug.org > > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > > > > ---------- Forwarded message ---------- > > From: jeff_molloy@adp.com > > To: sqr-users@sqrug.org > > Date: Fri, 22 Apr 2005 09:32:37 -0400 > > Subject: RE: [sqr-users] Transferring output file within environments u= sin g SQR when the SQR Report is run on NT > > Also, if you do not want to map the drive, just put the > > \\TSTSERVER\sharedrive in double quotes. That will work also. > > > > "\\TSTSERVER\sharedrive" > > > > Jeff Molloy > > > > -----Original Message----- > > From: Dattatraya Shetty [mailto:datta_shetty@yahoo.com] > > Sent: Friday, April 22, 2005 9:13 AM > > To: This list is for discussion about the SQR database reporting langua= ge > > from Hyperion Solutions. > > Subject: Re: [sqr-users] Transferring output file within environments u= sing > > SQR when the SQR Report is run on NT > > > > Hi Raghav, > > This might be fairly simple if you can create a share for the TST > > box and create a mapping on the machine where the SQR is running. > > > > e.g > > map Z: =3D \\TSTSERVER\sharedrive. > > > > Once you have this you can simply execute a copy command using the > > system call to copy the file that might be the quickest of all options. > > > > let $cmd =3D 'copy \\DEVSERVER\filename Z:\filename' > > > > call system using $cmd status=3D#stat > > > > ! check the return status. > > > > if not you may have to do an ftp. like in the script below, make sure > > there is an ftp program available on the NT box and try to manually ftp > > to the TST box from DEV and then you can use the script below with > > changes to hostname userid and password. etc > > > > HTH > > Datta. > > --- Raghvendra Dharwada wrote: > > > Hi all, > > > Can anyone help me how to write a script in an SQR program that can > > > transfer (copy) a file from one environment to another (say DEV to > > > TST) (network folders) in Windows NT ? > > > > > > The scenario is like this: > > > > > > The SQR is run on NT. > > > It creates an output file in DEV (in some folder) > > > This file should be transferred to TST (in some folder) > > > > > > Here are the software versions I am using > > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > > 8.0.6/Mar 26 2004 > > > PeopleSoft: 8.8 > > > Oracle: 9i > > > > > > I came across a script that transfers file from UNIX to NT i.e After > > > the SQR runs on UNIX > > > it transfers to NT. > > > The code that I came across is as follows: > > > I write the script in a file, execute it using the move-files > > > procedure > > > > > > begin-procedure write-sh-file > > > let $file-path =3D 'cd /home/out/payroll' > > > let $L1 =3D 'HOST=3D' || '''x.x.x.x''' > > > let $L2 =3D 'USER=3D' || '''usename''' > > > let $L3 =3D 'PASSWD=3D' || '''pwd''' > > > let $L4 =3D 'echo ' || '"remote Login attempted"' > > > let $L5 =3D 'ftp -n $HOST < > > let $L6 =3D 'quote USER $USER' > > > let $L7 =3D 'quote PASS $PASSWD' > > > let $L8 =3D 'cd /GL/Reports' > > > let $L9 =3D 'prompt' > > > let $L10 =3D 'put ' || $filename1 > > > let $L11 =3D 'END_SCRIPT' > > > let $L12 =3D 'FTP_RETURN_CODE=3D$?' > > > let $L13 =3D 'if [ $FTP_RETURN_CODE =3D 0 ]; then' > > > let $L14 =3D 'echo ' || '"Transfered Successful, deleting > > > source files"' > > > let $L15 =3D 'cd /home/out/payroll' > > > let $L16 =3D 'delete ' || $filename1 > > > let $L17 =3D 'exit 0' > > > let $L18 =3D 'else' > > > let $L19 =3D 'echo' || '"Transfered failed"' > > > let $L20 =3D 'exit 1' > > > let $L21 =3D 'fi' > > > > > > > > > write 2 from $file-path > > > write 2 from $L1 > > > ----- > > > ----- > > > > > > End-procedure > > > > > > In the above procedure : > > > $filename1 =3D $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > > || '.csv' > > > > > > > > !----------------------------------------------------------------------- > > > !Procedure : move-files > > > !Called By : wrap-up > > > > > !----------------------------------------------------------------------- > > > begin-procedure move-files > > > let $path =3D '/export/home/psadmin/scripts/' > > > let $file =3D 'sh ' || $path || 'cbgl0007.sh' > > > > > > call system using $file #status3 > > > > > > if #status3 <> 0 > > > display ' call status: ' noline > > > display #status3 > > > end-if > > > if #status3 =3D 0 > > > display 'Unix script Executed' > > > end-if > > > > > > End-Procedure > > > > > > Now I need a similar or any script, that when the SQR is run on NT > > > and > > > after it creates an > > > output file in a specific folder in DEV, it should get transferred > > > to > > > a folder in TST > > > or vice versa. > > > Pls let me know > > > > > > Thanks > > > Raghav > > > > > > _______________________________________________ > > > sqr-users mailing list > > > sqr-users@sqrug.org > > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > ----------------------------------------- > > This message and any attachments are intended only for the use of the > > addressee and may contain information that is privileged and confidenti= al. > > If the reader of the message is not the intended recipient or an author= ized > > representative of the intended recipient, you are hereby notified that = any > > dissemination of this communication is strictly prohibited. If you have > > received this communication in error, notify the sender immediately by > > return email and delete the message and any attachments from your syste= m. > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > >=20 >=20 > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users >=20 >=20 > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Apr 25 17:35:28 2005 From: Bob Stone Subject: RE: [sqr-users] Issue with the FTP script in deleting files in UN IX Date: Mon, 25 Apr 2005 17:34:20 -0500 in UNIX you dont 'delete' you 'rm' (remove). let $L16 = 'rm ' || $Dept_Id || '_' || 'cbgl0008_' || $prcs_process_instance || '.csv' -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Raghvendra Dharwada Sent: Monday, April 25, 2005 5:26 PM To: sqr-users@sqrug.org Subject: [sqr-users] Issue with the FTP script in deleting files in UNIX Hi Datta, I have one more problem with the ftp script (UNIX). After the output file is created and transferred to NT, the file should get deleted in UNIX as per the script ($L16). But for some reason this delete isnt working. Can you suggest me what I can do? here is the script: let $file-path = 'cd /d01/psadmin/out/payroll' let $L1 = 'HOST=' || '''172.21.1.109''' let $L2 = 'USER=' || '''psadmin''' let $L3 = 'PASSWD=' || '''psadmin''' let $L4 = 'echo ' || '"remote Login attempted"' let $L5 = 'ftp -n $HOST < wrote: > Send sqr-users mailing list submissions to > sqr-users@sqrug.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.sqrug.org/mailman/listinfo/sqr-users > or, via email, send a message with subject or body 'help' to > sqr-users-request@sqrug.org > > You can reach the person managing the list at > sqr-users-owner@sqrug.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of sqr-users digest..." > > > Today's Topics: > > 1. Re: Transferring output file within environments using SQR > when the SQR Report is run on NT (Dattatraya Shetty) > (Raghvendra Dharwada) > > > > ---------- Forwarded message ---------- > From: Raghvendra Dharwada > To: sqr-users@sqrug.org > Date: Sun, 24 Apr 2005 21:08:53 -0700 > Subject: [sqr-users] Re: Transferring output file within environments using SQR when the SQR Report is run on NT (Dattatraya Shetty) > Hi Datta, > > Thank you very much for the reply regarding the transfer of files. I > will try as per your suggestion > > Raghav > > On 4/23/05, sqr-users-request@sqrug.org wrote: > > Send sqr-users mailing list submissions to > > sqr-users@sqrug.org > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://www.sqrug.org/mailman/listinfo/sqr-users > > or, via email, send a message with subject or body 'help' to > > sqr-users-request@sqrug.org > > > > You can reach the person managing the list at > > sqr-users-owner@sqrug.org > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of sqr-users digest..." > > > > > > Today's Topics: > > > > 1. Re: Transferring output file within environments using SQR > > when the SQR Report is run on NT (Dattatraya Shetty) > > 2. RE: Transferring output file within environments usin g SQR > > when the SQR Report is run on NT (jeff_molloy@adp.com) > > > > > > > > ---------- Forwarded message ---------- > > From: Dattatraya Shetty > > To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." > > Date: Fri, 22 Apr 2005 06:13:26 -0700 (PDT) > > Subject: Re: [sqr-users] Transferring output file within environments using SQR when the SQR Report is run on NT > > Hi Raghav, > > This might be fairly simple if you can create a share for the TST > > box and create a mapping on the machine where the SQR is running. > > > > e.g > > map Z: = \\TSTSERVER\sharedrive. > > > > Once you have this you can simply execute a copy command using the > > system call to copy the file that might be the quickest of all options. > > > > let $cmd = 'copy \\DEVSERVER\filename Z:\filename' > > > > call system using $cmd status=#stat > > > > ! check the return status. > > > > if not you may have to do an ftp. like in the script below, make sure > > there is an ftp program available on the NT box and try to manually ftp > > to the TST box from DEV and then you can use the script below with > > changes to hostname userid and password. etc > > > > HTH > > Datta. > > --- Raghvendra Dharwada wrote: > > > Hi all, > > > Can anyone help me how to write a script in an SQR program that can > > > transfer (copy) a file from one environment to another (say DEV to > > > TST) (network folders) in Windows NT ? > > > > > > The scenario is like this: > > > > > > The SQR is run on NT. > > > It creates an output file in DEV (in some folder) > > > This file should be transferred to TST (in some folder) > > > > > > Here are the software versions I am using > > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > > 8.0.6/Mar 26 2004 > > > PeopleSoft: 8.8 > > > Oracle: 9i > > > > > > I came across a script that transfers file from UNIX to NT i.e After > > > the SQR runs on UNIX > > > it transfers to NT. > > > The code that I came across is as follows: > > > I write the script in a file, execute it using the move-files > > > procedure > > > > > > begin-procedure write-sh-file > > > let $file-path = 'cd /home/out/payroll' > > > let $L1 = 'HOST=' || '''x.x.x.x''' > > > let $L2 = 'USER=' || '''usename''' > > > let $L3 = 'PASSWD=' || '''pwd''' > > > let $L4 = 'echo ' || '"remote Login attempted"' > > > let $L5 = 'ftp -n $HOST < > > let $L6 = 'quote USER $USER' > > > let $L7 = 'quote PASS $PASSWD' > > > let $L8 = 'cd /GL/Reports' > > > let $L9 = 'prompt' > > > let $L10 = 'put ' || $filename1 > > > let $L11 = 'END_SCRIPT' > > > let $L12 = 'FTP_RETURN_CODE=$?' > > > let $L13 = 'if [ $FTP_RETURN_CODE = 0 ]; then' > > > let $L14 = 'echo ' || '"Transfered Successful, deleting > > > source files"' > > > let $L15 = 'cd /home/out/payroll' > > > let $L16 = 'delete ' || $filename1 > > > let $L17 = 'exit 0' > > > let $L18 = 'else' > > > let $L19 = 'echo' || '"Transfered failed"' > > > let $L20 = 'exit 1' > > > let $L21 = 'fi' > > > > > > > > > write 2 from $file-path > > > write 2 from $L1 > > > ----- > > > ----- > > > > > > End-procedure > > > > > > In the above procedure : > > > $filename1 = $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > > || '.csv' > > > > > > > > !----------------------------------------------------------------------- > > > !Procedure : move-files > > > !Called By : wrap-up > > > > > !----------------------------------------------------------------------- > > > begin-procedure move-files > > > let $path = '/export/home/psadmin/scripts/' > > > let $file = 'sh ' || $path || 'cbgl0007.sh' > > > > > > call system using $file #status3 > > > > > > if #status3 <> 0 > > > display ' call status: ' noline > > > display #status3 > > > end-if > > > if #status3 = 0 > > > display 'Unix script Executed' > > > end-if > > > > > > End-Procedure > > > > > > Now I need a similar or any script, that when the SQR is run on NT > > > and > > > after it creates an > > > output file in a specific folder in DEV, it should get transferred > > > to > > > a folder in TST > > > or vice versa. > > > Pls let me know > > > > > > Thanks > > > Raghav > > > > > > _______________________________________________ > > > sqr-users mailing list > > > sqr-users@sqrug.org > > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > > > > ---------- Forwarded message ---------- > > From: jeff_molloy@adp.com > > To: sqr-users@sqrug.org > > Date: Fri, 22 Apr 2005 09:32:37 -0400 > > Subject: RE: [sqr-users] Transferring output file within environments usin g SQR when the SQR Report is run on NT > > Also, if you do not want to map the drive, just put the > > \\TSTSERVER\sharedrive in double quotes. That will work also. > > > > "\\TSTSERVER\sharedrive" > > > > Jeff Molloy > > > > -----Original Message----- > > From: Dattatraya Shetty [mailto:datta_shetty@yahoo.com] > > Sent: Friday, April 22, 2005 9:13 AM > > To: This list is for discussion about the SQR database reporting language > > from Hyperion Solutions. > > Subject: Re: [sqr-users] Transferring output file within environments using > > SQR when the SQR Report is run on NT > > > > Hi Raghav, > > This might be fairly simple if you can create a share for the TST > > box and create a mapping on the machine where the SQR is running. > > > > e.g > > map Z: = \\TSTSERVER\sharedrive. > > > > Once you have this you can simply execute a copy command using the > > system call to copy the file that might be the quickest of all options. > > > > let $cmd = 'copy \\DEVSERVER\filename Z:\filename' > > > > call system using $cmd status=#stat > > > > ! check the return status. > > > > if not you may have to do an ftp. like in the script below, make sure > > there is an ftp program available on the NT box and try to manually ftp > > to the TST box from DEV and then you can use the script below with > > changes to hostname userid and password. etc > > > > HTH > > Datta. > > --- Raghvendra Dharwada wrote: > > > Hi all, > > > Can anyone help me how to write a script in an SQR program that can > > > transfer (copy) a file from one environment to another (say DEV to > > > TST) (network folders) in Windows NT ? > > > > > > The scenario is like this: > > > > > > The SQR is run on NT. > > > It creates an output file in DEV (in some folder) > > > This file should be transferred to TST (in some folder) > > > > > > Here are the software versions I am using > > > $sqr-ver: SQR for PeopleSoft/8.44.08 /Sun/SunOS 5.6/Oracle > > > 8.0.6/Mar 26 2004 > > > PeopleSoft: 8.8 > > > Oracle: 9i > > > > > > I came across a script that transfers file from UNIX to NT i.e After > > > the SQR runs on UNIX > > > it transfers to NT. > > > The code that I came across is as follows: > > > I write the script in a file, execute it using the move-files > > > procedure > > > > > > begin-procedure write-sh-file > > > let $file-path = 'cd /home/out/payroll' > > > let $L1 = 'HOST=' || '''x.x.x.x''' > > > let $L2 = 'USER=' || '''usename''' > > > let $L3 = 'PASSWD=' || '''pwd''' > > > let $L4 = 'echo ' || '"remote Login attempted"' > > > let $L5 = 'ftp -n $HOST < > > let $L6 = 'quote USER $USER' > > > let $L7 = 'quote PASS $PASSWD' > > > let $L8 = 'cd /GL/Reports' > > > let $L9 = 'prompt' > > > let $L10 = 'put ' || $filename1 > > > let $L11 = 'END_SCRIPT' > > > let $L12 = 'FTP_RETURN_CODE=$?' > > > let $L13 = 'if [ $FTP_RETURN_CODE = 0 ]; then' > > > let $L14 = 'echo ' || '"Transfered Successful, deleting > > > source files"' > > > let $L15 = 'cd /home/out/payroll' > > > let $L16 = 'delete ' || $filename1 > > > let $L17 = 'exit 0' > > > let $L18 = 'else' > > > let $L19 = 'echo' || '"Transfered failed"' > > > let $L20 = 'exit 1' > > > let $L21 = 'fi' > > > > > > > > > write 2 from $file-path > > > write 2 from $L1 > > > ----- > > > ----- > > > > > > End-procedure > > > > > > In the above procedure : > > > $filename1 = $Dept_Id || '_' || 'xxgl21_' || $prcs_process_instance > > > || '.csv' > > > > > > > > !----------------------------------------------------------------------- > > > !Procedure : move-files > > > !Called By : wrap-up > > > > > !----------------------------------------------------------------------- > > > begin-procedure move-files > > > let $path = '/export/home/psadmin/scripts/' > > > let $file = 'sh ' || $path || 'cbgl0007.sh' > > > > > > call system using $file #status3 > > > > > > if #status3 <> 0 > > > display ' call status: ' noline > > > display #status3 > > > end-if > > > if #status3 = 0 > > > display 'Unix script Executed' > > > end-if > > > > > > End-Procedure > > > > > > Now I need a similar or any script, that when the SQR is run on NT > > > and > > > after it creates an > > > output file in a specific folder in DEV, it should get transferred > > > to > > > a folder in TST > > > or vice versa. > > > Pls let me know > > > > > > Thanks > > > Raghav > > > > > > _______________________________________________ > > > sqr-users mailing list > > > sqr-users@sqrug.org > > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > ----------------------------------------- > > This message and any attachments are intended only for the use of the > > addressee and may contain information that is privileged and confidential. > > If the reader of the message is not the intended recipient or an authorized > > representative of the intended recipient, you are hereby notified that any > > dissemination of this communication is strictly prohibited. If you have > > received this communication in error, notify the sender immediately by > > return email and delete the message and any attachments from your system. > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > > > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 27 11:02:34 2005 From: "radhika reddy" Date: Wed, 27 Apr 2005 11:01:31 -0500 Subject: [sqr-users] SQR output Hi, Does anybody know whether SQR can create a word document as output? Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 27 14:02:15 2005 Date: Wed, 27 Apr 2005 12:01:10 -0700 (PDT) From: Clara Carter Subject: Re: [sqr-users] SQR output No it cannot. cc --- radhika reddy wrote: > Hi, > > Does anybody know whether SQR can create a word > document as output? > > Thanks. > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! > Download today - it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 27 14:40:46 2005 Subject: Re: [sqr-users] SQR output Date: Wed, 27 Apr 2005 19:40:09 -0000 From: Hi. You can launch Word with a SYSTEM call from SQR. Therefore you can create a file in SQR with say extension .txt and open Word on that file. If you know VBA you can also SENDKEYS to Word from SQR but the formatting tends not to be very good. John Willson Clara Carter said: > No it cannot. > > cc > --- radhika reddy wrote: > > Hi, > > > > Does anybody know whether SQR can create a word > > document as output? > > > > Thanks. > > > > > _________________________________________________________________ > > Express yourself instantly with MSN Messenger! > > Download today - it's FREE! > > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > -- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 27 14:58:58 2005 From: "John F. Connell Jr." Date: Wed, 27 Apr 2005 15:57:42 -0400 Subject: [sqr-users] SQR PDF To DOC or RTF I know this is a bit off topic however I'm looking to convert a PDF output file to doc or rtf file in sqr or by using a command line utility. Does anyone know or have experience using a PDF to doc or rtf command line utility that could perform this task? Regards, John John F. Connell Jr. JFC & Associates 53 Perch Pond Road Chatham, MA 02633 email - jfc.associates@comcast.net www - www.williamsconnell.com Phone - 1 (508) 945-4191 Fax - 1 (508) 945-1609 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Apr 27 15:14:37 2005 Date: Wed, 27 Apr 2005 16:13:09 -0400 From: "Jamie Harris" Subject: Re: [sqr-users] SQR output If you have SQR create a text file with the .doc extension, it will open in Word. However, you can't have any formatting in the file (colors, font, etc.). I do a similar thing with Excel. A tab-delimited file named with .xls extension opens in Excel (.csv files do too - but I hate the .csv format - much more complex to deal with than tab delimited ;) ----------------------------------------------------- James Harris Junior Systems Programmer/Analyst Information Technology Division Frederick Community College ----------------------------------------------------- >>> radhika_05@hotmail.com 4/27/2005 12:01 PM >>> Hi, Does anybody know whether SQR can create a word document as output? Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 28 02:39:08 2005 From: "Steve Cavill" Subject: RE: [sqr-users] SQR output Date: Thu, 28 Apr 2005 17:37:44 +1000 If you can get a good reference you could write rtf output as a text file. Steve. -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of radhika reddy Sent: Thursday, 28 April 2005 2:02 AM To: sqr-users@sqrug.org Subject: [sqr-users] SQR output Hi, Does anybody know whether SQR can create a word document as output? Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 28 08:16:06 2005 From: "radhika reddy" Subject: Re: [sqr-users] SQR output Date: Thu, 28 Apr 2005 08:15:02 -0500 Thanks for all the responses. Yes, I could create a Word doc as output by changing .txt file to .doc file in my sqr. Thanks. >From: "Jamie Harris" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: >Subject: Re: [sqr-users] SQR output >Date: Wed, 27 Apr 2005 16:13:09 -0400 > > > >If you have SQR create a text file with the .doc extension, it will >open in Word. However, you can't have any formatting in the file >(colors, font, etc.). > >I do a similar thing with Excel. A tab-delimited file named with .xls >extension opens in Excel (.csv files do too - but I hate the .csv format >- much more complex to deal with than tab delimited ;) > > > >----------------------------------------------------- >James Harris >Junior Systems Programmer/Analyst >Information Technology Division >Frederick Community College >----------------------------------------------------- > > >>> radhika_05@hotmail.com 4/27/2005 12:01 PM >>> > >Hi, > > Does anybody know whether SQR can create a word document as >output? > >Thanks. > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's >FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Apr 28 09:48:29 2005 Date: Thu, 28 Apr 2005 10:47:17 -0400 From: "George Jansen" Subject: Re: [sqr-users] SQR output It seems to me that Word 2003 will import XML. That might be worth a try if= your customer has W2003. http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Apr 29 15:50:38 2005 Date: Fri, 29 Apr 2005 13:49:33 -0700 (PDT) From: Joe Massian Subject: [sqr-users] PeopleSoft SQR, Calling PLSQL dynamically My question is, do you know how I can call a PL SQL package dynamically from a PeopleSoft run control table? I am entering the following into the RC table: LOAD_FS_ZZ_JRNL_LN3_TO_EPM.LOAD_JRNL_LN3 These are my return variables: ($ERROR, $MESSAGE, #SOURCE_COUNT, #TARGET_BEFORE_LOAD_COUNT, #TARGET_AFTER_LOAD_COUNT) My dynamic section looks like this so far.. Begin-SQL ! Begin ! [$EXECUTE_PACKAGE] ;; ! End;; ! End-SQL I build the $EXECUTE_PACKAGE using the following: Begin-Procedure Get-Input-Filename ! ! #ifdef debug Display 'Entered Get-Input-Filename Procedure.' ! #endif ! Begin-Select ! REPORT_NAME &REPORT_NAME FIELD2 &FIELD2 ! Let $Source_File = LTRIM(RTRIM(&REPORT_NAME, ' '),' ') ! Let $Source_File = LTRIM(RTRIM(&FIELD2, ' '),' ') Show '- Oracle PL/SQL package requested: ' &FIELD2 ! ! Build PL/SQL package call for Oracle... Let $EXECUTE_PACKAGE = &FIELD2 || '($ERROR, $MESSAGE, #SOURCE_COUNT, #TARGET_BEFORE_LOAD_COUNT, #TARGET_AFTER_LOAD_COUNT)' Show '- Oracle PL/SQL Package built: ' $EXECUTE_PACKAGE ! FROM PS_ZZ_PLSQL_RC_TBL ! WHERE OPRID = $PRCS_OPRID AND RUN_CNTL_ID = $PRCS_RUN_CNTL_ID ! End-Select ! ! #ifdef debug Display 'Exiting Get-Input-Filename Procedure.' ! endif ! End-Procedure Get-Input-Filename __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Sun May 01 00:00:39 2005 Date: Sun, 1 May 2005 00:00:03 -0500 From: Nathan Stratton Treadway Subject: [sqr-users] Monthly sqr-users Hints Posting sqr-users Mailing List Hints and Guidelines Nathan Stratton Treadway, Ray Ontko & Co. (nathanst@ontko.com) $Revision: 1.21 $ $Date: 2004-03-04 02:47:15-05 $ This document gathers in one location information about the sqr-users mail list. It includes instructions for changing your subscription settings (including unsubscribing), as well are guidelines for using the list. ______________________________________________________________________ Table of Contents 1. Changes Since Previous Version 2. Introduction 2.1 sqr-users Mailing List 2.2 sqr-users Hints and Guidelines Document 2.3 Related Mailing Lists 3. Interacting with the list server 3.1 Subscribing to the list 3.2 Unsubscribing from the list 3.3 When your email address changes 3.4 Digests 3.5 Obtaining your password 3.6 Problems 4. Posting to the sqr-users List 4.1 General Guidelines 4.2 Posting a Message 4.3 Replying to a Message 5. Job Announcements ______________________________________________________________________ 1. Changes Since Previous Version Changes since the version dated 2003/11/01: o Update subscribe/unsubscribe instructions for new version of list server software. o New URL for "brio-l" mailing list. 2. Introduction 2.1. sqr-users Mailing List The sqr-users mailing list was created to enable discussion related to the SQR database language from Hyperion (and to other products in the SQR product suite). Note: SQR used to be published by SQRIBE Technologies, which was merged into Brio Technology on August 3, 1999. Brio Technology changed its name to Brio Software in October 2001. On October 16, 2003, Hyperion acquired Brio Software. SQR and related applications have also been called "Brio.Report" and "Brio Reports". The mailing list is provided as a service of Ray Ontko & Co. A searchable archive of past postings to the mailing list is available from the SQR Users Group web site . 2.2. sqr-users Hints and Guidelines Document This document gives various hints and guidelines about the sqr-users mailing list. It will be posted approximately monthly to the mailing list so that new users can see it (and existing users can find it easily). An HTML version of the document is always available at http://www.sqrug.org/sqr-users/sqr-users-hints.html. If you have comments or suggestions about this document, please contact me directly at the address listed in the title section. This document is Copyright (C) 1999-2004 by Ray Ontko & Co. It may be freely copied and distributed provided it is not modified in any way and it retains the original copyright notice. 2.3. Related Mailing Lists Here are some mailing lists that cover topics relating to SQR in some way. sqr-jobs : SQR Jobs This list may be used for posting SQR-related resumes, recruitments, job announcements, project announcments, help- wanted, work-wanted ads, etc. To join, follow the link above, or send any message to "sqr-jobs-subscribe@yahoogroups.com". peoplesoft-fans : PeopleSoft Fans Moderated list covering technical and functional aspects of PeopleSoft. To join, follow the link above, or send any message to "peoplesoft-fans-subscribe@yahoogroups.com". psusers : PeopleSoft Users For questions related to any aspect of PeopleSoft (including PeopleSoft-specific SQR issues). This list has merged with the Peoplesoft Fans mailing list and is no longer active, but the message achive can still be found at the link above. BrioSQRReport : Brio SQR Report List for discussion of SQR and SQR Developer (formerly called Brio.Report and Report Builder). To join, follow the link above, or send any message to "BrioSQRReport- subscribe@yahoogroups.com". rm-users : Report- Mart Users List for discussion of Brio Portal (previously called ReportMart). To join, follow the link above, or send a message containing the word "subscribe" in the body to "rm-users- request@sqrug.org". brioportalusersgroup : Brio Portal Users Group list List for discussion of Brio Portal. To join, follow the link above, or send any message to "brioportalusersgroup- subscribe@yahoogroups.com". brio-l : OpenITx Brio List List for technical and functional discussion of all Brio products (but most messages are currently about Brio Intelligence). To join, follow the link above. briousers : Brio.Enter- prise Users List for discussion of the Brio.Enterprise (now called Intelligence) product. To join, follow the link above, or send any message to "briousers-subscribe@yahoogroups.com". briolist : Brio List List for discussion of Brio Intelligence. To join, follow the link above, or send any message to "briolist- subscribe@yahoogroups.com". 3. Interacting with the list server The sqr-users mailing list is hosted using the Mailman list server package. All of the Mailman functions described below are accessed from the sqr-users List Info page, "http://www.sqrug.org/mailman/listinfo/sqr-users". 3.1. Subscribing to the list To subscribe to the mailing list, enter your e-mail address in the box at the top of the "Subscribing to sqr-users" section on the sqr-users List Info page, then choose a password to assign to your subscription and enter it in both "Password" boxes. This password is used to allow you to securely make changes to your subscription over the web. This password will be e-mailed back to you at varous times, so you should not use the same password as you are using elsewhere. Once you have filled in the password, click the "Subscribe" button. You should soon receive an e-mail message from the list server requesting confirmation of your subscription request. Once you have replied to this message and your subscription has been processed, you will receive a "welcome" message giving you more information on the list server, and as well as a reminder of the subscription password you chose. 3.2. Unsubscribing from the list To unsubscribe from the list, go to the sqr-users List Info page, enter your e-mail address in the "sqr-users Subscribers" section near the bottom of the page, and click the "Unsubscribe or edit options" button. You will then see the "member options" page; fill in your password at the top of the page and click "Log in". (If you have forgotton your password, see the ``Obtaining your Password'' section, below). This will take you to the "membership configuration" page. In the middle of that page, there will be an "Unsubscribing from sqr- users" section; simply turn on the "Yes, I really want to unsubscribe" checkbox and click the "Unsubscribe" button. You should get a page back saying that the removal was successful (as well as a confirmation email message). The removal will take effect immediately; there is no need to send in a confirmation e-mail message. If you don't know your password, you can choose to unsubscribe using e-mail confirmation. Instead of entering the password on the "member options" page, just click the "Unsubscribe" button found just below the "Log In" button. You will then see a page noting that a confirmation e-mail has been sent; once you follow the confirmation instructions in that e-mail your removal will be complete. 3.3. When your email address changes If your e-mail address changes -- for example, if your company changes names, or if your mail administrator changes the way your name is spelled out or abbreviated -- you will need to update your subscription to match your new address before you can post to the list (see the ``Posting'' section, below). To do this, simply log in to your "membership configuration" page (see the directions for logging in to this page in the ``Unsubscribing'' section, above). At the top of that page you'll see a "Changing your membership information" section. Fill out the text boxes and click the "Change My Address and Name" button. You will be sent a confirmation e-mail, and once you have responded to that e-mail your subscription will be updated and you can begin posting from your new address. 3.4. Digests You can request to get your messages in digest form (one large message containing all of the posts made each day). To do this, log in to your "membership configuration" page (see the directions on doing this in the ``Unsubscribing'' section, above). At the bottom of the page, you will see a section titled "Your sqr-users Subscription Options". Change the "Set Digest Mode" option (the second option in the list) to "On" and click the "Submit My Changes" button at the bottom of the page. You actually have a choice of two different digest formats, "MIME" or "Plain Text". The MIME format sends each individual list message as a separate MIME attachment to the digest; the plain text format consists of one large text message, with all of the individual messages run together. Which format you will want to use depends on your mail- reading software (and personal preference). If you are not sure which format will work best, you can just leave the default setting of "MIME" and see if the next morning's digest is easy to read in your mail reader -- you can change to the other format at any time using that same web page. If you use digests, you should not just "reply" to the digest mailing. Instead, be sure your message's subject header matches the subject in the original posting to which you are replying, and that you don't include a quoted copy of the entire digest in your post. To restore normal distribution, simply follow the above instructions choosing the "Off" setting for the Digest option. 3.5. Obtaining your password You will not be able to change your subscription options without your password. If you have forgotten your password, simply click the "Email My Password to Me" button on the "member options" page and your password will be emailed to you. You will also be e-mailed a copy of your password at the beginning of each month, as part of a "mailing list memberships reminder" message from the Mailman software. 3.6. Problems If the above instructions do not work, please contact the list manager at "sqr-users-manager@sqrug.org". (Do not send a message to the list itself -- no one there can help you with your problem!) Please include a description of what you were trying to do and what exactly happened when you made the attempt. 4. Posting to the sqr-users List In order to post to the mailing list, you must be subscribed to it (see directions above). More specifically, in order for Mailman to recognize that this message was sent by a subscriber, the return address on your message much exactly match the addresss you used to subscribe -- if you have more than one address you will need to be sure that you are sending from the correct one. (See the ``When you email address changes'' section, above, if your e-mail address has changed since you subscribed.) 4.1. General Guidelines For any message you send to the list, please: o make sure your mail software is not requesting a "Return Receipt". (If a "Return Receipt Requested" message is sent to the list, several dozen receipt messages will be sent out to the mailing list as other subscribers' mail systems repond....) o do not send messages in HTML or other special formats. (These are not usable by many subscribers, especially those who receive their messages in digest format.) The list server will delete these special attachments from your message and send you a warning notice. Also, if you are trying to send (for example) SQR source code files, make sure your mail-reader software is assigning proper MIME types to your attachments or they may not be distributed. o keep in mind that over 500 people will receive your message, and that it will appear in the list archives. Try to keep your messages on-topic and relatively short. Consider sending your message directly to particular people if it won't interest many of the list's subscribers. o ignore abusive and inappropriate messages that get sent to the list, rather than getting drawn into a debate. The very nature of these messages will cause most subscribers to automatically discredit them -- no "response" is necessary. To the contrary, any response will only "add fuel to the fire," prolonging the controversy and further interupting the normal conversation on the list. 4.2. Posting a Message Once you are subscribed, you can post to the list by sending a message to "sqr-users@sqrug.org". Be sure your subject heading describes your specific problem or question (i.e. don't just use "SQR Question"). In the body of your message, please include the following information: o SQR product name and version number (see notes below) o Operating system name and version number o Database name and version number o Application name (i.e. PeopleSoft) and a version number, if any Also, include a short code sample whenever possible. It's much easier for other people to understand what you are trying to do when they can see the actual code. (At the same time, be careful not to post confidential or proprietary code, since the posting will be placed in a public web archive.) Note that your question should relate to SQR or other Brio Report product in some way. Don't ask questions about PeopleSoft, for example, unless you are having SQR-related issues. (For PeopleSoft- specific questions, see other lists mentioned in the ``Related Mailing Lists'' section.) In 2001, PeopleSoft purchased from Brio the rights to the source code for SQR and began releasing its own line of SQR. PeopleSoft's SQR version numbering is different from Brio/Hyperion's, so it's very important to mention whether you are using Hyperion's "SQR" or "SQR for PeopleSoft". (This info is included automatically if you include the full SQR version-id string as described below.) To get the version-id string for your copy of SQR, you can run the following program: begin-program show $sqr-ver end-program This will produce a line that looks something like this: SQR/3.0.15/Intel/SCO Unix R3.2 V5.0/Oracle 7.2.2.3/Sep 25 1996 Include the full line of output in your message. Note that the oper- ating system and database version numbers listed here are the ones under which this copy of SQR was compiled, so you'll still need to include this information for your own environment. In a command-line environment (Unix, etc.), you can also get this version-id string by saying sqr -id 4.3. Replying to a Message Messages sent out on the list have a Reply-To header pointing to the list. This means that you should be able to simply use your mail reader's "reply" function to send a reply to the list. Generally, all answers to questions sent out on the list should be public replies, so that other subscribers can benefit. In those cases where a private reply is appropriate, be sure to over-ride the default Reply-To address. If your message is not actually a reply to the earlier message, please do not use the "reply" function. Instead, address a new e-mail message to the list as described in the previous section. (This is because the list archives will incorrectly show the new message in the original thread if you use "reply".) You should quote enough lines from the original message that later readers can understand your answer even if they missed the original question. At the same time, you should remove any unnecessary lines from the quote in order to make your message shorter and easier to understand. (Remember that some people read the mailing list in digest form, and the digests become much larger if unnecessary lines are quoted.) 5. Job Announcements Please do not post job announcements on the sqr-users list, but use the sqr-jobs list instead. (See ``Related Mailing Lists'' for more information on this list.) A large number of sqr-users subscribers do not want to receive job announcements (for various reasons) and such posts tend to cause a lot of disruption of the discussion on the list. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 03 00:17:22 2005 Date: Mon, 2 May 2005 22:16:17 -0700 (PDT) From: aravind kumar Subject: RE: [sqr-users] Flat File Hi Radhika, It might be bad inbound file. Check for the two blank rows in the end of input file. That might be problem. Aravind --- "Kaithi, Murali" wrote: > Hi Radhika, > I am hoping its bad text file. I experienced this > kind of problem > before. > Check your text file thoroughly. > > Murali. > > -----Original Message----- > From: > sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org > [mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] > On > Behalf Of radhika reddy > Sent: Sunday, April 10, 2005 12:40 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Flat File > > Hi, > > I am reading a flat file and inserting into > tables(Inbound > interface). I am having a problem reading it, when i > reach end of file > it is still looking for data and taking it as empty > record. The program > is working good except that the number of errors is > added by 1 though > it's not. > > I use While loop for looping through the flat file > and also i am > checking end of file condition too. Is this the bad > flat file or am I > missing something? > > Thanks. Any input would be appreciated. > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN > Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email > Security System. > For more information please visit > http://www.messagelabs.com/email > ______________________________________________________________________ > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 03 06:06:42 2005 Date: Tue, 3 May 2005 07:04:30 -0400 (GMT-04:00) From: "fpickava@earthlink.net" Subject: RE: [sqr-users] Flat File Edit the input and delete all spaces beyound the last good record. Frank P. -----Original Message----- From: aravind kumar Sent: May 3, 2005 1:16 AM To: "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Subject: RE: [sqr-users] Flat File Hi Radhika, It might be bad inbound file. Check for the two blank rows in the end of input file. That might be problem. Aravind --- "Kaithi, Murali" wrote: > Hi Radhika, > I am hoping its bad text file. I experienced this > kind of problem > before. > Check your text file thoroughly. > > Murali. > > -----Original Message----- > From: > sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org > [mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] > On > Behalf Of radhika reddy > Sent: Sunday, April 10, 2005 12:40 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Flat File > > Hi, > > I am reading a flat file and inserting into > tables(Inbound > interface). I am having a problem reading it, when i > reach end of file > it is still looking for data and taking it as empty > record. The program > is working good except that the number of errors is > added by 1 though > it's not. > > I use While loop for looping through the flat file > and also i am > checking end of file condition too. Is this the bad > flat file or am I > missing something? > > Thanks. Any input would be appreciated. > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN > Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email > Security System. > For more information please visit > http://www.messagelabs.com/email > ______________________________________________________________________ > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 04 12:58:32 2005 Date: Wed, 4 May 2005 13:57:28 -0400 (EDT) From: Jay Subject: [sqr-users] SQL Server - Connect to different Server Hi all, Peopletools 8.45.10, App 8.8, SQR for Peoplesoft V8.45.10, NT servers. I have a requirement to run an SQR that truncates/selects from our HRPRJ81 (HR) database and insert to our FSDEV8 (Finance) database. The databases exist on physically different servers. I've gone through the archives and used that as the basis for my sql, but I'm not having any luck. This code: Begin-SQL -DB'DSN=HRPRJ81;UID=peoXXX;PWD=peoXXX' TRUNCATE TABLE PS_TL_PROJECT TRUNCATE TABLE PS_TL_PRODUCT_TBL TRUNCATE TABLE PS_TL_USER_FIELD_1 TRUNCATE TABLE PS_TL_USER_FIELD_2 end-SQL when running on our FSDEV8 gives this error: SQR 1803) CONNECT failed. Perhaps username/password incorrect. SQR for PeopleSoft: Program Aborting. Some of the archives mention an ODBC version of SQR. Do we have to use a different version of SQR? I am using the same User ID and Password I specify in my local ODBC setup for HRPRJ81. Is that correct? Do I have to put the server name in front of the database name like I do through Query Analyzer? Any help appreciated. thanks jay ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 04 13:09:15 2005 Date: Thu, 05 May 2005 04:07:48 +1000 From: "Ian Mills" Subject: Re: [sqr-users] SQL Server - Connect to different Server (On Leave) I will be on leave from 5/5/2005 to 9/5/2005. If you need assistance during this time, please contact Raymond Beddie. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 05 04:02:02 2005 From: "Ravindran Rajan" Date: Thu, 5 May 2005 14:29:22 +0530 Subject: [sqr-users] Reg : Hyperion Integration Hi all, This is my first mail to this Group. I have some Problem with integrating Hyperion SQR with .NET Web Application. I have tried to run .SQR file using SQRW.exe Command line execution & used it in Java Script. I tried to include sqrw.dll file as a reference in .NET but it is not a COM supported DLL so it is not included... Is there any other method to Integrate like Using DLL or API's....... If possible give me some sample coding............. Thank you.. ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 05 08:14:40 2005 Subject: Re: [sqr-users] SQL Server - Connect to different Server From: Ramzi_Salameh@daveandbusters.com Date: Thu, 5 May 2005 08:12:13 -0500 If your database platform is MS SQL Server you may have to create a linked server from one database to the other. ----------------------------------------------------- Ramzi Salameh Senior Technical Analyst (214) 904-2550 Dave and Buster's, Inc. ----------------------------------------------------- Jay Sent by: sqr-users-bounces+ramzi_salameh=daveandbusters.com@sqrug.org 05/04/2005 12:57 PM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." To: sqr-users@sqrug.org cc: Subject: [sqr-users] SQL Server - Connect to different Server Hi all, Peopletools 8.45.10, App 8.8, SQR for Peoplesoft V8.45.10, NT servers. I have a requirement to run an SQR that truncates/selects from our HRPRJ81 (HR) database and insert to our FSDEV8 (Finance) database. The databases exist on physically different servers. I've gone through the archives and used that as the basis for my sql, but I'm not having any luck. This code: Begin-SQL -DB'DSN=HRPRJ81;UID=peoXXX;PWD=peoXXX' TRUNCATE TABLE PS_TL_PROJECT TRUNCATE TABLE PS_TL_PRODUCT_TBL TRUNCATE TABLE PS_TL_USER_FIELD_1 TRUNCATE TABLE PS_TL_USER_FIELD_2 end-SQL when running on our FSDEV8 gives this error: SQR 1803) CONNECT failed. Perhaps username/password incorrect. SQR for PeopleSoft: Program Aborting. Some of the archives mention an ODBC version of SQR. Do we have to use a different version of SQR? I am using the same User ID and Password I specify in my local ODBC setup for HRPRJ81. Is that correct? Do I have to put the server name in front of the database name like I do through Query Analyzer? Any help appreciated. thanks jay ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon May 09 11:19:12 2005 From: Roger.Harris@certegy.com Date: Mon, 9 May 2005 12:17:55 -0400 Subject: [sqr-users] SQR knowledge testing I have been tasked to develop an SQR knowledge test to pre-screen potential job candidates. Has anyone else come up with a 20 questions type list that they would be willing to share? Thanx ------------------------------------------------------------------------------ This message contains information from Certegy, Inc which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e:mail postmaster@certegy.com. ============================================================================== _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon May 09 11:36:48 2005 Date: Mon, 9 May 2005 12:35:48 -0400 (EDT) From: Janet Shum Subject: [sqr-users] SQR - font prints bold when not set to bold Hi I do not believe I am using a line printer I am having trouble with the fonts. It seems like it is printing something in bold when the there is no bold after the print command, even after I set the font with alter printer right before it Anyone else run into anything similar ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 09:27:12 2005 From: "Wyatt, Will" Date: Tue, 10 May 2005 09:37:52 -0500 Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 09:55:57 2005 From: Bob Stone Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 09:54:48 -0500 It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:02:53 2005 From: "Wyatt, Will" Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 10:13:23 -0500 I changed the subquery to just say 'AND N_ED.EFFDT <= $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:05:56 2005 From: "radhika reddy" Date: Tue, 10 May 2005 10:01:47 -0500 Subject: [sqr-users] date format Hi, I always have tough time to format dates. This time the date that I get from a flat file is in 'YYYYMMDD' format. However i do it i get errors. I tried doing something like this:- Let $activity_date = edit($activity_date, 'dd-mon-yyyy') or let $activity_date = to_char(to_date($activity_date, 'YYYYMMDD'), 'dd-MON-yyyy') and let $activity_date = Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') and begin-select on-error=print-date-error to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') &activitydate move &activitydate to $activity_date from dual Any idea where i am going wrong on this? Thanks. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:08:53 2005 From: James Womeldorf Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 10:04:39 -0500 Hi Will, Just a thought, but are you certain that $AsOfDate is actually a string and not a date? I'm not acquainted with the CONVERT function but it looks like it is expecting a string in this case. SQR has this 'neat' feature of using the same symbol $ to designate strings and dates and sometimes I get them confused. Jim -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:12:22 2005 Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 08:08:25 -0700 From: "Pedroza, Maricela" Have you tried replacing the effdt logic with something like,=20 AND N_ED.EFFDT <=3D SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10) Maricela -----Original Message----- From: sqr-users-bounces+mpedroza=3Dcerritos.edu@sqrug.org [mailto:sqr-users-bounces+mpedroza=3Dcerritos.edu@sqrug.org] On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 8:13 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table I changed the subquery to just say 'AND N_ED.EFFDT <=3D $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=3Daisd.org@sqrug.org [mailto:sqr-users-bounces+willw=3Daisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <=3D $AsOfDate " it might go through.=20=20 Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT =3D=20 ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID =3D N_ED.EMPLID AND N_ED.EFFDT <=3D SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT =3D=20 ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID =3D N_ED.EMPLID AND N_ED.EFFDT <=3D SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <=3D SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:15:28 2005 Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 10:11:43 -0500 From: "Lindquist, Maria" Did you try the following at all?=20 Let $Activity_Date =3D TO_DATE($Activity_date,'dd-mon-yyyy')=20 Maria -----Original Message----- From: sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org [mailto:sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org] On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 10:02 AM To: sqr-users@sqrug.org Subject: [sqr-users] date format Hi, I always have tough time to format dates. This time the date that I get from a flat file is in 'YYYYMMDD' format. However i do it i get errors. I tried doing something like this:- Let $activity_date =3D edit($activity_date, 'dd-mon-yyyy') or let $activity_date =3D to_char(to_date($activity_date, 'YYYYMMDD'), 'dd-MON-yyyy') and let $activity_date =3D Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') and begin-select on-error=3Dprint-date-error to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') &activitydate move &activitydate to $activity_date from dual Any idea where i am going wrong on this? Thanks. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee(r) Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:18:37 2005 From: "Wyatt, Will" Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 10:27:20 -0500 Based on what James Womeldorf and you have said I changed the query to: let $name = 'Wyatt' begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = $name ) AS A end-select and I still get an error, but begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = 'Wyatt' ) AS A end-select works, so I don't think it is the effective date logic. This list is amazing, I never expected to get help so quickly. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Pedroza, Maricela Sent: Tuesday, May 10, 2005 10:08 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: RE: [sqr-users] Virtual Table Have you tried replacing the effdt logic with something like, AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10) Maricela -----Original Message----- From: sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org [mailto:sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org] On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 8:13 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table I changed the subquery to just say 'AND N_ED.EFFDT <= $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:21:39 2005 Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 09:15:01 -0600 From: "Jon Alsager" Maybe try this: let $activity_date =3D strtodate($activity_date, 'YYYYMMDD') Jon -----Original Message----- From: sqr-users-bounces+jalsager=3Disif.state.id.us@sqrug.org [mailto:sqr-users-bounces+jalsager=3Disif.state.id.us@sqrug.org] On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 9:02 AM To: sqr-users@sqrug.org Subject: [sqr-users] date format Hi, I always have tough time to format dates. This time the date that I get=20 from a flat file is in 'YYYYMMDD' format. However i do it i get errors. I tried doing something like this:- Let $activity_date =3D edit($activity_date, 'dd-mon-yyyy') or let $activity_date =3D to_char(to_date($activity_date, 'YYYYMMDD'),=20 'dd-MON-yyyy') and let $activity_date =3D=20 Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') and begin-select on-error=3Dprint-date-error to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') &activitydate move &activitydate to $activity_date from dual Any idea where i am going wrong on this? Thanks. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee(r)=20 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:24:39 2005 Subject: Re: [sqr-users] Virtual Table From: Olga.Gal@bbh.com Date: Tue, 10 May 2005 11:18:55 -0400 I guess the other way of doing that could be creating a view with the select statement that is in the FROM Clause, and referencing that view in your FROM clause. Your view then should have EMPLID and EFFDT columns, and your main Where Clause should have the MAX subquery: BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM MY_VIEW A WHERE A.EFFDT = (SELECT MAX(EFFDT) FROM MY_VIEW B WHERE B.EMPLID = A.EMPLID AND EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) ) END-SELECT "Wyatt, Will" Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To "'sqr-users@sqrug.org'" 05/10/2005 10:37 AM cc Subject Please respond to [sqr-users] Virtual Table "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:28:00 2005 From: "radhika reddy" Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 10:25:30 -0500 yes, i tried and i get the following error: (SQR 4008) Unknown function or variable in expression: to_date let $activity_date = to_date($activity_date,'dd-mon-yyyy') thanks. >From: "Lindquist, Maria" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:11:43 -0500 > >Did you try the following at all? > >Let $Activity_Date = TO_DATE($Activity_date,'dd-mon-yyyy') > >Maria > >-----Original Message----- >From: sqr-users-bounces+mlindqui=uwc.edu@sqrug.org >[mailto:sqr-users-bounces+mlindqui=uwc.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:02 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] date format > >Hi, > > I always have tough time to format dates. This time the date that I >get from a flat file is in 'YYYYMMDD' format. However i do it i get >errors. > >I tried doing something like this:- > >Let $activity_date = edit($activity_date, 'dd-mon-yyyy') > >or > >let $activity_date = to_char(to_date($activity_date, 'YYYYMMDD'), >'dd-MON-yyyy') >and > >let $activity_date = >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > >and > >begin-select on-error=print-date-error >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') >&activitydate > move &activitydate to $activity_date >from dual > >Any idea where i am going wrong on this? > >Thanks. > >_________________________________________________________________ >Is your PC infected? Get a FREE online computer virus scan from >McAfee(r) Security. >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:31:15 2005 Subject: RE: [sqr-users] Virtual Table From: Olga.Gal@bbh.com Date: Tue, 10 May 2005 11:25:05 -0400 That is because the error DOESN'T refer to the Where Clause of your 'Virtual Table', but to the selected columns. In other words from some reason SQR is expecting alias name after NAMES.FIRST_NAME and NAMES.LAST_NAME "Wyatt, Will" Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To "'This list is for discussion about the SQR database reporting language from Hyperion Solutions.'" 05/10/2005 11:27 AM cc Subject Please respond to RE: [sqr-users] Virtual Table "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Based on what James Womeldorf and you have said I changed the query to: let $name = 'Wyatt' begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = $name ) AS A end-select and I still get an error, but begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = 'Wyatt' ) AS A end-select works, so I don't think it is the effective date logic. This list is amazing, I never expected to get help so quickly. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Pedroza, Maricela Sent: Tuesday, May 10, 2005 10:08 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: RE: [sqr-users] Virtual Table Have you tried replacing the effdt logic with something like, AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10) Maricela -----Original Message----- From: sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org [mailto:sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org] On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 8:13 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table I changed the subquery to just say 'AND N_ED.EFFDT <= $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:34:27 2005 Date: Tue, 10 May 2005 12:29:09 -0300 From: "PeterG Clark" Subject: Re: [sqr-users] date format This works for me ... ($indate contains the YYYYMMDD character string from your flat file) let $printdate =3D Datetostr(StrtoDate($indate,'YYYYMMDD'),'dd-MON-yyyy') I think the key is to use two different variables in your let statement. Pete >>> radhika_05@hotmail.com 2005/05/10 12:01:47 >>> Hi, I always have tough time to format dates. This time the date that I get= =20 from a flat file is in 'YYYYMMDD' format. However i do it i get errors. I tried doing something like this:- Let $activity_date =3D edit($activity_date, 'dd-mon-yyyy') or let $activity_date =3D to_char(to_date($activity_date, 'YYYYMMDD'),=20 'dd-MON-yyyy') and let $activity_date =3D=20 Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') and begin-select on-error=3Dprint-date-error to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') &activitydate move &activitydate to $activity_date from dual Any idea where i am going wrong on this? Thanks. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee=AE= =20 Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:37:25 2005 From: "peter daalder" Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 08:32:09 -0700 Can you do like Bob says, have an virtual table (I believe [$tablename]) that holds your query string? Peter -----Original Message----- From: sqr-users-bounces+pdaalder=2coolboarders.com@sqrug.org [mailto:sqr-users-bounces+pdaalder=2coolboarders.com@sqrug.org] On Behalf Of Wyatt, Will Sent: 10 May 2005 08:13 To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table I changed the subquery to just say 'AND N_ED.EFFDT <= $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:40:32 2005 From: Bob Stone Subject: RE: [sqr-users] Virtual Table Date: Tue, 10 May 2005 10:35:03 -0500 AHHH YES!!!! you need to say : begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME as first_name, NAMES.LAST_NAME as last_name FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = $name ) AS A end-select and I still get an error, but begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = 'Wyatt' ) AS A end-select -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Olga.Gal@bbh.com Sent: Tuesday, May 10, 2005 10:25 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: RE: [sqr-users] Virtual Table That is because the error DOESN'T refer to the Where Clause of your 'Virtual Table', but to the selected columns. In other words from some reason SQR is expecting alias name after NAMES.FIRST_NAME and NAMES.LAST_NAME "Wyatt, Will" Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To "'This list is for discussion about the SQR database reporting language from Hyperion Solutions.'" 05/10/2005 11:27 AM cc Subject Please respond to RE: [sqr-users] Virtual Table "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Based on what James Womeldorf and you have said I changed the query to: let $name = 'Wyatt' begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = $name ) AS A end-select and I still get an error, but begin-select A.FIRST_NAME A.LAST_NAME print &A.LAST_NAME (+1, 1) FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT <= '2005-05-31' AND NAMES.LAST_NAME = 'Wyatt' ) AS A end-select works, so I don't think it is the effective date logic. This list is amazing, I never expected to get help so quickly. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Pedroza, Maricela Sent: Tuesday, May 10, 2005 10:08 AM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: RE: [sqr-users] Virtual Table Have you tried replacing the effdt logic with something like, AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,GETDATE(),121), 1, 10) Maricela -----Original Message----- From: sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org [mailto:sqr-users-bounces+mpedroza=cerritos.edu@sqrug.org] On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 8:13 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table I changed the subquery to just say 'AND N_ED.EFFDT <= $AsOfDate' and got the same error. Thanks for the suggestion. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 9:55 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] Virtual Table It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:43:22 2005 From: James Womeldorf Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 10:37:16 -0500 Are you trying to get $Activity_Date to be a date or a string? Perhaps you are having difficulty because of the use of $Activity_Date multiple times in your statements. Sometimes it is supposed to be a string and sometimes it is supposed to be a date. It's amazing. All these nice folks and we all seem to have difficulty 'getting' dates :) -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 10:26 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] date format yes, i tried and i get the following error: (SQR 4008) Unknown function or variable in expression: to_date let $activity_date = to_date($activity_date,'dd-mon-yyyy') thanks. >From: "Lindquist, Maria" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:11:43 -0500 > >Did you try the following at all? > >Let $Activity_Date = TO_DATE($Activity_date,'dd-mon-yyyy') > >Maria > >-----Original Message----- >From: sqr-users-bounces+mlindqui=uwc.edu@sqrug.org >[mailto:sqr-users-bounces+mlindqui=uwc.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:02 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] date format > >Hi, > > I always have tough time to format dates. This time the date that I >get from a flat file is in 'YYYYMMDD' format. However i do it i get >errors. > >I tried doing something like this:- > >Let $activity_date = edit($activity_date, 'dd-mon-yyyy') > >or > >let $activity_date = to_char(to_date($activity_date, 'YYYYMMDD'), >'dd-MON-yyyy') >and > >let $activity_date = >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > >and > >begin-select on-error=print-date-error >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') >&activitydate > move &activitydate to $activity_date >from dual > >Any idea where i am going wrong on this? > >Thanks. > >_________________________________________________________________ >Is your PC infected? Get a FREE online computer virus scan from >McAfee(r) Security. >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:47:53 2005 From: Bob Stone Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 10:46:41 -0500 maybe it's because we're all programmers. can't get a date... -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Tuesday, May 10, 2005 10:37 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] date format Are you trying to get $Activity_Date to be a date or a string? Perhaps you are having difficulty because of the use of $Activity_Date multiple times in your statements. Sometimes it is supposed to be a string and sometimes it is supposed to be a date. It's amazing. All these nice folks and we all seem to have difficulty 'getting' dates :) -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 10:26 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] date format yes, i tried and i get the following error: (SQR 4008) Unknown function or variable in expression: to_date let $activity_date = to_date($activity_date,'dd-mon-yyyy') thanks. >From: "Lindquist, Maria" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:11:43 -0500 > >Did you try the following at all? > >Let $Activity_Date = TO_DATE($Activity_date,'dd-mon-yyyy') > >Maria > >-----Original Message----- >From: sqr-users-bounces+mlindqui=uwc.edu@sqrug.org >[mailto:sqr-users-bounces+mlindqui=uwc.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:02 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] date format > >Hi, > > I always have tough time to format dates. This time the date that I >get from a flat file is in 'YYYYMMDD' format. However i do it i get >errors. > >I tried doing something like this:- > >Let $activity_date = edit($activity_date, 'dd-mon-yyyy') > >or > >let $activity_date = to_char(to_date($activity_date, 'YYYYMMDD'), >'dd-MON-yyyy') >and > >let $activity_date = >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > >and > >begin-select on-error=print-date-error >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') >&activitydate > move &activitydate to $activity_date >from dual > >Any idea where i am going wrong on this? > >Thanks. > >_________________________________________________________________ >Is your PC infected? Get a FREE online computer virus scan from >McAfee(r) Security. >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 10:52:01 2005 Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 10:51:24 -0500 From: "Knapp, Richard" And don't know how to handle one when we do get one. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 10:47 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] date format maybe it's because we're all programmers. can't get a date... -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Tuesday, May 10, 2005 10:37 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] date format Are you trying to get $Activity_Date to be a date or a string? Perhaps you are having difficulty because of the use of $Activity_Date multiple times in your statements. Sometimes it is supposed to be a string and sometimes it is supposed to be a date. It's amazing. All these nice folks and we all seem to have difficulty 'getting' dates :) -----Original Message----- From: sqr-users-bounces+jwomeldo=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=3Dfastenal.com@sqrug.org]On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 10:26 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] date format yes, i tried and i get the following error: (SQR 4008) Unknown function or variable in expression: to_date let $activity_date =3D to_date($activity_date,'dd-mon-yyyy') thanks. >From: "Lindquist, Maria" >Reply-To: "This list is for discussion about the SQR database=20 >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage=20 >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:11:43 -0500 > >Did you try the following at all? > >Let $Activity_Date =3D TO_DATE($Activity_date,'dd-mon-yyyy') > >Maria > >-----Original Message----- >From: sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org >[mailto:sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:02 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] date format > >Hi, > > I always have tough time to format dates. This time the date that I >get from a flat file is in 'YYYYMMDD' format. However i do it i get >errors. > >I tried doing something like this:- > >Let $activity_date =3D edit($activity_date, 'dd-mon-yyyy') > >or > >let $activity_date =3D to_char(to_date($activity_date, 'YYYYMMDD'), >'dd-MON-yyyy') >and > >let $activity_date =3D >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > >and > >begin-select on-error=3Dprint-date-error >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') >&activitydate > move &activitydate to $activity_date >from dual > >Any idea where i am going wrong on this? > >Thanks. > >_________________________________________________________________ >Is your PC infected? Get a FREE online computer virus scan from >McAfee(r) Security. >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!=20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 11:02:00 2005 Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 11:00:52 -0500 From: "O'Neil, Tara" Consider adding in: Begin-Setup date $Activity_Date end-declare End-Setup Then replace in your sql to_date($Activity_Date, 'YYYY-MM-DD')=20 with just $Activity_Date=20 Do that for all your date references for $Activity_Date etc. -----Original Message----- From: sqr-users-bounces+tara.oneil=3Dmarquette.edu@sqrug.org [mailto:sqr-users-bounces+tara.oneil=3Dmarquette.edu@sqrug.org] On Behalf Of Knapp, Richard Sent: Tuesday, May 10, 2005 10:51 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: RE: [sqr-users] date format And don't know how to handle one when we do get one. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Bob Stone Sent: Tuesday, May 10, 2005 10:47 AM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] date format maybe it's because we're all programmers. can't get a date... -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of James Womeldorf Sent: Tuesday, May 10, 2005 10:37 AM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] date format Are you trying to get $Activity_Date to be a date or a string? Perhaps you are having difficulty because of the use of $Activity_Date multiple times in your statements. Sometimes it is supposed to be a string and sometimes it is supposed to be a date. It's amazing. All these nice folks and we all seem to have difficulty 'getting' dates :) -----Original Message----- From: sqr-users-bounces+jwomeldo=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=3Dfastenal.com@sqrug.org]On Behalf Of radhika reddy Sent: Tuesday, May 10, 2005 10:26 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] date format yes, i tried and i get the following error: (SQR 4008) Unknown function or variable in expression: to_date let $activity_date =3D to_date($activity_date,'dd-mon-yyyy') thanks. >From: "Lindquist, Maria" >Reply-To: "This list is for discussion about the SQR database=20 >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage=20 >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:11:43 -0500 > >Did you try the following at all? > >Let $Activity_Date =3D TO_DATE($Activity_date,'dd-mon-yyyy') > >Maria > >-----Original Message----- >From: sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org >[mailto:sqr-users-bounces+mlindqui=3Duwc.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:02 AM >To: sqr-users@sqrug.org >Subject: [sqr-users] date format > >Hi, > > I always have tough time to format dates. This time the date that I >get from a flat file is in 'YYYYMMDD' format. However i do it i get >errors. > >I tried doing something like this:- > >Let $activity_date =3D edit($activity_date, 'dd-mon-yyyy') > >or > >let $activity_date =3D to_char(to_date($activity_date, 'YYYYMMDD'), >'dd-MON-yyyy') >and > >let $activity_date =3D >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > >and > >begin-select on-error=3Dprint-date-error >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') >&activitydate > move &activitydate to $activity_date >from dual > >Any idea where i am going wrong on this? > >Thanks. > >_________________________________________________________________ >Is your PC infected? Get a FREE online computer virus scan from >McAfee(r) Security. >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!=20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 11:19:46 2005 Date: Tue, 10 May 2005 12:15:50 -0400 From: "Everett Carr" Subject: RE: [sqr-users] Virtual Table SQR / SQL may be having difficulty parsing the imbedded sqr variable because the syntax "expects" to find single quotes. AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) So instead perhaps let $quote_ch = chr(39) ! Single Quote let $sql_clause = 'substring(convert(Char~' || $AsOfDate || '~,121),1, 10)' let $sql_clause = translate($sql_clause,'~', $quote_ch) AND N_ED.EFFDT <= [Sql_clause] will get the needed sql syntax passed Instead you must setup a dynaminc clause >>> bstone@fastenal.com 05/10/05 10:54 AM >>> It's called an inline view. Making a 'fake table' or 'virtual table' in the from clause of the select is an inline view. I'm not sure why SQR is having this problem, but I know I've used variables in an inline view in SQR and it's worked. I'm wondering if maybe the functions plus the variable (and being within the inline view) are what's causing the problem. (just an idea...i dont know for sure). We use oracle, but I think a similar principal will work in MS SQL Server. The default date type conversion of a string will happen in Oracle when the string variable is in the form 'DD-MON-YYYY' or 'DD-MON-YY', so if you did a little SQR variable conversion (or SQL edit mask if you're grabbing that date from a table) to set up $AsOfDate like 'DD-MON-YYYY' (or whatever the default string auto-date conversion type for SQL Server is) and then just said " AND N_ED.EFFDT <= $AsOfDate " it might go through. Otherwise, if that doesn't work, you might have to figure out some other way to write the SQL itself...maybe loop through one table on the name, set a variable, and within that SQL block call a procedure to loop through the other tables, using that name variable instead of a table join. Might be slightly less efficient, but at least it would work. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wyatt, Will Sent: Tuesday, May 10, 2005 9:38 AM To: 'sqr-users@sqrug.org' Subject: [sqr-users] Virtual Table Hi all. I'm not sure what to call the problem I'm having writing this query in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more complex, but this demonstrates the problem. The query works fine in Query Analyzer. SELECT A.FIRST_NAME, A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A I try to move this query to SQR and produced BEGIN-SELECT A.FIRST_NAME A.LAST_NAME FROM ( SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME FROM PS_NAMES NAMES WHERE NAMES.EFFDT = ( SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED WHERE NAMES.EMPLID = N_ED.EMPLID AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) ) ) AS A END-SELECT My problem is when I try to replace the '2005-05-31' in the effective dated logic with a variable, something like AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) I get an SQR 1303 error 'Error in SQL (perhaps missing &name after expression). I suspect that I can't do this because the virtual table A isn't really a table as far as SQR is concerned. Is there someway I can do this. PS. Is there a technical name for what I'm trying to do with the Select statement that is creating table A in the main query? TIA. -------------------------------------- Will Wyatt PeopleSoft Analyst Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 10 11:22:47 2005 From: "radhika reddy" Subject: RE: [sqr-users] date format Date: Tue, 10 May 2005 11:19:35 -0500 Thanks for all your input. Yeah, we just need patience to get the right one. I got it and i used the following: let $activity_date = edit(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') Thanks again. >From: "Knapp, Richard" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] date format >Date: Tue, 10 May 2005 10:51:24 -0500 > > >And don't know how to handle one when we do get one. > >Richard Knapp >Database Programmer/Analyst >Institutional Research and Planning >University of Missouri System >573-882-8856 >knappr@umsystem.edu > >-----Original Message----- >From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org >[mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of >Bob Stone >Sent: Tuesday, May 10, 2005 10:47 AM >To: 'This list is for discussion about the SQR database reporting >languagefrom Hyperion Solutions.' >Subject: RE: [sqr-users] date format > >maybe it's because we're all programmers. can't get a date... > > >-----Original Message----- >From: sqr-users-bounces+bstone=fastenal.com@sqrug.org >[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of >James Womeldorf >Sent: Tuesday, May 10, 2005 10:37 AM >To: 'This list is for discussion about the SQR database reporting >language from Hyperion Solutions.' >Subject: RE: [sqr-users] date format > > >Are you trying to get $Activity_Date to be a date or a string? >Perhaps you are having difficulty because of the use of $Activity_Date >multiple times in your statements. Sometimes it is supposed to be a >string >and sometimes it is supposed to be a date. > >It's amazing. All these nice folks and we all seem to have difficulty >'getting' dates :) > >-----Original Message----- >From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org >[mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of >radhika reddy >Sent: Tuesday, May 10, 2005 10:26 AM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] date format > > > >yes, i tried and i get the following error: > >(SQR 4008) Unknown function or variable in expression: to_date >let $activity_date = to_date($activity_date,'dd-mon-yyyy') > >thanks. > > >From: "Lindquist, Maria" > >Reply-To: "This list is for discussion about the SQR database > >reportinglanguage from Hyperion Solutions." > >To: "This list is for discussion about the SQR database >reportinglanguage > >fromHyperion Solutions." > >Subject: RE: [sqr-users] date format > >Date: Tue, 10 May 2005 10:11:43 -0500 > > > >Did you try the following at all? > > > >Let $Activity_Date = TO_DATE($Activity_date,'dd-mon-yyyy') > > > >Maria > > > >-----Original Message----- > >From: sqr-users-bounces+mlindqui=uwc.edu@sqrug.org > >[mailto:sqr-users-bounces+mlindqui=uwc.edu@sqrug.org] On Behalf Of > >radhika reddy > >Sent: Tuesday, May 10, 2005 10:02 AM > >To: sqr-users@sqrug.org > >Subject: [sqr-users] date format > > > >Hi, > > > > I always have tough time to format dates. This time the date that I > >get from a flat file is in 'YYYYMMDD' format. However i do it i get > >errors. > > > >I tried doing something like this:- > > > >Let $activity_date = edit($activity_date, 'dd-mon-yyyy') > > > >or > > > >let $activity_date = to_char(to_date($activity_date, 'YYYYMMDD'), > >'dd-MON-yyyy') > >and > > > >let $activity_date = > >Datetostr(StrtoDate($activity_date,'YYYYMMDD'),'dd-MON-yyyy') > > > >and > > > >begin-select on-error=print-date-error > >to_char(to_date($activity_date, 'MM/DD/YYYY'), 'dd-MON-yyyy') > >&activitydate > > move &activitydate to $activity_date > >from dual > > > >Any idea where i am going wrong on this? > > > >Thanks. > > > >_________________________________________________________________ > >Is your PC infected? Get a FREE online computer virus scan from > >McAfee(r) Security. > >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's >FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 11 08:09:32 2005 Date: Wed, 11 May 2005 09:08:49 -0400 From: Matt Rogish Subject: [sqr-users] Virtual Table Will: Did you try the "$space" trick (someone on this list showed me this many moons ago)? let $junkVariable = ' ' begin-select ... from [$junkVariable] ( SELECT foo ... rest of sql ) end-select Usually that fixes most SQR-related parsing problems of non-trivial SQL. The parser must see parens and freeze up. -- Matt At 07:01 AM 5/11/2005, you wrote: >From: sqr-users-bounces+bstone=fastenal.com@sqrug.org >[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of >Wyatt, Will >Sent: Tuesday, May 10, 2005 9:38 AM >To: 'sqr-users@sqrug.org' >Subject: [sqr-users] Virtual Table > > >Hi all. I'm not sure what to call the problem I'm having writing this >query >in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more >complex, but this demonstrates the problem. The query works fine in >Query >Analyzer. > >SELECT A.FIRST_NAME, A.LAST_NAME >FROM ( > SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME > FROM PS_NAMES NAMES > WHERE NAMES.EFFDT = > ( > SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED > WHERE NAMES.EMPLID = N_ED.EMPLID > AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) > ) >) AS A > >I try to move this query to SQR and produced > >BEGIN-SELECT >A.FIRST_NAME >A.LAST_NAME >FROM ( > SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME > FROM PS_NAMES NAMES > WHERE NAMES.EFFDT = > ( > SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED > WHERE NAMES.EMPLID = N_ED.EMPLID > AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) > ) >) AS A >END-SELECT > >My problem is when I try to replace the '2005-05-31' in the effective >dated >>logic with a variable, something like >> >> AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) >> >>I get an SQR 1303 error 'Error in SQL (perhaps missing &name after >>expression). >> >>I suspect that I can't do this because the virtual table A isn't really >>a >>table as far as SQR is concerned. Is there someway I can do this. >> >>PS. Is there a technical name for what I'm trying to do with the Select >>statement that is creating table A in the main query? >> >>TIA. >>-------------------------------------- >>Will Wyatt >>PeopleSoft Analyst >>Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 11 08:46:02 2005 From: "Wyatt, Will" Subject: RE: [sqr-users] Virtual Table Date: Wed, 11 May 2005 08:56:46 -0500 Bob Stone pointed that out to me yesterday, but kudos I often have to be told something more than once for it to get through :) Thanks for the help. -----Original Message----- From: sqr-users-bounces+willw=aisd.org@sqrug.org [mailto:sqr-users-bounces+willw=aisd.org@sqrug.org] On Behalf Of Matt Rogish Sent: Wednesday, May 11, 2005 8:09 AM To: sqr-users@sqrug.org Subject: [sqr-users] Virtual Table Will: Did you try the "$space" trick (someone on this list showed me this many moons ago)? let $junkVariable = ' ' begin-select ... from [$junkVariable] ( SELECT foo ... rest of sql ) end-select Usually that fixes most SQR-related parsing problems of non-trivial SQL. The parser must see parens and freeze up. -- Matt At 07:01 AM 5/11/2005, you wrote: >From: sqr-users-bounces+bstone=fastenal.com@sqrug.org >[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of >Wyatt, Will >Sent: Tuesday, May 10, 2005 9:38 AM >To: 'sqr-users@sqrug.org' >Subject: [sqr-users] Virtual Table > > >Hi all. I'm not sure what to call the problem I'm having writing this >query >in SQR. I'm using MS SQL Server w/ PeopleSoft. My query is actually more >complex, but this demonstrates the problem. The query works fine in >Query >Analyzer. > >SELECT A.FIRST_NAME, A.LAST_NAME >FROM ( > SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME > FROM PS_NAMES NAMES > WHERE NAMES.EFFDT = > ( > SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED > WHERE NAMES.EMPLID = N_ED.EMPLID > AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) > ) >) AS A > >I try to move this query to SQR and produced > >BEGIN-SELECT >A.FIRST_NAME >A.LAST_NAME >FROM ( > SELECT NAMES.FIRST_NAME, NAMES.LAST_NAME > FROM PS_NAMES NAMES > WHERE NAMES.EFFDT = > ( > SELECT MAX(N_ED.EFFDT) FROM PS_NAMES N_ED > WHERE NAMES.EMPLID = N_ED.EMPLID > AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,'2005-05-31',121), 1, 10) > ) >) AS A >END-SELECT > >My problem is when I try to replace the '2005-05-31' in the effective >dated >>logic with a variable, something like >> >> AND N_ED.EFFDT <= SUBSTRING(CONVERT(CHAR,$AsOfDate,121), 1, 10) >> >>I get an SQR 1303 error 'Error in SQL (perhaps missing &name after >>expression). >> >>I suspect that I can't do this because the virtual table A isn't really >>a >>table as far as SQR is concerned. Is there someway I can do this. >> >>PS. Is there a technical name for what I'm trying to do with the Select >>statement that is creating table A in the main query? >> >>TIA. >>-------------------------------------- >>Will Wyatt >>PeopleSoft Analyst >>Abilene Independent School District _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 11 08:56:06 2005 Date: Wed, 11 May 2005 08:55:02 -0500 From: Krishna Prasad Kommuri Subject: [sqr-users] Problem generating .csv reports thu sqr I am having trouble generating reports in .csv format through an sqr=20 program. This is what i did, I used the command line flags -printer:EH and -EH_CSV,= =20 but when i run my program it runs to program but doesn't generate any reports. Does this problem have anything to do with pssqr.ini file or any other setu= p=20 information? Did anyone run into this problem before, i would appreciate if you guys=20 would help me out.=20 Thanks, _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 11 09:04:58 2005 Subject: RE: [sqr-users] Problem generating .csv reports thu sqr Date: Wed, 11 May 2005 09:04:17 -0500 From: "Knapp, Richard" How do you know it doesn't generate any reports? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Krishna Prasad Kommuri Sent: Wednesday, May 11, 2005 8:55 AM To: sqr-users@sqrug.org Subject: [sqr-users] Problem generating .csv reports thu sqr I am having trouble generating reports in .csv format through an sqr=20 program. This is what i did, I used the command line flags -printer:EH and -EH_CSV,=20 but when i run my program it runs to program but doesn't generate any reports. Does this problem have anything to do with pssqr.ini file or any other setup=20 information? Did anyone run into this problem before, i would appreciate if you guys would help me out.=20 Thanks, _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed May 11 13:47:53 2005 Date: Wed, 11 May 2005 14:47:17 -0400 (EDT) From: "Kevin Laroche" Subject: [sqr-users] Problem generating .csv reports thu sqr Hi We ran into this exact same problem on the windows 2000 platform. Peter, the brio rep correctly suggested: Most likely the problem is that the version of Java being used with SQR 6.1.4 is not compatible with the newer CPUs. You can try the following -- in the %BRIO_HOME%\JRE\JRE122\BIN directory is a fill called SYMCJIT.DLL, what you should do is rename this to SYMCJIT.DLL.SAVE. However our support techs were not happy with the idea of running around renaming one file on every client so now for all the reports we do this #DEFINE XLS_FILE 2 #define OUT_MAX 500 ENCODE '<009>' INTO $separator !Separator character is TAB more code if $format = 'XLS' let $out_name = 'C:\WINDOWS\TEMP\bf_overdue.xls' open $out_name as {XLS_FILE} for-writing record={OUT_MAX}:vary status=#status if #status != 0 let $alert = 'Cannot open xls file' show $alert stop end-if end-if more code IF $format = 'XLS' !AND #page-count = 1 STRING 'Report Date:' $Current-date 'OUTSTANDING REQUESTS' 'DUE DATE BEFORE:' $date_end BY $separator INTO $titles1 WRITE {XLS_FILE} FROM $titles1 more code if $format = 'XLS' CLOSE 2 end-if With thanks to all the people who let me borrow this code Kevin LaRoche Ottawa, Ontario _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 11:10:06 2005 Date: Thu, 12 May 2005 09:09:00 -0700 (PDT) From: Michael Pascual Subject: [sqr-users] brackets in where clause when using outer join This is a problem I saw someone post before, but no one posted a solution. The problem is when I use an outer join and try to include a clause that is dynamically created by using brackets. I am using: Informix 7 SQR 6.1.3 Windows XP pro Eg. FROM table1, table2, OUTER table3 WHERE table1.ID LIKE 'A%' AND table2.PARENT_ID = table1.ID AND table3.Y = table1.X AND [$date_clause] I get the following error: (SQR 5528) INFORMIX SQL PREPARE/DECLARE error -395 (ISAM: 0) in cursor 4: The where clause contains an outer Cartesian Product. ... the sql statement ... Error on line 283: (SQR 3716) Error in SQL statement. Errors were found in the program file. SQR: Program Aborting. When I remove the dynamic clause, it works. This looks like a bug in sqr in analyzing the sqr code. If I replace the bracketed variable with the contents of the variable it works. If I use brackets and set the variable to an empty string, it still fails. Is there some kind of work around to this problem? Is there another way to include dynamic clauses in the WHERE and have it work with outer joins? Thanks, Mike __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 11:23:59 2005 From: Bob Stone Subject: RE: [sqr-users] brackets in where clause when using outer join Date: Thu, 12 May 2005 11:22:54 -0500 I recently had a problem that was only because there were dynamic variables causing the problem (mine was in a nested select). The not-so-intuitive (or logical) work around is to create a variable '' or ' ', and stick it in as a dynamic variable right after the word 'from'...that should signal to the SQR compiler that it needs to wait until run time to parse that one. let $necessary = ' ' begin-select ... FROM [$necessary] table1, table2, OUTER table3 WHERE table1.ID LIKE 'A%' AND table2.PARENT_ID = table1.ID AND table3.Y = table1.X AND [$date_clause] end-select I'm not 100% positive this will fix your problem, since I haven't used Informix and I stay far away from all Cartesian joins. (which, btw, might be another problem to check on...does it have to be cartesian and reeeeeeally slow?). But it helped me fix my SQR parsing problem. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Michael Pascual Sent: Thursday, May 12, 2005 11:09 AM To: sqr-users@sqrug.org Subject: [sqr-users] brackets in where clause when using outer join This is a problem I saw someone post before, but no one posted a solution. The problem is when I use an outer join and try to include a clause that is dynamically created by using brackets. I am using: Informix 7 SQR 6.1.3 Windows XP pro Eg. FROM table1, table2, OUTER table3 WHERE table1.ID LIKE 'A%' AND table2.PARENT_ID = table1.ID AND table3.Y = table1.X AND [$date_clause] I get the following error: (SQR 5528) INFORMIX SQL PREPARE/DECLARE error -395 (ISAM: 0) in cursor 4: The where clause contains an outer Cartesian Product. ... the sql statement ... Error on line 283: (SQR 3716) Error in SQL statement. Errors were found in the program file. SQR: Program Aborting. When I remove the dynamic clause, it works. This looks like a bug in sqr in analyzing the sqr code. If I replace the bracketed variable with the contents of the variable it works. If I use brackets and set the variable to an empty string, it still fails. Is there some kind of work around to this problem? Is there another way to include dynamic clauses in the WHERE and have it work with outer joins? Thanks, Mike __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 12:52:38 2005 From: "radhika reddy" Date: Thu, 12 May 2005 12:51:32 -0500 Subject: [sqr-users] number format Hi, I have field coming from flat file which is of size 11 and in the format of '00000007500'. it has 2 implied decimal. i want to get in the format of 75.00 while inserting into the database. i am trying something like this: let #enroll_amt = EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' ')),'999999999.99') but i am getting 0's in #enroll_amt field. any ideas? Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 12:56:43 2005 Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 12:56:06 -0500 From: "Knapp, Richard" I assume you want to ltrm the 0's, yes? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of radhika reddy Sent: Thursday, May 12, 2005 12:52 PM To: sqr-users@sqrug.org Subject: [sqr-users] number format Hi, I have field coming from flat file which is of size 11 and in the=20 format of '00000007500'. it has 2 implied decimal. i want to get in the=20 format of 75.00 while inserting into the database. i am trying something like this: let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),'=20 ')),'999999999.99') but i am getting 0's in #enroll_amt field. any ideas? Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!=20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:01:18 2005 Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 14:00:22 -0400 From: "Kaithi, Murali" Hi Radhika, Why don't you try something like=20 Let #enroll_amt =3D to_number($enroll_amt)/100 Murali.=20 -----Original Message----- From: sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org [mailto:sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org] On Behalf Of radhika reddy Sent: Thursday, May 12, 2005 1:52 PM To: sqr-users@sqrug.org Subject: [sqr-users] number format Hi, I have field coming from flat file which is of size 11 and in the format of '00000007500'. it has 2 implied decimal. i want to get in the format of 75.00 while inserting into the database. i am trying something like this: let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),'=20 ')),'999999999.99') but i am getting 0's in #enroll_amt field. any ideas? Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!=20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:04:28 2005 From: "radhika reddy" Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 13:01:31 -0500 may be not, as sometimes the number might be 00000065400 then my result shoud be 654.00 or 00000008967 then 89.67 Thanks. >From: "Knapp, Richard" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] number format >Date: Thu, 12 May 2005 12:56:06 -0500 > > >I assume you want to ltrm the 0's, yes? > >Richard Knapp >Database Programmer/Analyst >Institutional Research and Planning >University of Missouri System >573-882-8856 >knappr@umsystem.edu > >-----Original Message----- >From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org >[mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of >radhika reddy >Sent: Thursday, May 12, 2005 12:52 PM >To: sqr-users@sqrug.org >Subject: [sqr-users] number format > >Hi, > > I have field coming from flat file which is of size 11 and in the >format of '00000007500'. it has 2 implied decimal. i want to get in the >format of 75.00 while inserting into the database. > >i am trying something like this: > >let #enroll_amt = EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' >')),'999999999.99') > >but i am getting 0's in #enroll_amt field. > >any ideas? > >Thanks > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's >FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:07:17 2005 Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 12:03:12 -0600 From: "Thompson, Carla" I've seen the following used to suppress leading blanks:=20=20 let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),'=20 ')),'B99999999.99') -----Original Message----- From: sqr-users-bounces+carla.thompson=3Dgwl.com@sqrug.org [mailto:sqr-users-bounces+carla.thompson=3Dgwl.com@sqrug.org]On Behalf Of radhika reddy Sent: Thursday, May 12, 2005 11:52 AM To: sqr-users@sqrug.org Subject: [sqr-users] number format Hi, I have field coming from flat file which is of size 11 and in the=20 format of '00000007500'. it has 2 implied decimal. i want to get in the=20 format of 75.00 while inserting into the database. i am trying something like this: let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),'=20 ')),'999999999.99') but i am getting 0's in #enroll_amt field. any ideas? Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!= =20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:13:32 2005 Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 14:12:37 -0400 From: "Kaithi, Murali" Hi Radhika, I thought that is what you want when you said your input has 2 implied decimals, I still think my suggestion should work. Correct me if I am wrong. Murali =20 -----Original Message----- From: sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org [mailto:sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org] On Behalf Of radhika reddy Sent: Thursday, May 12, 2005 2:02 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] number format may be not, as sometimes the number might be 00000065400 then my result shoud be 654.00 or 00000008967 then 89.67 Thanks. >From: "Knapp, Richard" >Reply-To: "This list is for discussion about the SQR database=20 >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database=20 >reportinglanguage fromHyperion Solutions." >Subject: RE: [sqr-users] number format >Date: Thu, 12 May 2005 12:56:06 -0500 > > >I assume you want to ltrm the 0's, yes? > >Richard Knapp >Database Programmer/Analyst >Institutional Research and Planning >University of Missouri System >573-882-8856 >knappr@umsystem.edu > >-----Original Message----- >From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org >[mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of=20 >radhika reddy >Sent: Thursday, May 12, 2005 12:52 PM >To: sqr-users@sqrug.org >Subject: [sqr-users] number format > >Hi, > > I have field coming from flat file which is of size 11 and in the >format of '00000007500'. it has 2 implied decimal. i want to get in the >format of 75.00 while inserting into the database. > >i am trying something like this: > >let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' >')),'999999999.99') > >but i am getting 0's in #enroll_amt field. > >any ideas? > >Thanks > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's=20 >FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don't just search. Find. Check out the new MSN Search!=20 http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:22:40 2005 From: "radhika reddy" Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 13:21:34 -0500 yeah, you are correct. and now i get the output #enroll_amt = 75.000000 when i want to insert into table i want that to be 75 and if the number is 75.36 then 75.36. Thanks. >From: "Kaithi, Murali" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] number format >Date: Thu, 12 May 2005 14:12:37 -0400 > >Hi Radhika, >I thought that is what you want when you said your input has 2 implied >decimals, I still think my suggestion should work. >Correct me if I am wrong. > >Murali > > >-----Original Message----- >From: sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org >[mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] On >Behalf Of radhika reddy >Sent: Thursday, May 12, 2005 2:02 PM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] number format > > >may be not, as sometimes the number might be 00000065400 then my result >shoud be 654.00 > >or > >00000008967 then 89.67 > >Thanks. > > >From: "Knapp, Richard" > >Reply-To: "This list is for discussion about the SQR database > >reportinglanguage from Hyperion Solutions." > >To: "This list is for discussion about the SQR database > >reportinglanguage fromHyperion Solutions." > >Subject: RE: [sqr-users] number format > >Date: Thu, 12 May 2005 12:56:06 -0500 > > > > > >I assume you want to ltrm the 0's, yes? > > > >Richard Knapp > >Database Programmer/Analyst > >Institutional Research and Planning > >University of Missouri System > >573-882-8856 > >knappr@umsystem.edu > > > >-----Original Message----- > >From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org > >[mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of > >radhika reddy > >Sent: Thursday, May 12, 2005 12:52 PM > >To: sqr-users@sqrug.org > >Subject: [sqr-users] number format > > > >Hi, > > > > I have field coming from flat file which is of size 11 and in the > > >format of '00000007500'. it has 2 implied decimal. i want to get in the > > >format of 75.00 while inserting into the database. > > > >i am trying something like this: > > > >let #enroll_amt = EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' > >')),'999999999.99') > > > >but i am getting 0's in #enroll_amt field. > > > >any ideas? > > > >Thanks > > > >_________________________________________________________________ > >Express yourself instantly with MSN Messenger! Download today - it's > >FREE! > >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >______________________________________________________________________ >This email has been scanned by the MessageLabs Email Security System. >For more information please visit http://www.messagelabs.com/email >______________________________________________________________________ > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:29:09 2005 Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 14:28:16 -0400 From: "Kaithi, Murali" Hi Radhika, Now just do inserts, I don't think you need any more edits. Murali -----Original Message----- From: sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org [mailto:sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org] On Behalf Of radhika reddy Sent: Thursday, May 12, 2005 2:22 PM To: sqr-users@sqrug.org Subject: RE: [sqr-users] number format yeah, you are correct. and now i get the output #enroll_amt =3D 75.000000 when i want to insert into table i want that to be 75 and if the number is 75.36 then 75.36. Thanks. >From: "Kaithi, Murali" >Reply-To: "This list is for discussion about the SQR database=20 >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database=20 >reportinglanguage fromHyperion Solutions." >Subject: RE: [sqr-users] number format >Date: Thu, 12 May 2005 14:12:37 -0400 > >Hi Radhika, >I thought that is what you want when you said your input has 2 implied=20 >decimals, I still think my suggestion should work. >Correct me if I am wrong. > >Murali > > >-----Original Message----- >From: sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org >[mailto:sqr-users-bounces+murali.kaithi=3Dspencergifts.com@sqrug.org] On= =20 >Behalf Of radhika reddy >Sent: Thursday, May 12, 2005 2:02 PM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] number format > > >may be not, as sometimes the number might be 00000065400 then my=20 >result shoud be 654.00 > >or > >00000008967 then 89.67 > >Thanks. > > >From: "Knapp, Richard" > >Reply-To: "This list is for discussion about the SQR database=20 > >reportinglanguage from Hyperion Solutions." > >To: "This list is for discussion about the SQR database=20 > >reportinglanguage fromHyperion Solutions." > >Subject: RE: [sqr-users] number format > >Date: Thu, 12 May 2005 12:56:06 -0500 > > > > > >I assume you want to ltrm the 0's, yes? > > > >Richard Knapp > >Database Programmer/Analyst > >Institutional Research and Planning > >University of Missouri System > >573-882-8856 > >knappr@umsystem.edu > > > >-----Original Message----- > >From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org > >[mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of > >radhika reddy > >Sent: Thursday, May 12, 2005 12:52 PM > >To: sqr-users@sqrug.org > >Subject: [sqr-users] number format > > > >Hi, > > > > I have field coming from flat file which is of size 11 and in=20 > > the > > >format of '00000007500'. it has 2 implied decimal. i want to get in=20 > >the > > >format of 75.00 while inserting into the database. > > > >i am trying something like this: > > > >let #enroll_amt =3D EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' > >')),'999999999.99') > > > >but i am getting 0's in #enroll_amt field. > > > >any ideas? > > > >Thanks > > > >_________________________________________________________________ > >Express yourself instantly with MSN Messenger! Download today - it's=20 > >FREE! > >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >______________________________________________________________________ >This email has been scanned by the MessageLabs Email Security System. >For more information please visit http://www.messagelabs.com/email=20 >______________________________________________________________________ > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Don't just search. Find. Check out the new MSN Search!=20 http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email=20 ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 12 13:44:04 2005 From: "radhika reddy" Subject: RE: [sqr-users] number format Date: Thu, 12 May 2005 13:43:01 -0500 Thanks Murali. You are so correct. >From: "Kaithi, Murali" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reportinglanguage >fromHyperion Solutions." >Subject: RE: [sqr-users] number format >Date: Thu, 12 May 2005 14:28:16 -0400 > >Hi Radhika, >Now just do inserts, I don't think you need any more edits. > >Murali > >-----Original Message----- >From: sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org >[mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] On >Behalf Of radhika reddy >Sent: Thursday, May 12, 2005 2:22 PM >To: sqr-users@sqrug.org >Subject: RE: [sqr-users] number format > > >yeah, you are correct. and now i get the output #enroll_amt = 75.000000 > >when i want to insert into table i want that to be 75 and if the number >is 75.36 then 75.36. > >Thanks. > > >From: "Kaithi, Murali" > >Reply-To: "This list is for discussion about the SQR database > >reportinglanguage from Hyperion Solutions." > >To: "This list is for discussion about the SQR database > >reportinglanguage fromHyperion Solutions." > >Subject: RE: [sqr-users] number format > >Date: Thu, 12 May 2005 14:12:37 -0400 > > > >Hi Radhika, > >I thought that is what you want when you said your input has 2 implied > >decimals, I still think my suggestion should work. > >Correct me if I am wrong. > > > >Murali > > > > > >-----Original Message----- > >From: sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org > >[mailto:sqr-users-bounces+murali.kaithi=spencergifts.com@sqrug.org] On > >Behalf Of radhika reddy > >Sent: Thursday, May 12, 2005 2:02 PM > >To: sqr-users@sqrug.org > >Subject: RE: [sqr-users] number format > > > > > >may be not, as sometimes the number might be 00000065400 then my > >result shoud be 654.00 > > > >or > > > >00000008967 then 89.67 > > > >Thanks. > > > > >From: "Knapp, Richard" > > >Reply-To: "This list is for discussion about the SQR database > > >reportinglanguage from Hyperion Solutions." > > >To: "This list is for discussion about the SQR database > > >reportinglanguage fromHyperion Solutions." > > >Subject: RE: [sqr-users] number format > > >Date: Thu, 12 May 2005 12:56:06 -0500 > > > > > > > > >I assume you want to ltrm the 0's, yes? > > > > > >Richard Knapp > > >Database Programmer/Analyst > > >Institutional Research and Planning > > >University of Missouri System > > >573-882-8856 > > >knappr@umsystem.edu > > > > > >-----Original Message----- > > >From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org > > >[mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of > > > >radhika reddy > > >Sent: Thursday, May 12, 2005 12:52 PM > > >To: sqr-users@sqrug.org > > >Subject: [sqr-users] number format > > > > > >Hi, > > > > > > I have field coming from flat file which is of size 11 and in > > > the > > > > >format of '00000007500'. it has 2 implied decimal. i want to get in > > >the > > > > >format of 75.00 while inserting into the database. > > > > > >i am trying something like this: > > > > > >let #enroll_amt = EDIT(TO_NUMBER(ltrim(rtrim(($enroll_amt),' '),' > > >')),'999999999.99') > > > > > >but i am getting 0's in #enroll_amt field. > > > > > >any ideas? > > > > > >Thanks > > > > > >_________________________________________________________________ > > >Express yourself instantly with MSN Messenger! Download today - it's > > >FREE! > > >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > > > > > >_______________________________________________ > > >sqr-users mailing list > > >sqr-users@sqrug.org > > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > > > >_______________________________________________ > > >sqr-users mailing list > > >sqr-users@sqrug.org > > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > >_________________________________________________________________ > >Don't just search. Find. Check out the new MSN Search! > >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > > > >______________________________________________________________________ > >This email has been scanned by the MessageLabs Email Security System. > >For more information please visit http://www.messagelabs.com/email > >______________________________________________________________________ > > > >_______________________________________________ > >sqr-users mailing list > >sqr-users@sqrug.org > >http://www.sqrug.org/mailman/listinfo/sqr-users > >_________________________________________________________________ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > >______________________________________________________________________ >This email has been scanned by the MessageLabs Email Security System. >For more information please visit http://www.messagelabs.com/email >______________________________________________________________________ > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 13 06:12:03 2005 From: "Ravindran Rajan" Date: Fri, 13 May 2005 16:39:10 +0530 Subject: [sqr-users] Hyperion SQR Integration with .NET HI all, I have a pblm with Integating SQR with .NET ( web application )........ i have tried SQRW.EXE command line execution & includede in the script........ But i want to integratre in a different method like Including DLL's or COM components????? I am using SQR 8.2 version..... If anybody knows then give me a sample code for this????? Thanks. ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 13 19:24:44 2005 From: "Steve Cavill" Subject: RE: [sqr-users] Hyperion SQR Integration with .NET Date: Sat, 14 May 2005 10:23:23 +1000 I don't know if it works with .net, but SQR has a component called SQR Activator, which is designed for integrating SQR through ActiveX. Check the doc to see if it will help. Steve. -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of Ravindran Rajan Sent: Friday, 13 May 2005 9:09 PM To: sqr-users@sqrug.org Subject: [sqr-users] Hyperion SQR Integration with .NET HI all, I have a pblm with Integating SQR with .NET ( web application )........ i have tried SQRW.EXE command line execution & includede in the script........ But i want to integratre in a different method like Including DLL's or COM components????? I am using SQR 8.2 version..... If anybody knows then give me a sample code for this????? Thanks. ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 20 15:14:14 2005 Date: Fri, 20 May 2005 14:03:07 -0600 From: "Jon Alsager" Subject: [sqr-users] printing on the right edge of the paper I apologize in advance for having to ask this question, but I'm obviously brain dead this afternoon. =20 I have an SQR program that prints optical marks on the right edge of a document. Unfortunately, no matter what I try, I cannot get it to print clear out to the right edge of the paper. It leaves about a quarter of an inch of white space between the last printed character and the edge of the paper. =20 The setup for the program originally had Max-Columns =3D 240 (it's a portrait document), which is far more characters than would fit on a line. I also tried using Right-Margin =3D 0 instead, and the output was virtually unchanged. =20 Is there no way to print all the way to the right edge, or is this a restriction from the printer itself? =20 SQR 8.0.2 Oracle 9.2.0.4.0 Unix 11.22 =20 Thanks! =20 Jon =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 20 15:25:51 2005 Subject: RE: [sqr-users] printing on the right edge of the paper Date: Fri, 20 May 2005 15:25:09 -0500 From: "Knapp, Richard" The printer is preventing this. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Jon Alsager Sent: Friday, May 20, 2005 3:03 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] printing on the right edge of the paper I apologize in advance for having to ask this question, but I'm obviously brain dead this afternoon. =20 I have an SQR program that prints optical marks on the right edge of a document. Unfortunately, no matter what I try, I cannot get it to print clear out to the right edge of the paper. It leaves about a quarter of an inch of white space between the last printed character and the edge of the paper. =20 The setup for the program originally had Max-Columns =3D 240 (it's a portrait document), which is far more characters than would fit on a line. I also tried using Right-Margin =3D 0 instead, and the output was virtually unchanged. =20 Is there no way to print all the way to the right edge, or is this a restriction from the printer itself? =20 SQR 8.0.2 Oracle 9.2.0.4.0 Unix 11.22 =20 Thanks! =20 Jon =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 20 15:28:52 2005 From: "Lynds,Rick" Subject: RE: [sqr-users] printing on the right edge of the paper Date: Fri, 20 May 2005 13:26:01 -0700 Jon, The limitation may be the printer you are using. Some printers cannot print all the way to the edge (I know that some models of HP laser printers cannot). Rick -----Original Message----- From: sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org [mailto:sqr-users-bounces+rlynds=mwdh2o.com@sqrug.org] On Behalf Of Jon Alsager Sent: Friday, May 20, 2005 1:03 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [sqr-users] printing on the right edge of the paper I apologize in advance for having to ask this question, but I'm obviously brain dead this afternoon. I have an SQR program that prints optical marks on the right edge of a document. Unfortunately, no matter what I try, I cannot get it to print clear out to the right edge of the paper. It leaves about a quarter of an inch of white space between the last printed character and the edge of the paper. The setup for the program originally had Max-Columns = 240 (it's a portrait document), which is far more characters than would fit on a line. I also tried using Right-Margin = 0 instead, and the output was virtually unchanged. Is there no way to print all the way to the right edge, or is this a restriction from the printer itself? SQR 8.0.2 Oracle 9.2.0.4.0 Unix 11.22 Thanks! Jon _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu May 26 11:57:47 2005 From: "Mark Warrick" Date: Thu, 26 May 2005 16:56:41 +0000 Subject: [sqr-users] Upgrading from version 4.3.2.1 We are planning to upgrade from SQR version 4.3.2.1. This is due to our planned Sybase upgrade to version 12.5.x. This version of SQR does not seem to be compatiable with Sybase 12.5.x. If we did not have compatiability issues, we would not upgrade our version of SQR. We have not significantly changed our SQR programs in 10+ years and we are not utilizing any of the internet features, end user reporting tools, etc. - we simply want to run our batch programs "as is". Hyperion has provided us quotes for a software upgrade, but the nearly 6 digit dollar price tag has us considering other products. Is anyone aware of a stripped down version of SQR ( no internet features, user reporting tools, etc..) which simply runs SQR programs that is available for sale? Open source programs which are compatiable with SQR? Any ideas? Thank you in advance Mark _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri May 27 03:13:24 2005 From: MPietersz@adecco.com.au Date: Fri, 27 May 2005 18:18:06 +1000 Subject: [sqr-users] Oracle XML Queries from SQR Dear All, I am trying to see if SQR is able to handle XML type queries such as SELECT XMLELEMENT ("Test", dummy) "XMLTest" from dual; but i'm having trouble Is this possible ? I am using the version of SQR that is supplied with PeopleSoft 8.x which I believe is SQR 6.x Regards Mark Pietersz This communication is confidential and may be legally privileged and/or con= tain material protected by copyright or other intellectual property laws. = If you are not the intended recipient of this email, any use, forwarding, = printing or reproduction of it or any attachment, is prohibited. If you ha= ve received this communication in error, immediately contact us by return e= mail or by calling +61 3 9954 2100 and then irretrievably delete it and an= y attachments. Email sent from or to us may be monitored for the purposes of quality contr= ol, systems administration and legal compliance. You should check for viruses or other harmful components before opening or = using any attachments to this email. Our liability is limited by all appli= cable laws, and otherwise restricted to resupplying any affected attachmen= ts. Our Privacy Policy can be viewed at http:\\www.adecco.com.au _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 31 14:45:04 2005 Date: Tue, 31 May 2005 12:44:02 -0700 From: Raghvendra Dharwada Subject: [sqr-users] Query to SQR Hi All, I am trying to convert the following long running query (I would rather say, it times out when I run) to an SQR. Can anyone suggest me how to tune this query ? Also, if I incorporate the same query in an SQR, how do I split it? I am thinking of putting all the subqueries into different procedures and use respective variables. Is it the right way of splitting it? Please suggest me different ways of doing it or tuning the query. I appreciate your help. SELECT :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER, A.ACCOUNT, A.DEPTID, A.AFFILIATE, SUM( A.POSTED_TOTAL_AMT) FROM PS_LEDGER A WHERE A.ACCOUNT =3D (SELECT B.ACCOUNT FROM PS_GL_ACCOUNT_TBL B, PSTREELEAF C, PSTREENODE D WHERE B.ACCOUNT =3D A.ACCOUNT AND B.EFFDT =3D (SELECT MAX(B_ED.EFFDT) FROM PS_GL_ACCOUNT_TBL B_ED WHERE B.SETID =3D B_ED.SETID AND B.ACCOUNT =3D B_ED.ACCOUNT AND B_ED.EFFDT <=3D SYSDATE) AND B.ACCOUNT BETWEEN C.RANGE_FROM AND C.RANGE_TO AND C.EFFDT =3D (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED WHERE C.SETID =3D C_ED.SETID AND C.SETCNTRLVALUE =3D C_ED.SETCNTRLVALUE AND C.TREE_NAME =3D C_ED.TREE_NAME AND C_ED.EFFDT <=3D SYSDATE) AND C.TREE_NAME =3D 'ACCOUNT_ROLLUP' AND C.SETID =3D D.SETID AND C.TREE_NAME =3D D.TREE_NAME AND C.TREE_NODE_NUM =3D D.TREE_NODE_NUM AND D.EFFDT =3D (SELECT MAX(D_ED.EFFDT) FROM PSTREENODE D_ED WHERE D.SETID =3D D_ED.SETID AND D.SETCNTRLVALUE =3D D_ED.SETCNTRLVALUE AND D.TREE_NAME =3D D_ED.TREE_NAME AND D_ED.EFFDT <=3D SYSDATE) AND D.TREE_NODE IN ('PROFITLOSS','BALSHEET') AND B.SETID =3D 'MODEL' AND C.EFFDT =3D (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED WHERE C.SETID =3D C_ED.SETID AND C.SETCNTRLVALUE =3D C_ED.SETCNTRLVALUE AND C.TREE_NAME =3D C_ED.TREE_NAME AND C_ED.EFFDT <=3D D.EFFDT)) AND A.FISCAL_YEAR =3D :1 AND A.ACCOUNTING_PERIOD BETWEEN 0 AND :2 AND A.LEDGER =3D 'ACTUALS' GROUP BY :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER,=20 A.ACCOUNT, A.DEPTID, A.AFFILIATE Thanks, Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue May 31 15:53:11 2005 From: "rajami email" Date: Tue, 31 May 2005 15:52:00 -0500 Subject: [sqr-users] RE: The results of your email commands > Hi all: > I have a essay field in my database which is 2000 chars long. i want >to > display it.....When i am doing below command it strips off my heading > ...also i would like to know whether > print &e_essay (+1,1) wrap 89 275 > or > i tried this option also .... still next page displays some text >lines. > if not isblank(&s_essay) > let #l_length = length(&s_essay) > let #l_counter = 0 > while #l_counter < #l_length > let #l_counter = #l_counter + 89 > let #current-line = #current-line + 1 > !if #current-line > 49 > !new-page > !do report_heading > !end-if > print &s_essay (+1,1) wrap 89 #l_counter > end-while > end-if > >- Ignored: > Thanks > Raja > > >From: sqr-users-request@sqrug.org > >Reply-To: sqr-users-request@sqrug.org > >To: rajami_email@hotmail.com > >Subject: confirm 75a82758ddbf3a80ea3f359f05ffb3e771363eeb > >Date: Tue, 31 May 2005 15:32:47 -0500 > > > >Mailing list subscription confirmation notice for mailing list > >sqr-users > > > >We have received a request from dtf.roosevelt.edu for subscription of > >your email address, "rajami_email@hotmail.com", to the > >sqr-users@sqrug.org mailing list. To confirm that you want to be > >added to this mailing list, simply reply to this message, keeping the > >Subject: header intact. Or visit this web page: > > > > > > >http://www.sqrug.org/mailman/confirm/sqr-users/75a82758ddbf3a80ea3f359f05ffb3e771363eeb > > > > > >Or include the following line -- and only the following line -- in a > >message to sqr-users-request@sqrug.org: > > > > confirm 75a82758ddbf3a80ea3f359f05ffb3e771363eeb > > > >Note that simply sending a `reply' to this message should work from > >most mail readers, since that usually leaves the Subject: line in the > >right form (additional "Re:" text in the Subject: is okay). > > > >If you do not wish to be subscribed to this list, please simply > >disregard this message. If you think you are being maliciously > >subscribed to the list, or have any other questions, send them to > >sqr-users-owner@sqrug.org. > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today - it's >FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > >- Done. > ><< message3.txt >> _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 01 00:00:42 2005 Date: Wed, 1 Jun 2005 00:00:03 -0500 From: Nathan Stratton Treadway Subject: [sqr-users] Monthly sqr-users Hints Posting sqr-users Mailing List Hints and Guidelines Nathan Stratton Treadway, Ray Ontko & Co. (nathanst@ontko.com) $Revision: 1.21 $ $Date: 2004-03-04 02:47:15-05 $ This document gathers in one location information about the sqr-users mail list. It includes instructions for changing your subscription settings (including unsubscribing), as well are guidelines for using the list. ______________________________________________________________________ Table of Contents 1. Changes Since Previous Version 2. Introduction 2.1 sqr-users Mailing List 2.2 sqr-users Hints and Guidelines Document 2.3 Related Mailing Lists 3. Interacting with the list server 3.1 Subscribing to the list 3.2 Unsubscribing from the list 3.3 When your email address changes 3.4 Digests 3.5 Obtaining your password 3.6 Problems 4. Posting to the sqr-users List 4.1 General Guidelines 4.2 Posting a Message 4.3 Replying to a Message 5. Job Announcements ______________________________________________________________________ 1. Changes Since Previous Version Changes since the version dated 2003/11/01: o Update subscribe/unsubscribe instructions for new version of list server software. o New URL for "brio-l" mailing list. 2. Introduction 2.1. sqr-users Mailing List The sqr-users mailing list was created to enable discussion related to the SQR database language from Hyperion (and to other products in the SQR product suite). Note: SQR used to be published by SQRIBE Technologies, which was merged into Brio Technology on August 3, 1999. Brio Technology changed its name to Brio Software in October 2001. On October 16, 2003, Hyperion acquired Brio Software. SQR and related applications have also been called "Brio.Report" and "Brio Reports". The mailing list is provided as a service of Ray Ontko & Co. A searchable archive of past postings to the mailing list is available from the SQR Users Group web site . 2.2. sqr-users Hints and Guidelines Document This document gives various hints and guidelines about the sqr-users mailing list. It will be posted approximately monthly to the mailing list so that new users can see it (and existing users can find it easily). An HTML version of the document is always available at http://www.sqrug.org/sqr-users/sqr-users-hints.html. If you have comments or suggestions about this document, please contact me directly at the address listed in the title section. This document is Copyright (C) 1999-2004 by Ray Ontko & Co. It may be freely copied and distributed provided it is not modified in any way and it retains the original copyright notice. 2.3. Related Mailing Lists Here are some mailing lists that cover topics relating to SQR in some way. sqr-jobs : SQR Jobs This list may be used for posting SQR-related resumes, recruitments, job announcements, project announcments, help- wanted, work-wanted ads, etc. To join, follow the link above, or send any message to "sqr-jobs-subscribe@yahoogroups.com". peoplesoft-fans : PeopleSoft Fans Moderated list covering technical and functional aspects of PeopleSoft. To join, follow the link above, or send any message to "peoplesoft-fans-subscribe@yahoogroups.com". psusers : PeopleSoft Users For questions related to any aspect of PeopleSoft (including PeopleSoft-specific SQR issues). This list has merged with the Peoplesoft Fans mailing list and is no longer active, but the message achive can still be found at the link above. BrioSQRReport : Brio SQR Report List for discussion of SQR and SQR Developer (formerly called Brio.Report and Report Builder). To join, follow the link above, or send any message to "BrioSQRReport- subscribe@yahoogroups.com". rm-users : Report- Mart Users List for discussion of Brio Portal (previously called ReportMart). To join, follow the link above, or send a message containing the word "subscribe" in the body to "rm-users- request@sqrug.org". brioportalusersgroup : Brio Portal Users Group list List for discussion of Brio Portal. To join, follow the link above, or send any message to "brioportalusersgroup- subscribe@yahoogroups.com". brio-l : OpenITx Brio List List for technical and functional discussion of all Brio products (but most messages are currently about Brio Intelligence). To join, follow the link above. briousers : Brio.Enter- prise Users List for discussion of the Brio.Enterprise (now called Intelligence) product. To join, follow the link above, or send any message to "briousers-subscribe@yahoogroups.com". briolist : Brio List List for discussion of Brio Intelligence. To join, follow the link above, or send any message to "briolist- subscribe@yahoogroups.com". 3. Interacting with the list server The sqr-users mailing list is hosted using the Mailman list server package. All of the Mailman functions described below are accessed from the sqr-users List Info page, "http://www.sqrug.org/mailman/listinfo/sqr-users". 3.1. Subscribing to the list To subscribe to the mailing list, enter your e-mail address in the box at the top of the "Subscribing to sqr-users" section on the sqr-users List Info page, then choose a password to assign to your subscription and enter it in both "Password" boxes. This password is used to allow you to securely make changes to your subscription over the web. This password will be e-mailed back to you at varous times, so you should not use the same password as you are using elsewhere. Once you have filled in the password, click the "Subscribe" button. You should soon receive an e-mail message from the list server requesting confirmation of your subscription request. Once you have replied to this message and your subscription has been processed, you will receive a "welcome" message giving you more information on the list server, and as well as a reminder of the subscription password you chose. 3.2. Unsubscribing from the list To unsubscribe from the list, go to the sqr-users List Info page, enter your e-mail address in the "sqr-users Subscribers" section near the bottom of the page, and click the "Unsubscribe or edit options" button. You will then see the "member options" page; fill in your password at the top of the page and click "Log in". (If you have forgotton your password, see the ``Obtaining your Password'' section, below). This will take you to the "membership configuration" page. In the middle of that page, there will be an "Unsubscribing from sqr- users" section; simply turn on the "Yes, I really want to unsubscribe" checkbox and click the "Unsubscribe" button. You should get a page back saying that the removal was successful (as well as a confirmation email message). The removal will take effect immediately; there is no need to send in a confirmation e-mail message. If you don't know your password, you can choose to unsubscribe using e-mail confirmation. Instead of entering the password on the "member options" page, just click the "Unsubscribe" button found just below the "Log In" button. You will then see a page noting that a confirmation e-mail has been sent; once you follow the confirmation instructions in that e-mail your removal will be complete. 3.3. When your email address changes If your e-mail address changes -- for example, if your company changes names, or if your mail administrator changes the way your name is spelled out or abbreviated -- you will need to update your subscription to match your new address before you can post to the list (see the ``Posting'' section, below). To do this, simply log in to your "membership configuration" page (see the directions for logging in to this page in the ``Unsubscribing'' section, above). At the top of that page you'll see a "Changing your membership information" section. Fill out the text boxes and click the "Change My Address and Name" button. You will be sent a confirmation e-mail, and once you have responded to that e-mail your subscription will be updated and you can begin posting from your new address. 3.4. Digests You can request to get your messages in digest form (one large message containing all of the posts made each day). To do this, log in to your "membership configuration" page (see the directions on doing this in the ``Unsubscribing'' section, above). At the bottom of the page, you will see a section titled "Your sqr-users Subscription Options". Change the "Set Digest Mode" option (the second option in the list) to "On" and click the "Submit My Changes" button at the bottom of the page. You actually have a choice of two different digest formats, "MIME" or "Plain Text". The MIME format sends each individual list message as a separate MIME attachment to the digest; the plain text format consists of one large text message, with all of the individual messages run together. Which format you will want to use depends on your mail- reading software (and personal preference). If you are not sure which format will work best, you can just leave the default setting of "MIME" and see if the next morning's digest is easy to read in your mail reader -- you can change to the other format at any time using that same web page. If you use digests, you should not just "reply" to the digest mailing. Instead, be sure your message's subject header matches the subject in the original posting to which you are replying, and that you don't include a quoted copy of the entire digest in your post. To restore normal distribution, simply follow the above instructions choosing the "Off" setting for the Digest option. 3.5. Obtaining your password You will not be able to change your subscription options without your password. If you have forgotten your password, simply click the "Email My Password to Me" button on the "member options" page and your password will be emailed to you. You will also be e-mailed a copy of your password at the beginning of each month, as part of a "mailing list memberships reminder" message from the Mailman software. 3.6. Problems If the above instructions do not work, please contact the list manager at "sqr-users-manager@sqrug.org". (Do not send a message to the list itself -- no one there can help you with your problem!) Please include a description of what you were trying to do and what exactly happened when you made the attempt. 4. Posting to the sqr-users List In order to post to the mailing list, you must be subscribed to it (see directions above). More specifically, in order for Mailman to recognize that this message was sent by a subscriber, the return address on your message much exactly match the addresss you used to subscribe -- if you have more than one address you will need to be sure that you are sending from the correct one. (See the ``When you email address changes'' section, above, if your e-mail address has changed since you subscribed.) 4.1. General Guidelines For any message you send to the list, please: o make sure your mail software is not requesting a "Return Receipt". (If a "Return Receipt Requested" message is sent to the list, several dozen receipt messages will be sent out to the mailing list as other subscribers' mail systems repond....) o do not send messages in HTML or other special formats. (These are not usable by many subscribers, especially those who receive their messages in digest format.) The list server will delete these special attachments from your message and send you a warning notice. Also, if you are trying to send (for example) SQR source code files, make sure your mail-reader software is assigning proper MIME types to your attachments or they may not be distributed. o keep in mind that over 500 people will receive your message, and that it will appear in the list archives. Try to keep your messages on-topic and relatively short. Consider sending your message directly to particular people if it won't interest many of the list's subscribers. o ignore abusive and inappropriate messages that get sent to the list, rather than getting drawn into a debate. The very nature of these messages will cause most subscribers to automatically discredit them -- no "response" is necessary. To the contrary, any response will only "add fuel to the fire," prolonging the controversy and further interupting the normal conversation on the list. 4.2. Posting a Message Once you are subscribed, you can post to the list by sending a message to "sqr-users@sqrug.org". Be sure your subject heading describes your specific problem or question (i.e. don't just use "SQR Question"). In the body of your message, please include the following information: o SQR product name and version number (see notes below) o Operating system name and version number o Database name and version number o Application name (i.e. PeopleSoft) and a version number, if any Also, include a short code sample whenever possible. It's much easier for other people to understand what you are trying to do when they can see the actual code. (At the same time, be careful not to post confidential or proprietary code, since the posting will be placed in a public web archive.) Note that your question should relate to SQR or other Brio Report product in some way. Don't ask questions about PeopleSoft, for example, unless you are having SQR-related issues. (For PeopleSoft- specific questions, see other lists mentioned in the ``Related Mailing Lists'' section.) In 2001, PeopleSoft purchased from Brio the rights to the source code for SQR and began releasing its own line of SQR. PeopleSoft's SQR version numbering is different from Brio/Hyperion's, so it's very important to mention whether you are using Hyperion's "SQR" or "SQR for PeopleSoft". (This info is included automatically if you include the full SQR version-id string as described below.) To get the version-id string for your copy of SQR, you can run the following program: begin-program show $sqr-ver end-program This will produce a line that looks something like this: SQR/3.0.15/Intel/SCO Unix R3.2 V5.0/Oracle 7.2.2.3/Sep 25 1996 Include the full line of output in your message. Note that the oper- ating system and database version numbers listed here are the ones under which this copy of SQR was compiled, so you'll still need to include this information for your own environment. In a command-line environment (Unix, etc.), you can also get this version-id string by saying sqr -id 4.3. Replying to a Message Messages sent out on the list have a Reply-To header pointing to the list. This means that you should be able to simply use your mail reader's "reply" function to send a reply to the list. Generally, all answers to questions sent out on the list should be public replies, so that other subscribers can benefit. In those cases where a private reply is appropriate, be sure to over-ride the default Reply-To address. If your message is not actually a reply to the earlier message, please do not use the "reply" function. Instead, address a new e-mail message to the list as described in the previous section. (This is because the list archives will incorrectly show the new message in the original thread if you use "reply".) You should quote enough lines from the original message that later readers can understand your answer even if they missed the original question. At the same time, you should remove any unnecessary lines from the quote in order to make your message shorter and easier to understand. (Remember that some people read the mailing list in digest form, and the digests become much larger if unnecessary lines are quoted.) 5. Job Announcements Please do not post job announcements on the sqr-users list, but use the sqr-jobs list instead. (See ``Related Mailing Lists'' for more information on this list.) A large number of sqr-users subscribers do not want to receive job announcements (for various reasons) and such posts tend to cause a lot of disruption of the discussion on the list. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 01 08:51:52 2005 From: Bob Stone Subject: RE: [sqr-users] Query to SQR Date: Wed, 1 Jun 2005 08:50:34 -0500 As is often the case with long running SQLs, there is probably a join to a relatively large table that is not using any indexes. It would be very hard for someone on this SQR list to give specific tuning advice, because we are unfamiliar with your exact tables (unless they are all PS delivered, non-altered...in which case, I still don't know them because I have not worked with GL). Talk to your DBA about the explain plan to see if they can find what join(s) are not using any index...or, in general, how you might tune the statement. You can probably create an index (or 2) that would help the query run faster, or it might help to not have so many subselects. Usually you don't want to break up the SQLs and nest them in SQR, especially more than once. Because, unless you fixed the bad section of SQL anyway (the full table scan), it will still go against all the tables just as slowly...but with added processing and IO in between. Your best bet is to have your DBA set up an index on the slower table (or help you make your join use an existing index), and then adding a hint so that it uses that index to find those rows as quickly as possible. Also, the 'between' function is slightly slower than saying "and b.account >= c.date_from and b.account <= c.date_to", and 'in' is slightly slower than "and ( d.treenode = 'PROFITLOSS' or d.treenode = 'BALSHEET')" , but neither of those should noticeably affect your query (although it may make a minor improvements since you use them multiple times). Hope that helps. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Raghvendra Dharwada Sent: Tuesday, May 31, 2005 2:44 PM To: sqr-users@sqrug.org Subject: [sqr-users] Query to SQR Hi All, I am trying to convert the following long running query (I would rather say, it times out when I run) to an SQR. Can anyone suggest me how to tune this query ? Also, if I incorporate the same query in an SQR, how do I split it? I am thinking of putting all the subqueries into different procedures and use respective variables. Is it the right way of splitting it? Please suggest me different ways of doing it or tuning the query. I appreciate your help. SELECT :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER, A.ACCOUNT, A.DEPTID, A.AFFILIATE, SUM( A.POSTED_TOTAL_AMT) FROM PS_LEDGER A WHERE A.ACCOUNT = (SELECT B.ACCOUNT FROM PS_GL_ACCOUNT_TBL B, PSTREELEAF C, PSTREENODE D WHERE B.ACCOUNT = A.ACCOUNT AND B.EFFDT = (SELECT MAX(B_ED.EFFDT) FROM PS_GL_ACCOUNT_TBL B_ED WHERE B.SETID = B_ED.SETID AND B.ACCOUNT = B_ED.ACCOUNT AND B_ED.EFFDT <= SYSDATE) AND B.ACCOUNT BETWEEN C.RANGE_FROM AND C.RANGE_TO AND C.EFFDT = (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED WHERE C.SETID = C_ED.SETID AND C.SETCNTRLVALUE = C_ED.SETCNTRLVALUE AND C.TREE_NAME = C_ED.TREE_NAME AND C_ED.EFFDT <= SYSDATE) AND C.TREE_NAME = 'ACCOUNT_ROLLUP' AND C.SETID = D.SETID AND C.TREE_NAME = D.TREE_NAME AND C.TREE_NODE_NUM = D.TREE_NODE_NUM AND D.EFFDT = (SELECT MAX(D_ED.EFFDT) FROM PSTREENODE D_ED WHERE D.SETID = D_ED.SETID AND D.SETCNTRLVALUE = D_ED.SETCNTRLVALUE AND D.TREE_NAME = D_ED.TREE_NAME AND D_ED.EFFDT <= SYSDATE) AND D.TREE_NODE IN ('PROFITLOSS','BALSHEET') AND B.SETID = 'MODEL' AND C.EFFDT = (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED WHERE C.SETID = C_ED.SETID AND C.SETCNTRLVALUE = C_ED.SETCNTRLVALUE AND C.TREE_NAME = C_ED.TREE_NAME AND C_ED.EFFDT <= D.EFFDT)) AND A.FISCAL_YEAR = :1 AND A.ACCOUNTING_PERIOD BETWEEN 0 AND :2 AND A.LEDGER = 'ACTUALS' GROUP BY :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER, A.ACCOUNT, A.DEPTID, A.AFFILIATE Thanks, Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 01 23:53:26 2005 Date: Thu, 2 Jun 2005 06:52:16 +0200 From: edwin.hommes@bluewin.ch Subject: [sqr-users] RE: Query to SQR > 1. Query to SQR (Raghvendra Dharwada) Hi, First, a well written SQL can beat any SQR or other tool. As a proven rule: Minimize your trips to the database, so splitting your SQL into several smaller ones only makes sense if the only alternative would be outer joins, unions and so on. Just from looking at your statement I'd suggest you take out one of the C.EFFDT subqueries. once it has to be smaller than SYSDATE and once D.EFFDT. You should combine that into one subquery. Also make sure following fields are indexed and that the DB Scheme has recently been analyzed (Ask your DBA!!) A.ACCOUNT A.ACCOUNTING_PERIOD B.ACCOUNT C.RANGE_FROM - C.RANGE_TO The other fields in your query seem PS standard indexed fields and should therefor be ok. Hope this helps >Hi All, > >I am trying to convert the following long running query (I would >rather say, it times out when I run) to an SQR. Can anyone suggest me >how to tune this query ? Also, if I incorporate the same query in an >SQR, how do I split it? I am thinking of putting all the subqueries >into different procedures and use respective variables. Is it the >right way of splitting it? Please suggest me different ways of doing >it or tuning the query. I appreciate your help. > >SELECT :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER, A.ACCOUNT, >A.DEPTID, A.AFFILIATE, SUM( A.POSTED_TOTAL_AMT) > FROM PS_LEDGER A > WHERE A.ACCOUNT = (SELECT B.ACCOUNT > FROM PS_GL_ACCOUNT_TBL B, PSTREELEAF C, PSTREENODE D > WHERE B.ACCOUNT = A.ACCOUNT > AND B.EFFDT = > (SELECT MAX(B_ED.EFFDT) FROM PS_GL_ACCOUNT_TBL B_ED > WHERE B.SETID = B_ED.SETID > AND B.ACCOUNT = B_ED.ACCOUNT > AND B_ED.EFFDT <= SYSDATE) > AND B.ACCOUNT BETWEEN C.RANGE_FROM AND C.RANGE_TO > AND C.EFFDT = > (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED > WHERE C.SETID = C_ED.SETID > AND C.SETCNTRLVALUE = C_ED.SETCNTRLVALUE > AND C.TREE_NAME = C_ED.TREE_NAME > AND C_ED.EFFDT <= SYSDATE) > AND C.TREE_NAME = 'ACCOUNT_ROLLUP' > AND C.SETID = D.SETID > AND C.TREE_NAME = D.TREE_NAME > AND C.TREE_NODE_NUM = D.TREE_NODE_NUM > AND D.EFFDT = > (SELECT MAX(D_ED.EFFDT) FROM PSTREENODE D_ED > WHERE D.SETID = D_ED.SETID > AND D.SETCNTRLVALUE = D_ED.SETCNTRLVALUE > AND D.TREE_NAME = D_ED.TREE_NAME > AND D_ED.EFFDT <= SYSDATE) > AND D.TREE_NODE IN ('PROFITLOSS','BALSHEET') > AND B.SETID = 'MODEL' > AND C.EFFDT = > (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED > WHERE C.SETID = C_ED.SETID > AND C.SETCNTRLVALUE = C_ED.SETCNTRLVALUE > AND C.TREE_NAME = C_ED.TREE_NAME > AND C_ED.EFFDT <= D.EFFDT)) > AND A.FISCAL_YEAR = :1 > AND A.ACCOUNTING_PERIOD BETWEEN 0 AND :2 > AND A.LEDGER = 'ACTUALS' > GROUP BY :1 , :2 , 'XXGL1234', A.BUSINESS_UNIT, A.LEDGER, >A.ACCOUNT, A.DEPTID, A.AFFILIATE > >Thanks, >Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 02 13:34:22 2005 From: yelena_kontorovich@baxter.com Date: Thu, 2 Jun 2005 13:33:18 -0500 Subject: [sqr-users] SQR and negative numbers Hello, everyone, How can i write a signed numeric to a file within the sqr? Later I need to FTP it to an AS400 and have the negative recognized on the AS400. Thanks, Yelena Kontorovich Technical Consultant 847.948.2927 yelena_kontorovich@baxter.com The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the content. The information transmitted is intended only for the person(s)or entity to which it is addressed and may contain confidential and/or legally privileged material. Delivery of this message to any person other than the intended recipient(s) is not intended in any way to waive privilege or confidentiality. Any review, retransmission, dissemination or other use of , or taking of any action in reliance upon, this information by entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer. For Translation: http://www.baxter.com/email_disclaimer _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 03 06:05:43 2005 Date: Fri, 03 Jun 2005 08:04:43 -0300 From: "PeterG Clark" Subject: Re: [sqr-users] SQR and negative numbers Hi Yelena, It would be helpful to know in which format the program on the AS400 that w= ill be reading the file expects the signed numeric field. Is it expecting a= n ASCII file or an EBCDIC file? Is it expecting the sign to be leading sepa= rate? trailing separate? zoned? >>> yelena_kontorovich@baxter.com 2005/06/02 15:33:18 >>> Hello, everyone, How can i write a signed numeric to a file within the sqr? Later I need to FTP it to an AS400 and have the negative recognized on the AS400. Thanks, Yelena Kontorovich Technical Consultant 847.948.2927 yelena_kontorovich@baxter.com=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 06 06:49:03 2005 Date: 6 Jun 2005 11:49:13 -0000 From: "p satheesh kumar" Subject: [sqr-users] Error PDf - Help Hi, Recently we have installed sqr 83 in one machine and we have already sqr ru= nning succesfully in sqr 43 version. We want get rid of sqr 43. So are in t= he process of doing that. When we want to compile the sqr from 43 version to 83. We are receiving the= following error. =A0 PDFLib Error (12): [1102] PDF_begin_page: Parameter 'width' must be positiv= e. SQR Aborted. Can someone help me. Thanks, Satheesh. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 06 06:58:29 2005 Subject: Re: [sqr-users] Upgrading from version 4.3.2.1 From: "Richard C Spoth" Date: Mon, 6 Jun 2005 07:58:17 -0400 We just went through the same Sybase upgrade and we also upgraded SQR from v6.something. What I really found out is SQR in not compatible with the 12.5 OCE for Sybase, not the DB itself. You may want to talk with you DBA about using the an older OCE to run against Sybase. We were successful in running the 11.92 Sybase OCE against 12.5 with SQR v6. Rick "Mark Warrick" Sent by: sqr-users-bounces+spoth.richard=healthnow.org@sqrug.org 05/26/2005 12:56 PM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." To: sqr-users@sqrug.org cc: Subject: [sqr-users] Upgrading from version 4.3.2.1 We are planning to upgrade from SQR version 4.3.2.1. This is due to our planned Sybase upgrade to version 12.5.x. This version of SQR does not seem to be compatiable with Sybase 12.5.x. If we did not have compatiability issues, we would not upgrade our version of SQR. We have not significantly changed our SQR programs in 10+ years and we are not utilizing any of the internet features, end user reporting tools, etc. - we simply want to run our batch programs "as is". Hyperion has provided us quotes for a software upgrade, but the nearly 6 digit dollar price tag has us considering other products. Is anyone aware of a stripped down version of SQR ( no internet features, user reporting tools, etc..) which simply runs SQR programs that is available for sale? Open source programs which are compatiable with SQR? Any ideas? Thank you in advance Mark _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users CONFIDENTIALITY NOTICE: This email message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient or a person responsible for delivering this message to an intended recipient, please contact the sender by reply email and destroy all copies of the original message. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 06 07:30:57 2005 Date: Mon, 6 Jun 2005 05:29:25 -0700 (PDT) From: yamunadevi k Subject: [sqr-users] regarding Brio Intelligence Hi, In Brio Intelligence while using Shift Key + a its displaying AAAAAAA... as many times.[Instead of displaying 'A' once its spamming ] I want to know the reason & a solution for this, can anyone help me in this. regards, yamuna --------------------------------- Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 06 07:38:35 2005 From: "Steve Cavill" Subject: RE: [sqr-users] regarding Brio Intelligence Date: Mon, 6 Jun 2005 22:37:11 +1000 Hi Yamuna, You should post this question on the Brio/Hyperion discussion lists (e.g. ittoolbox.com) This one is a known bug, you need to call Hyperion tech support to get a patch. Cheers, Steve. -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of yamunadevi k Sent: Monday, 6 June 2005 10:29 PM To: sqr-users@sqrug.org Subject: [sqr-users] regarding Brio Intelligence Hi, In Brio Intelligence while using Shift Key + a its displaying AAAAAAA... as many times.[Instead of displaying 'A' once its spamming ] I want to know the reason & a solution for this, can anyone help me in this. regards, yamuna --------------------------------- Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 06 10:01:13 2005 Date: 6 Jun 2005 15:01:44 -0000 From: "p satheesh kumar" Subject: [sqr-users] Error SQR 4603 - GRAPHIC VERT-LINE out of bounds Hi I am receiving the below error. Error on line 100: (SQR 4603) GRAPHIC VERT-LINE out of bounds. Row: 11, Column: 1, Length: 0 =20 SQRT: Program Aborting. Can anybody help me to figure out this problem? Thanks, Satheesh. =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 07 00:49:37 2005 From: "Steve Cavill" Subject: RE: [sqr-users] Error SQR 4603 - GRAPHIC VERT-LINE out of bounds Date: Tue, 7 Jun 2005 15:48:23 +1000 What does line 100 of the source code say? Steve.=20 -----Original Message----- From: sqr-users-bounces+steve.cavill=3Dinfoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=3Dinfoclarity.com.au@sqrug.org] On Behalf Of p satheesh kumar Sent: Tuesday, 7 June 2005 1:02 AM To: sqr-users@sqrug.org Subject: [sqr-users] Error SQR 4603 - GRAPHIC VERT-LINE out of bounds Hi I am receiving the below error. Error on line 100: (SQR 4603) GRAPHIC VERT-LINE out of bounds. Row: 11, Column: 1, Length: 0 =20 SQRT: Program Aborting. Can anybody help me to figure out this problem? Thanks, Satheesh. =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 07 05:37:33 2005 From: "Paul Hoyte" Subject: RE: [sqr-users] Error SQR 4603 - GRAPHIC VERT-LINE out of bounds Date: Tue, 7 Jun 2005 06:36:27 -0400 The vertical line that you are trying to print is encountering/causing a page break.=20 Paul Hoyte (248) 752-6970 www.sharidionne.com pa_hoyte@si-proservices.com -----Original Message----- From: sqr-users-bounces+pi_hoyte=3Dsi-proservices.com@sqrug.org [mailto:sqr-users-bounces+pi_hoyte=3Dsi-proservices.com@sqrug.org] On Behalf Of p satheesh kumar Sent: Monday, June 06, 2005 11:02 AM To: sqr-users@sqrug.org Subject: [sqr-users] Error SQR 4603 - GRAPHIC VERT-LINE out of bounds Hi I am receiving the below error. Error on line 100: (SQR 4603) GRAPHIC VERT-LINE out of bounds. Row: 11, Column: 1, Length: 0 =20 SQRT: Program Aborting. Can anybody help me to figure out this problem? Thanks, Satheesh. =A0 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 07 06:11:43 2005 From: "Ravindran Rajan" Date: Tue, 7 Jun 2005 16:37:49 +0530 Subject: [sqr-users] ITALICS style can't be enabled Hi Everyone I have one query. can Italics font style can be applied to text object & database fields. we have tried but it shows error that Italic is not supported. Print 'test' (10,5,8) Italic - is not supported Print 'test' (10,5,8) Bold - is supported Can you suggest any other alternative way to bring Italics font style to Text objects. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 07 07:22:53 2005 From: "Steve Cavill" Subject: RE: [sqr-users] ITALICS style can't be enabled Date: Tue, 7 Jun 2005 22:21:27 +1000 You need to add the font definition to sqr.ini Check the section in the manual on defining fonts. Steve. -----Original Message----- From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org [mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf Of Ravindran Rajan Sent: Tuesday, 7 June 2005 9:08 PM To: sqr-users@sqrug.org Subject: [sqr-users] ITALICS style can't be enabled Hi Everyone I have one query. can Italics font style can be applied to text object & database fields. we have tried but it shows error that Italic is not supported. Print 'test' (10,5,8) Italic - is not supported Print 'test' (10,5,8) Bold - is supported Can you suggest any other alternative way to bring Italics font style to Text objects. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 07 07:27:01 2005 From: "Paul Hoyte" Subject: RE: [sqr-users] ITALICS style can't be enabled Date: Tue, 7 Jun 2005 08:25:48 -0400 Try this and look at the PDF output: alter-printer font=32 point-size=10 Print 'test' (10,5,8) !Italic - is not supported Print 'test' (10,5,8) Bold !- is supported Paul Hoyte (248) 752-6970 www.sharidionne.com pa_hoyte@si-proservices.com -----Original Message----- From: sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org [mailto:sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org] On Behalf Of Ravindran Rajan Sent: Tuesday, June 07, 2005 7:08 AM To: sqr-users@sqrug.org Subject: [sqr-users] ITALICS style can't be enabled Hi Everyone I have one query. can Italics font style can be applied to text object & database fields. we have tried but it shows error that Italic is not supported. Print 'test' (10,5,8) Italic - is not supported Print 'test' (10,5,8) Bold - is supported Can you suggest any other alternative way to bring Italics font style to Text objects. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 08 04:16:29 2005 From: CGeorge@chubb.com Date: Wed, 8 Jun 2005 10:15:38 +0100 Subject: [sqr-users] Summing/Sorting Forgive me for not scanning the archives for a solution to this problem, but I'm not really sure of a succint enough search term. However, I feel that this is a problem that must have been explored by someone at some time. I'm looking for a routine that will, from a list of numbers, sum together combinations of those numbers until a user defined total is reached and then present those numbers that have been selected to sum to that total. Any pointers greatfuly received. Rgds., CG --- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 08 06:48:46 2005 From: "Ravindran Rajan" Date: Wed, 8 Jun 2005 17:15:21 +0530 Subject: [sqr-users] Reg : SPF & PDF formats are not same. I am using Hyperion SQR ver 8.2.......... While generating the reports in PDF format the SPF file generated & the PDF file generated are not same ( font & the lines position are not same ) I am using Acrobat Reader 6 version....... I dont why the font & the line positions are not same........... can anyone help me in solving this issue..... ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 08 07:58:22 2005 Date: Wed, 08 Jun 2005 08:56:56 -0400 From: "George Jansen" Subject: Re: [sqr-users] Summing/Sorting If you are using Oracle 8i and above, you can do this in SQL with the "anal= ytic functions": SQL> select object_id 2 from (select object_id, sum(object_id) over (order by object_id) as os= um 3 from user_objects) 4 where osum < 150000; OBJECT_ID ---------- 23133 23134 23135 23136 23137 >>> CGeorge@chubb.com 06/08/05 5:15 AM >>> Forgive me for not scanning the archives for a solution to this problem, but I'm not really sure of a succint enough search term. However, I feel that this is a problem that must have been explored by someone at some time. I'm looking for a routine that will, from a list of numbers, sum together combinations of those numbers until a user defined total is reached and then present those numbers that have been selected to sum to that total. Any pointers greatfuly received. Rgds., CG --- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 08 10:45:56 2005 Subject: Re: [sqr-users] Summing/Sorting From: CGeorge@chubb.com Date: Wed, 8 Jun 2005 16:45:06 +0100 George, Thanks for your response. I had no idea that these functions existed. However, I had no success in applying your sql to my own situation. Allow me to be more specific. I have a table, PS_PP_ITEM_TAO5, amongst whose columns are:- ITEM ITEM_LINE PAY_AMT I have 138 rows Aggregating the PAY_AMT at the ITEM level leaves me some 45 rows. Since I have the data in front of me I can say which rows I need to sum to my total of 142010.52. How can I represent this as a query using the analytical function syntax? Rgds., CG "George Jansen" To Sent by: sqr-users-bounces cc +cgeorge=chubb.co m@sqrug.org Subject Re: [sqr-users] Summing/Sorting 08/06/2005 13:56 Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." If you are using Oracle 8i and above, you can do this in SQL with the "analytic functions": SQL> select object_id 2 from (select object_id, sum(object_id) over (order by object_id) as osum 3 from user_objects) 4 where osum < 150000; OBJECT_ID ---------- 23133 23134 23135 23136 23137 >>> CGeorge@chubb.com 06/08/05 5:15 AM >>> Forgive me for not scanning the archives for a solution to this problem, but I'm not really sure of a succint enough search term. However, I feel that this is a problem that must have been explored by someone at some time. I'm looking for a routine that will, from a list of numbers, sum together combinations of those numbers until a user defined total is reached and then present those numbers that have been selected to sum to that total. Any pointers greatfuly received. Rgds., CG --- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --- _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 09 12:22:31 2005 Date: Thu, 9 Jun 2005 10:21:25 -0700 From: Raghvendra Dharwada Subject: [sqr-users] GLS70002 SQR in 8.8 --===============1478567745== Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: base64 Content-Disposition: inline SGkgYWxsLApJIGtub3cgdGhpcyBpcyB3ZWlyZCB0byBhc2ssIGJ1dCBpZiBp bmNhc2UgYW55b25lIHdvcmtlZCBvbiB0aGlzIApwbGVhc2UgbGV0IG1lIGtu b3cuCkkgYW0gcnVubmluZyB0aGUgZGVsaXZlcmVkIFNRUiCWIEdlbmVyYWwg TGVkZ2VyIEFjdGl2aXR5IHJlcG9ydAooR0xTNzAwMikgaW4gRmluYW5jaWFs cyA4LjgKKEhvbWUgLT4gR2VuZXJhbCBMZWRnZXIgLT4gR2VuZXJhbCBSZXBv cnRzIC0+IExlZGdlciBBY3Rpdml0eSkKIFdoZW4gSSBydW4gZm9yIGEgcGFy dGljdWxhciBBQ0NPVU5ULCBpdCB0YWtlcyBhbGwgdGhlIGFjY291bnRzIGFu ZApydW5zIGZvciBhbGwgb2YgaXQuIEkgZmlndXJlZCB0aGlzIGJ5IGNvbXBh cmluZyB0aGUgc2FtZSByZXBvcnQgZm9yCnRoZSBzYW1lIGNyaXRlcmlhIGlu IDcuNSBkZWxpdmVyZWQgcmVwb3J0IHdoaWNoIHJ1bnMgY29ycmVjdGx5IGJ5 CmNvbnNpZGVyaW5nIG9ubHkgdGhlIHNwZWNpZmllZCBBQ0NPVU5ULiBJIGNv bXBhcmVkIGJvdGggdGhlIFNRUnMgKDcuNQphbmQgOC44KSBhbmQgSSBjb3Vs ZG4ndCBmaWd1cmUgb3V0IHdoZXJlIGl0IGVycm9ycwogICBIYXMgYW55Ym9k eSBjYW1lIGFjcm9zcyB0aGlzIGlzc3VlPyBQbGVhc2UgbGV0IG1lIGtub3cK ClRoYW5rcwo= --===============1478567745== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users --===============1478567745==-- From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 09 18:48:39 2005 Date: Thu, 9 Jun 2005 16:47:36 -0700 From: Raghvendra Dharwada Subject: [sqr-users] GLS3000.sqr (7.5 Vs 8.8) Hi All, This is regarding the delivered GLS3000.sqr (Open Items Listing Report) in PeopleSoft Financials 8.8. Navigation: Home -> General Ledger -> Open Items -> Open Item Listing Repor= t. The issue with this is , the Users want the report to print like the 7.5 version of this report. I mean in 7.5, the report prints the Project ID and uses ON-BREAK which prints the total of all the Open Items for a particular Project ID. This is incorportated specifically in the Begin-Select to select the Project_id field from the respective table (Not only project id, but also other Chartfields such as Account, Department, Product etc). But now in 8.8 , since there are nearly 30 Chartfields, this CF data comes from the fsrptcf.sqc and is so complex to find which and where exactly the CF Value is getting printed.(I find only the Descriptions getting printed from a procedure). I even changed my CF report Options in the Setup Financials on the portal, to include Project and ran the report. But even then, only Account is printed, but not the Project ID ( Since I am running for all Project IDs, the field is blank on the Run Control Page). These are the run control values: Business Unit: xxxx Ledger: Actuals As of Date: xxxxx Currency: USD Chartfield Selection Account :xxxxx Project :=20 My question is, did anyone come across this issue and fixed to print the Project ID field (like the 7.5). I suppose there should be some setup Options or a minor change in the SQR or SQC. Please let me know. Also please pour in some suggestions how to modify the SQR accordingly. I am finding tough for the modification. Appreciate your help Thanks in advance Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 14 10:26:59 2005 From: rabernethy@Oxfam.org.uk Date: Tue, 14 Jun 2005 16:25:53 +0100 Subject: [sqr-users] Prefixing print control lines to SQR output. We have a requirement to send output from SQR reports to an OCE printer. The SQRs run in PeopleSoft Process Scheduler which sends the output to the printer under the batch server account of PSPRCS. This means that the user name and print name are not identified in the print queue. I have been advised that a solution is to prefix the output with the following lines: @PJL COMMENT OCE *JEC BEGIN @PJL COMMENT OCE IDENT: @PJL COMMENT OCE EMULATION PCL5 @PJL COMMENT OCE JOBNAME enter jobname here @PJL COMMENT OCE USERNAME enter username here @PJL COMMENT OCE JOBTYPE AUTOMATIC @PJL COMMENT OCE *JEC BODY My problem is how to do this, (including inserting the jobname and username at run time). The closest I have got is by using the 'init-string' parameter of 'declare-printer'. This puts the above lines near to the front of the file, however 1. they are still preceded by a couple of format control characters, which prevents the OCE printer from recognising them. 2. as 'init-string' requires a literal, and won't take a variable, I am unable to work out how to insert the jobname and username. Any helpful advice on this one would be much appreciated. Oxfam works with others to find lasting solutions to poverty and suffering. Oxfam GB is a member of Oxfam International, a company limited by guarantee and registered in England No. 612172. Registered office: 274 Banbury Road, Oxford OX2 7DZ. Registered charity No. 202918. http://www.oxfam.org.uk -- breaking news, emergency information, and enhanced content is only a click away. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 17 08:54:49 2005 Date: Wed, 15 Jun 2005 20:48:41 -0700 (PDT) From: "Joe R. Jah" Subject: [sqr-users] 6.2 -> 8.3 Upgrade problems Hi Folks, Our DBA has suddenly upgraded our SQR from 6.2 to 8.3. Many of our old programs do not run with 8.3. Is there any "rule of thumb" checklist for such an upgrade? Specifically, how can I fix the following error? I appreciate any pointers. Hyperion SQR Server 8.3 Copyright (c) 1994-2004 Hyperion Solutions Corporation. All Rights Reserved. Executing SWRMC07 report (SQR 5528) ORACLE OCIStmtExecute error 904 in cursor 9: ORA-00904: "SCRATTR_ATTR_CODE": invalid identifier SQL: SELECT ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'C', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'**** '), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssbsect_ptrm_start_date,'MMDDYY'), to_char(ssbsect_ptrm_end_date,'MMDDYY'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,ssbsect_camp_code)), 'AIRP', 'A', 'ALA*', 'O', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'LGB*', 'C', 'CHNB', 'D', 'C', 'E', 'DEY*', 'E', 'DNTN', 'F', 'D', 'F', 'ELCO', 'N', 'EVANS', 'H', 'E', 'H', 'EXPLR', 'I', 'FORT', 'J', 'FAD*', 'K', 'HOS*', 'K', 'JAD', 'K', 'PDO*', 'K', 'PRE*', 'K', 'J', 'K', 'LHO*', 'L', 'MMS', 'M', 'MIS', 'O', 'M', 'O', 'PRESM', 'O', 'SEC', 'P', 'S', 'P', 'CLY*', 'Q', 'WAR*', 'R', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, decode(to_char(ssbsect_ptrm_start_date,'MON'), 'MAY', '1', 'JUN', '1', 'JUL', '2', 'AUG', '2', ' '), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, scrattr, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and c.scrlevl_subj_code = ssbsect_subj_code and c.scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_subj_code = scrattr_subj_code(+) and ssbsect_crse_numb = scrattr_crse_numb(+) and scrattr_attr_code(+) <> 'BSKL' and scrattr_attr_code(+) <> 'PBSK' and scrattr_attr_code(+) <> 'LIO*' and scrattr_attr_code(+) <> 'INTR' and scrattr_attr_code(+) <> 'CON*' and scrattr_attr_code(+) <> 'CIS' and scrattr_attr_code(+) <> 'WEBG' and scrattr_attr_code(+) <> 'NDA' and scrattr_attr_code(+) <> 'NBK' and scrattr_attr_code(+) not in ('CA1','CA2','CA3','CB1','CB2','CB3') and scrattr_attr_code(+) not in ('CB4','CC1','CC2','CD1','CD2','CD3') and scrattr_attr_code(+) not in ('CD4','CD5','CD6','CD7','CD8','CD9') and scrattr_attr_code(+) not in ('CE1','CE2','I1A','I1B','I1C','I2A') and scrattr_attr_code(+) not in ('I3A','I3B','I4A','I4B','I4C','I4D') and scrattr_attr_code(+) not in ('I4E','I4F','I4G','I4H','I4I','I4J') and scrattr_attr_code(+) not in ('CD0','NDA','NT','%CV0') and scrattr_attr_code(+) not in ('I5A','I5B''I6A','I7A','I7B','I8A','I8B') and ssbsect_term_code >= scrattr_eff_term(+) and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <> '98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null union select ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'S', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'*****'), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssrmeet_start_date,'mmddyy'), to_char(ssrmeet_end_date,'mmddyy'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'??????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,'****')), 'AIRP', 'A', 'ALA*', 'N', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'CHNB', 'C', 'C', 'C', 'DEY*', 'D', 'DNTN', 'E', 'D', 'E', 'ELCO', 'F', 'EVANS', 'G', 'E', 'G', 'EXPLR', 'H', 'FORT', 'I', 'FAD*', 'J', 'JAD', 'J', 'PRE*', 'J', 'J', 'J', 'LHO*', 'K', 'MMS', 'L', 'MIS', 'M', 'M', 'M', 'PRESM', 'N', 'SEC', 'O', 'S', 'O', 'CLY*', 'P', 'WAR*', 'Q', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, to_char(ssbsect_ptrm_start_date,'MON'), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, ssrattr g, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and scrlevl_subj_code = ssbsect_subj_code and scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_term_code = ssrattr_term_code and ssbsect_crn = ssrattr_crn and ssrattr_attr_code <> 'BSKL' and ssrattr_attr_code <> 'PBSK' and ssrattr_attr_code <> 'LIO*' and ssrattr_attr_code <> 'INTR' and ssrattr_attr_code <> 'CON*' and ssrattr_attr_code <> 'CIS' and ssrattr_attr_code <> 'WEBG' and ssrattr_attr_code <> 'NDA' and ssrattr_attr_code not in ('CA1','CA2','CA3','CB1','CB2','CB3') and ssrattr_attr_code not in ('CB4','CC1','CC2','CD1','CD2','CD3') and ssrattr_attr_code not in ('CD4','CD5','CD6','CD7','CD8','CD9') and ssrattr_attr_code not in ('CE1','CE2','I1A','I1B','I1C','I2A') and ssrattr_attr_code not in ('I3A','I3B','I4A','I4B','I4C','I4D') and ssrattr_attr_code not in ('I4E','I4F','I4G','I4H','I4I','I4J') and ssrattr_attr_code not in ('CD0','%CV0') and ssrattr_attr_code not in ('I5A','I5B','I6A','I7A','I7B','I8A','I8B') and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <>'98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null order by 5,2,3,4,1,41 Error on line 434: (SQR 3722) Could not set up cursor. SQR: Program Aborting. Regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jjah@cloud.ccsf.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 17 11:20:08 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] 6.2 -> 8.3 Upgrade problems Date: Fri, 17 Jun 2005 09:19:27 -0700 I know this isn't what you asked, but this looks like "write-only" code, never intended to be maintained. It's joining nine tables, and some with outer joins. (That probably runs slowly.) The tables seem to be far from normalized. Most of the tables don't have aliases, so you can't tell which fields belong to which tables. The elaborate decode statements suggest either that the contents of the tables are not really what you wished them to be or the SQR program was written without regard for the actual data. The mystery is why "SCRATTR_ATTR_CODE" is an invalid identifier. You didn't mention any change to the tables or to the Oracle software. Perhaps this very long SQL statement got truncated when SQR sent it to the database server, and the table containing SCRATTR_ATTR_CODE was omitted from the FROM clause. -----Original Message----- From: Joe R. Jah [mailto:jjah@cloud.ccsf.cc.ca.us] Sent: Wednesday, June 15, 2005 8:49 PM To: sqr-users@sqrug.org Subject: [sqr-users] 6.2 -> 8.3 Upgrade problems Hi Folks, Our DBA has suddenly upgraded our SQR from 6.2 to 8.3. Many of our old programs do not run with 8.3. Is there any "rule of thumb" checklist for such an upgrade? Specifically, how can I fix the following error? I appreciate any pointers. Hyperion SQR Server 8.3 Copyright (c) 1994-2004 Hyperion Solutions Corporation. All Rights Reserved. Executing SWRMC07 report (SQR 5528) ORACLE OCIStmtExecute error 904 in cursor 9: ORA-00904: "SCRATTR_ATTR_CODE": invalid identifier SQL: SELECT ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'C', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'**** '), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssbsect_ptrm_start_date,'MMDDYY'), to_char(ssbsect_ptrm_end_date,'MMDDYY'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,ssbsect_camp_code)), 'AIRP', 'A', 'ALA*', 'O', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'LGB*', 'C', 'CHNB', 'D', 'C', 'E', 'DEY*', 'E', 'DNTN', 'F', 'D', 'F', 'ELCO', 'N', 'EVANS', 'H', 'E', 'H', 'EXPLR', 'I', 'FORT', 'J', 'FAD*', 'K', 'HOS*', 'K', 'JAD', 'K', 'PDO*', 'K', 'PRE*', 'K', 'J', 'K', 'LHO*', 'L', 'MMS', 'M', 'MIS', 'O', 'M', 'O', 'PRESM', 'O', 'SEC', 'P', 'S', 'P', 'CLY*', 'Q', 'WAR*', 'R', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, decode(to_char(ssbsect_ptrm_start_date,'MON'), 'MAY', '1', 'JUN', '1', 'JUL', '2', 'AUG', '2', ' '), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, scrattr, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and c.scrlevl_subj_code = ssbsect_subj_code and c.scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_subj_code = scrattr_subj_code(+) and ssbsect_crse_numb = scrattr_crse_numb(+) and scrattr_attr_code(+) <> 'BSKL' and scrattr_attr_code(+) <> 'PBSK' and scrattr_attr_code(+) <> 'LIO*' and scrattr_attr_code(+) <> 'INTR' and scrattr_attr_code(+) <> 'CON*' and scrattr_attr_code(+) <> 'CIS' and scrattr_attr_code(+) <> 'WEBG' and scrattr_attr_code(+) <> 'NDA' and scrattr_attr_code(+) <> 'NBK' and scrattr_attr_code(+) not in ('CA1','CA2','CA3','CB1','CB2','CB3') and scrattr_attr_code(+) not in ('CB4','CC1','CC2','CD1','CD2','CD3') and scrattr_attr_code(+) not in ('CD4','CD5','CD6','CD7','CD8','CD9') and scrattr_attr_code(+) not in ('CE1','CE2','I1A','I1B','I1C','I2A') and scrattr_attr_code(+) not in ('I3A','I3B','I4A','I4B','I4C','I4D') and scrattr_attr_code(+) not in ('I4E','I4F','I4G','I4H','I4I','I4J') and scrattr_attr_code(+) not in ('CD0','NDA','NT','%CV0') and scrattr_attr_code(+) not in ('I5A','I5B''I6A','I7A','I7B','I8A','I8B') and ssbsect_term_code >= scrattr_eff_term(+) and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <> '98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null union select ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'S', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'*****'), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssrmeet_start_date,'mmddyy'), to_char(ssrmeet_end_date,'mmddyy'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'??????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,'****')), 'AIRP', 'A', 'ALA*', 'N', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'CHNB', 'C', 'C', 'C', 'DEY*', 'D', 'DNTN', 'E', 'D', 'E', 'ELCO', 'F', 'EVANS', 'G', 'E', 'G', 'EXPLR', 'H', 'FORT', 'I', 'FAD*', 'J', 'JAD', 'J', 'PRE*', 'J', 'J', 'J', 'LHO*', 'K', 'MMS', 'L', 'MIS', 'M', 'M', 'M', 'PRESM', 'N', 'SEC', 'O', 'S', 'O', 'CLY*', 'P', 'WAR*', 'Q', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, to_char(ssbsect_ptrm_start_date,'MON'), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, ssrattr g, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and scrlevl_subj_code = ssbsect_subj_code and scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_term_code = ssrattr_term_code and ssbsect_crn = ssrattr_crn and ssrattr_attr_code <> 'BSKL' and ssrattr_attr_code <> 'PBSK' and ssrattr_attr_code <> 'LIO*' and ssrattr_attr_code <> 'INTR' and ssrattr_attr_code <> 'CON*' and ssrattr_attr_code <> 'CIS' and ssrattr_attr_code <> 'WEBG' and ssrattr_attr_code <> 'NDA' and ssrattr_attr_code not in ('CA1','CA2','CA3','CB1','CB2','CB3') and ssrattr_attr_code not in ('CB4','CC1','CC2','CD1','CD2','CD3') and ssrattr_attr_code not in ('CD4','CD5','CD6','CD7','CD8','CD9') and ssrattr_attr_code not in ('CE1','CE2','I1A','I1B','I1C','I2A') and ssrattr_attr_code not in ('I3A','I3B','I4A','I4B','I4C','I4D') and ssrattr_attr_code not in ('I4E','I4F','I4G','I4H','I4I','I4J') and ssrattr_attr_code not in ('CD0','%CV0') and ssrattr_attr_code not in ('I5A','I5B','I6A','I7A','I7B','I8A','I8B') and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <>'98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null order by 5,2,3,4,1,41 Error on line 434: (SQR 3722) Could not set up cursor. SQR: Program Aborting. Regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jjah@cloud.ccsf.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 17 12:08:31 2005 From: "Paul Hoyte" Subject: RE: [sqr-users] 6.2 -> 8.3 Upgrade problems Date: Fri, 17 Jun 2005 13:07:38 -0400 Sounds like you either need to check the SQLSIZE parameter in the SQR.INI file and the cursor size on your database. Paul Hoyte (248) 752-6970 Cell (586) 421-9640 Fax pa_hoyte@si-proservices.com (Email) www.sharidionne.com (Web Site) -----Original Message----- From: sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org [mailto:sqr-users-bounces+pi_hoyte=si-proservices.com@sqrug.org] On Behalf Of Alexander, Steve Sent: Friday, June 17, 2005 12:19 PM To: 'This list is for discussion about the SQR database reportinglanguagefrom Hyperion Solutions.' Subject: RE: [sqr-users] 6.2 -> 8.3 Upgrade problems I know this isn't what you asked, but this looks like "write-only" code, never intended to be maintained. It's joining nine tables, and some with outer joins. (That probably runs slowly.) The tables seem to be far from normalized. Most of the tables don't have aliases, so you can't tell which fields belong to which tables. The elaborate decode statements suggest either that the contents of the tables are not really what you wished them to be or the SQR program was written without regard for the actual data. The mystery is why "SCRATTR_ATTR_CODE" is an invalid identifier. You didn't mention any change to the tables or to the Oracle software. Perhaps this very long SQL statement got truncated when SQR sent it to the database server, and the table containing SCRATTR_ATTR_CODE was omitted from the FROM clause. -----Original Message----- From: Joe R. Jah [mailto:jjah@cloud.ccsf.cc.ca.us] Sent: Wednesday, June 15, 2005 8:49 PM To: sqr-users@sqrug.org Subject: [sqr-users] 6.2 -> 8.3 Upgrade problems Hi Folks, Our DBA has suddenly upgraded our SQR from 6.2 to 8.3. Many of our old programs do not run with 8.3. Is there any "rule of thumb" checklist for such an upgrade? Specifically, how can I fix the following error? I appreciate any pointers. Hyperion SQR Server 8.3 Copyright (c) 1994-2004 Hyperion Solutions Corporation. All Rights Reserved. Executing SWRMC07 report (SQR 5528) ORACLE OCIStmtExecute error 904 in cursor 9: ORA-00904: "SCRATTR_ATTR_CODE": invalid identifier SQL: SELECT ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'C', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'**** '), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssbsect_ptrm_start_date,'MMDDYY'), to_char(ssbsect_ptrm_end_date,'MMDDYY'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,ssbsect_camp_code)), 'AIRP', 'A', 'ALA*', 'O', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'LGB*', 'C', 'CHNB', 'D', 'C', 'E', 'DEY*', 'E', 'DNTN', 'F', 'D', 'F', 'ELCO', 'N', 'EVANS', 'H', 'E', 'H', 'EXPLR', 'I', 'FORT', 'J', 'FAD*', 'K', 'HOS*', 'K', 'JAD', 'K', 'PDO*', 'K', 'PRE*', 'K', 'J', 'K', 'LHO*', 'L', 'MMS', 'M', 'MIS', 'O', 'M', 'O', 'PRESM', 'O', 'SEC', 'P', 'S', 'P', 'CLY*', 'Q', 'WAR*', 'R', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, decode(to_char(ssbsect_ptrm_start_date,'MON'), 'MAY', '1', 'JUN', '1', 'JUL', '2', 'AUG', '2', ' '), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, scrattr, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and c.scrlevl_subj_code = ssbsect_subj_code and c.scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_subj_code = scrattr_subj_code(+) and ssbsect_crse_numb = scrattr_crse_numb(+) and scrattr_attr_code(+) <> 'BSKL' and scrattr_attr_code(+) <> 'PBSK' and scrattr_attr_code(+) <> 'LIO*' and scrattr_attr_code(+) <> 'INTR' and scrattr_attr_code(+) <> 'CON*' and scrattr_attr_code(+) <> 'CIS' and scrattr_attr_code(+) <> 'WEBG' and scrattr_attr_code(+) <> 'NDA' and scrattr_attr_code(+) <> 'NBK' and scrattr_attr_code(+) not in ('CA1','CA2','CA3','CB1','CB2','CB3') and scrattr_attr_code(+) not in ('CB4','CC1','CC2','CD1','CD2','CD3') and scrattr_attr_code(+) not in ('CD4','CD5','CD6','CD7','CD8','CD9') and scrattr_attr_code(+) not in ('CE1','CE2','I1A','I1B','I1C','I2A') and scrattr_attr_code(+) not in ('I3A','I3B','I4A','I4B','I4C','I4D') and scrattr_attr_code(+) not in ('I4E','I4F','I4G','I4H','I4I','I4J') and scrattr_attr_code(+) not in ('CD0','NDA','NT','%CV0') and scrattr_attr_code(+) not in ('I5A','I5B''I6A','I7A','I7B','I8A','I8B') and ssbsect_term_code >= scrattr_eff_term(+) and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <> '98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null union select ssbsect_crn, ssbsect_subj_code, ssbsect_crse_numb, ssbsect_seq_numb, decode (ssbsect_seq_numb, '075', 'STAB', '076', 'STAB', '111', 'AFAS', '112', 'AFAS', '113', 'AFAS', '114', 'AFAS', decode(ssbsect_subj_code, 'JRNY','APPR', nvl(scrattr_attr_code,ssbsect_subj_code))), 'S', nvl(ssbsect_crse_title,'***************'), nvl(ssbsect_credit_hrs,0), nvl(scbcrse_credit_hr_low,0), nvl(scbcrse_title,'***************'), nvl(ssrmeet_mon_day,' '), nvl(ssrmeet_tue_day,' '), nvl(ssrmeet_wed_day,' '), nvl(ssrmeet_thu_day,' '), nvl(ssrmeet_fri_day,' '), nvl(ssrmeet_sat_day,' '), nvl(ssrmeet_sun_day,' '), nvl(ssrmeet_begin_time,'0000'), nvl(ssrmeet_end_time,'0000'), nvl(ssrmeet_bldg_code,'*****'), substr(nvl(ssrmeet_room_code,'****'),1,4), nvl(ssrmeet_catagory,' '), ssbsect_max_enrl, nvl(ssbsect_sess_code,'D'), nvl(scbcrse_coll_code,'99'), nvl(ssbsect_acct_code,' '), ssbsect_ssts_code, ssbsect_ptrm_code, scrlevl_levl_code, sirasgn_pidm, ssbsect_camp_code, ssbsect_schd_code, to_char(ssrmeet_start_date,'mmddyy'), to_char(ssrmeet_end_date,'mmddyy'), nvl(ssbovrr_divs_code,'****'), nvl(scbcrse_divs_code,'****'), nvl(stvbldg_desc,'******'), nvl(stvsubj_desc,'??????'), nvl(ssbsect_prnt_ind,'Y'), nvl(scbcrse_dept_code,'0000'), ssrmeet.rowid, decode((nvl(ssrmeet_bldg_code,'****')), 'AIRP', 'A', 'ALA*', 'N', 'EVRT', 'B', 'JLK', 'B', 'V', 'B', 'CHNB', 'C', 'C', 'C', 'DEY*', 'D', 'DNTN', 'E', 'D', 'E', 'ELCO', 'F', 'EVANS', 'G', 'E', 'G', 'EXPLR', 'H', 'FORT', 'I', 'FAD*', 'J', 'JAD', 'J', 'PRE*', 'J', 'J', 'J', 'LHO*', 'K', 'MMS', 'L', 'MIS', 'M', 'M', 'M', 'PRESM', 'N', 'SEC', 'O', 'S', 'O', 'CLY*', 'P', 'WAR*', 'Q', ' '), nvl(ssbsect_census_enrl,0), nvl(ssbsect_enrl,0), sirasgn_fcnt_code, to_char(ssbsect_ptrm_start_date,'MON'), to_char(ssbsect_ptrm_start_date,'MMDD') from scbcrse a, stvbldg, stvsubj, ssbovrr, ssrattr g, ssrmeet, sirasgn, scrlevl c, ssbsect where ssbsect_term_code = :1 and scrlevl_levl_code = '01' and ssbsect_ssts_code <> 'C' and ssbsect_acct_code <> 'CS' and ssbsect_acct_code <> 'CA' and ssbsect_crn = ssbovrr_crn(+) and ssbsect_term_code = ssbovrr_term_code(+) and scrlevl_subj_code = ssbsect_subj_code and scrlevl_crse_numb = ssbsect_crse_numb and c.scrlevl_eff_term = (select max(d.scrlevl_eff_term) from scrlevl d where d.scrlevl_crse_numb = ssbsect_crse_numb and d.scrlevl_subj_code = ssbsect_subj_code and d.scrlevl_eff_term <= ssbsect_term_code) and ssbsect_term_code = ssrattr_term_code and ssbsect_crn = ssrattr_crn and ssrattr_attr_code <> 'BSKL' and ssrattr_attr_code <> 'PBSK' and ssrattr_attr_code <> 'LIO*' and ssrattr_attr_code <> 'INTR' and ssrattr_attr_code <> 'CON*' and ssrattr_attr_code <> 'CIS' and ssrattr_attr_code <> 'WEBG' and ssrattr_attr_code <> 'NDA' and ssrattr_attr_code not in ('CA1','CA2','CA3','CB1','CB2','CB3') and ssrattr_attr_code not in ('CB4','CC1','CC2','CD1','CD2','CD3') and ssrattr_attr_code not in ('CD4','CD5','CD6','CD7','CD8','CD9') and ssrattr_attr_code not in ('CE1','CE2','I1A','I1B','I1C','I2A') and ssrattr_attr_code not in ('I3A','I3B','I4A','I4B','I4C','I4D') and ssrattr_attr_code not in ('I4E','I4F','I4G','I4H','I4I','I4J') and ssrattr_attr_code not in ('CD0','%CV0') and ssrattr_attr_code not in ('I5A','I5B','I6A','I7A','I7B','I8A','I8B') and ssbsect_crse_numb = a.scbcrse_crse_numb and ssbsect_subj_code = a.scbcrse_subj_code and a.scbcrse_eff_term = (select max(b.scbcrse_eff_term) from scbcrse b where b.scbcrse_crse_numb = ssbsect_crse_numb and b.scbcrse_subj_code = ssbsect_subj_code and b.scbcrse_eff_term <= ssbsect_term_code) and ssbsect_subj_code = stvsubj_code and ssbsect_crn = ssrmeet_crn(+) and ssbsect_term_code = ssrmeet_term_code(+) and ssrmeet_term_code = sirasgn_term_code(+) and ssrmeet_crn = sirasgn_crn(+) and ssrmeet_catagory = sirasgn_category(+) and ssrmeet_catagory <>'98' and ssrmeet_bldg_code = stvbldg_code(+) and ssbsect_crn is not null order by 5,2,3,4,1,41 Error on line 434: (SQR 3722) Could not set up cursor. SQR: Program Aborting. Regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jjah@cloud.ccsf.edu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 17 18:08:30 2005 Date: Fri, 17 Jun 2005 16:07:46 -0700 (PDT) From: "Joe R. Jah" Subject: RE: [sqr-users] 6.2 -> 8.3 Upgrade problems On Fri, 17 Jun 2005, Alexander, Steve wrote: > Date: Fri, 17 Jun 2005 09:19:27 -0700 > From: "Alexander, Steve" > Reply-To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. > To: 'This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions.' > Subject: RE: [sqr-users] 6.2 -> 8.3 Upgrade problems > > I know this isn't what you asked, but this looks like "write-only" code, > never intended to be maintained. It's joining nine tables, and some with > outer joins. (That probably runs slowly.) The tables seem to be far from > normalized. Most of the tables don't have aliases, so you can't tell which > fields belong to which tables. The elaborate decode statements suggest > either that the contents of the tables are not really what you wished them > to be or the SQR program was written without regard for the actual data. > > The mystery is why "SCRATTR_ATTR_CODE" is an invalid identifier. You didn't > mention any change to the tables or to the Oracle software. Perhaps this > very long SQL statement got truncated when SQR sent it to the database > server, and the table containing SCRATTR_ATTR_CODE was omitted from the FROM > clause. Thank you for your astute observation; the problem in "SCRATTR_ATTR_CODE" had been created by a FIX, (it has been reversed,) to fix the original problem caused by the 6.2 -> 8.3 upgrade: Hyperion SQR Server 8.3 Copyright (c) 1994-2004 Hyperion Solutions Corporation. All Rights Reserved. Executing SWRMC07 report (SQR 5528) ORACLE OCIStmtFetch error 1406 in cursor 9: ORA-01406: fetched column value was truncated Error on line 434: (SQR 3725) Bad return fetching row from database. SQR: Program Aborting. There aren't any changes to the tables or to the Oracle software: Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production Best regards, Joe -- _/ _/_/_/ _/ ____________ __o _/ _/ _/ _/ ______________ _-\<,_ _/ _/ _/_/_/ _/ _/ ......(_)/ (_) _/_/ oe _/ _/. _/_/ ah jjah@cloud.ccsf.cc.ca.us _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 20 09:34:31 2005 From: "radhika reddy" Date: Mon, 20 Jun 2005 09:33:24 -0500 Subject: [sqr-users] INITCAP Hi, I have a string coming from the flat file which might be in the form of 'Sqrusers' or 'SQRUSERS' or 'SQRusers'. Before inserting into the table i want to make sure that it is in the following format 'Sqrusers'(that is first letter capital always). i thought there is this function INITCAP, but i don't see that in my version(5.1). Is this function correct? if i don't have a function, may be i can do it in a different way like using Substr function. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 20 09:39:57 2005 Date: Mon, 20 Jun 2005 07:38:52 -0700 (PDT) From: G Azevedo Subject: [sqr-users] INITCAP I'm sure there's another way. I know that the Oracle DB enviornment SQL has an INITCAP function. --- radhika reddy wrote: Hi, I have a string coming from the flat file which might be in the form of 'Sqrusers' or 'SQRUSERS' or 'SQRusers'. Before inserting into the table i want to make sure that it is in the following format 'Sqrusers'(that is first letter capital always). i thought there is this function INITCAP, but i don't see that in my version(5.1). Is this function correct? if i don't have a function, may be i can do it in a different way like using Substr function. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 20 09:44:11 2005 Subject: Re: [sqr-users] INITCAP From: Roger.Harris@certegy.com Date: Mon, 20 Jun 2005 10:42:57 -0400 This should do it Let $string = Upper(Substr($string, 1, 1)) || Lower(Substr($string, 2, (Length($string) - 1))) |---------+----------------------------------------------------> | | "radhika reddy" | | | Sent by: | | | sqr-users-bounces+roger.harris=certegy.co| | | m@sqrug.org | | | | | | | | | 06/20/2005 10:33 AM | | | Please respond to "This list is for | | | discussion about the SQR database | | | reporting language from Hyperion | | | Solutions." | | | | |---------+----------------------------------------------------> >----------------------------------------------------------------------------------------------| | | | To: sqr-users@sqrug.org | | cc: | | Subject: [sqr-users] INITCAP | >----------------------------------------------------------------------------------------------| Hi, I have a string coming from the flat file which might be in the form of 'Sqrusers' or 'SQRUSERS' or 'SQRusers'. Before inserting into the table i want to make sure that it is in the following format 'Sqrusers'(that is first letter capital always). i thought there is this function INITCAP, but i don't see that in my version(5.1). Is this function correct? if i don't have a function, may be i can do it in a different way like using Substr function. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ------------------------------------------------------------------------------ This message contains information from Certegy, Inc which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e:mail postmaster@certegy.com. ============================================================================== _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 20 14:36:37 2005 Date: Mon, 20 Jun 2005 12:35:29 -0700 From: Raghvendra Dharwada Subject: [sqr-users] SQR using trees Hi, I am trying to develop a query (probably an SQR) that should list all departments that roll up to 'CBNA_F' (Node) in the FUNCTIONAL_ROLLUP tree. We need the department number, description, business line and region I am working on PS Financials8.8 and Oracle9i There is an exisiting SQR that loads the data of FUNCTIONAL_ROLLUP tree in addition to 2 more trees(I am unconcerened with the other 2 trees), into a table called ps_tree_dept_tbl by joining the following tables: ps_dept_tbl, pstreenode , pstreeleaf ans ps_tree_node_tbl The flow of the SQR is as follows: Select all the depts from PS_DEPT_TBL DEPT where DEPT.eff_status =3D 'A' and DEPT.effdt =3D SELECT MAX(EFFDT) FROM PS_DEPT_TBL WHERE DEPT.SETID =3D SETID AND DEPT.DEPTID =3D DEPTID AND EFFDT <=3D SYSDATE) For each department get the leaf.tree_node_num from pstreeleaf leaf where where LEAF.setid =3D $dept_setid and LEAF.tree_name =3D $tree_name and $deptid between LEAF.range_from and LEAF.range_to and LEAF.effdt =3D (SELECT MAX(EFFDT) FROM PSTREELEAF WHERE LEAF.SETID =3D SETID AND LEAF.TREE_NAME =3D TREE_NAME AND EFFDT <=3D SYSDATE) For each leaf.tree_node_num get node.tree_node, node.tree_level_num from pstreenode node where NODE.setid =3D $dept_setid and NODE.tree_name =3D $tree_name !FUNCTIONAL_ROLLUP and NODE.tree_node_num =3D leaf.tree_node_num !ofcourse a variable is used= here and NODE.effdt =3D (SELECT MAX(EFFDT) FROM PSTREENODE WHERE NODE.SETID =3D SETID AND NODE.TREE_NAME =3D TREE_NAME AND EFFDT <=3D SYSDATE) =09=09 For each node.tree_node_num get the descr from ps_tree_node_tbl from PS_TREE_NODE_TBL DES where DES.setid =3D $dept_setid and DES.tree_node =3D $treenode ! node.tree_node_num=20=20 and DES.effdt =3D (SELECT MAX(EFFDT) FROM PS_TREE_NODE_TBL WHERE DES.SETID =3D SETID AND DES.TREE_NODE =3D TREE_NODE AND EFFDT <=3D SYSDATE) Now , my question is , is there any way that I can get only those departments that will rollup only to the CBNA_F node in the FUNCTIONAL_ROLLUP tree by either cloning tbis SQR or using this SQR as a termplate? I tried some SQLs using pstreenode and pstreeleaf but . I am unable to figure out how I can grab the required only as per the requirement Please let me know if anyone can suggest me regarding this issue.I appreciate your help. Thanks in advance Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 20 14:47:04 2005 Subject: RE: [sqr-users] SQR using trees Date: Mon, 20 Jun 2005 14:46:26 -0500 From: "Knapp, Richard" The short answer is no. At least that is what I discovered some years ago when I attempted a similar SQR. Could be there are some more clever folks around these days, who knows? If the tree structure is still contained in the node and leaf tables, seems to me you are going to have to use them. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of Raghvendra Dharwada Sent: Monday, June 20, 2005 2:35 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR using trees Hi, I am trying to develop a query (probably an SQR) that should list all departments that roll up to 'CBNA_F' (Node) in the FUNCTIONAL_ROLLUP tree. We need the department number, description, business line and region I am working on PS Financials8.8 and Oracle9i There is an exisiting SQR that loads the data of FUNCTIONAL_ROLLUP tree in addition to 2 more trees(I am unconcerened with the other 2 trees), into a table called ps_tree_dept_tbl by joining the following tables: ps_dept_tbl, pstreenode , pstreeleaf ans ps_tree_node_tbl The flow of the SQR is as follows: Select all the depts from PS_DEPT_TBL DEPT where DEPT.eff_status =3D 'A' and DEPT.effdt =3D SELECT MAX(EFFDT) FROM PS_DEPT_TBL WHERE DEPT.SETID =3D SETID AND DEPT.DEPTID =3D DEPTID AND EFFDT <=3D SYSDATE) For each department get the leaf.tree_node_num from pstreeleaf leaf where where LEAF.setid =3D $dept_setid and LEAF.tree_name =3D $tree_name and $deptid between LEAF.range_from and LEAF.range_to and LEAF.effdt =3D (SELECT MAX(EFFDT) FROM PSTREELEAF WHERE LEAF.SETID =3D SETID AND LEAF.TREE_NAME =3D TREE_NAME AND EFFDT <=3D SYSDATE) For each leaf.tree_node_num get node.tree_node, node.tree_level_num from pstreenode node where NODE.setid =3D $dept_setid and NODE.tree_name =3D $tree_name !FUNCTIONAL_ROLLUP and NODE.tree_node_num =3D leaf.tree_node_num !ofcourse a variable is used here and NODE.effdt =3D (SELECT MAX(EFFDT) FROM PSTREENODE WHERE NODE.SETID =3D SETID AND NODE.TREE_NAME =3D TREE_NAME AND EFFDT <=3D SYSDATE) =09=09 For each node.tree_node_num get the descr from ps_tree_node_tbl from PS_TREE_NODE_TBL DES where DES.setid =3D $dept_setid and DES.tree_node =3D $treenode ! node.tree_node_num=20=20 and DES.effdt =3D (SELECT MAX(EFFDT) FROM PS_TREE_NODE_TBL WHERE DES.SETID =3D SETID AND DES.TREE_NODE =3D TREE_NODE AND EFFDT <=3D SYSDATE) Now , my question is , is there any way that I can get only those departments that will rollup only to the CBNA_F node in the FUNCTIONAL_ROLLUP tree by either cloning tbis SQR or using this SQR as a termplate? I tried some SQLs using pstreenode and pstreeleaf but . I am unable to figure out how I can grab the required only as per the requirement Please let me know if anyone can suggest me regarding this issue.I appreciate your help. Thanks in advance Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 21 10:44:29 2005 From: "Wright, David L. II" Date: Tue, 21 Jun 2005 08:43:07 -0700 Subject: [sqr-users] DDP003.SQR with 3rd Array Greetings, I've got an issue that has PeopleSoft stumped. So, I thought I'd ask the SQR experts - you. We added a 3rd array to DDP003.SQR to collect "begin/end" information on multiple .prn output files. The .prn files are the advices themselves that we FTP to a Vendor who prints the advices. The array is then referenced at eoj time to create a summary report of the .prn files created - File Name, starting/ending advice #, etc. This "log" is also sent to the Vendor. If the Vendor has to reprint any advices, they reference the log for a starting/ending file to reprint. What's happening is after the first EE's advice is printed, every EE after that has their current Fed Med/EE deduction amounts in the $millions. And it continues to grow with each subsequent EE. The SQR works fine without the 3rd array. I believe that the 3rd array is somehow being stepped on by something else - another array or something internal unbeknownst to me. The puzzling thing is, this SQR works fine in 7.51. HRMS 8.8 SP1, Tools 8.45 seems to have difficulty with the 3rd array. Is there anything different in release 8 having to do with arrays? If anyone can shed some light on this I would be very appreciative. Thanks in advance, Dave David L. Wright, II SAIC - Sr. Technical Consultant, PeopleSoft E-mail: david.l.wright.ii@saic.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 21 15:53:30 2005 Subject: Re: [sqr-users] DDP003.SQR with 3rd Array From: Ramzi_Salameh@daveandbusters.com Date: Tue, 21 Jun 2005 15:52:01 -0500 Other than the fact that PeopleSoft purchased and made their own version of SQR in tools 8, we've not encountered any issues with arrays. We're on Tools 8.16 and 8.45. ----------------------------------------------------- Ramzi Salameh Senior Technical Analyst (214) 904-2550 Dave and Buster's, Inc. ----------------------------------------------------- "Wright, David L. II" Sent by: sqr-users-bounces+ramzi_salameh=daveandbusters.com@sqrug.org 06/21/2005 10:43 AM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." To: 'SQR Users Group' cc: Subject: [sqr-users] DDP003.SQR with 3rd Array Greetings, I've got an issue that has PeopleSoft stumped. So, I thought I'd ask the SQR experts - you. We added a 3rd array to DDP003.SQR to collect "begin/end" information on multiple .prn output files. The .prn files are the advices themselves that we FTP to a Vendor who prints the advices. The array is then referenced at eoj time to create a summary report of the .prn files created - File Name, starting/ending advice #, etc. This "log" is also sent to the Vendor. If the Vendor has to reprint any advices, they reference the log for a starting/ending file to reprint. What's happening is after the first EE's advice is printed, every EE after that has their current Fed Med/EE deduction amounts in the $millions. And it continues to grow with each subsequent EE. The SQR works fine without the 3rd array. I believe that the 3rd array is somehow being stepped on by something else - another array or something internal unbeknownst to me. The puzzling thing is, this SQR works fine in 7.51. HRMS 8.8 SP1, Tools 8.45 seems to have difficulty with the 3rd array. Is there anything different in release 8 having to do with arrays? If anyone can shed some light on this I would be very appreciative. Thanks in advance, Dave David L. Wright, II SAIC - Sr. Technical Consultant, PeopleSoft E-mail: david.l.wright.ii@saic.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 21 16:01:40 2005 From: Bob Stone Subject: RE: [sqr-users] DDP003.SQR with 3rd Array Date: Tue, 21 Jun 2005 16:00:29 -0500 Is there a chance that the variables you're using to insert into the array are never reinitialized to 0? What I mean is that they could be growing and growing each time you put and get. SQR's infamous for it's varaibles not being 0 when you come back into a procedure...try reiniting them to 0, selecting the data, then putting them to the array. (or whatever steps you do before putting them in the array) bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Ramzi_Salameh@daveandbusters.com Sent: Tuesday, June 21, 2005 3:52 PM To: This list is for discussion about the SQR database reporting language from Hyperion Solutions. Subject: Re: [sqr-users] DDP003.SQR with 3rd Array Other than the fact that PeopleSoft purchased and made their own version of SQR in tools 8, we've not encountered any issues with arrays. We're on Tools 8.16 and 8.45. ----------------------------------------------------- Ramzi Salameh Senior Technical Analyst (214) 904-2550 Dave and Buster's, Inc. ----------------------------------------------------- "Wright, David L. II" Sent by: sqr-users-bounces+ramzi_salameh=daveandbusters.com@sqrug.org 06/21/2005 10:43 AM Please respond to "This list is for discussion about the SQR database reporting language from Hyperion Solutions." To: 'SQR Users Group' cc: Subject: [sqr-users] DDP003.SQR with 3rd Array Greetings, I've got an issue that has PeopleSoft stumped. So, I thought I'd ask the SQR experts - you. We added a 3rd array to DDP003.SQR to collect "begin/end" information on multiple .prn output files. The .prn files are the advices themselves that we FTP to a Vendor who prints the advices. The array is then referenced at eoj time to create a summary report of the .prn files created - File Name, starting/ending advice #, etc. This "log" is also sent to the Vendor. If the Vendor has to reprint any advices, they reference the log for a starting/ending file to reprint. What's happening is after the first EE's advice is printed, every EE after that has their current Fed Med/EE deduction amounts in the $millions. And it continues to grow with each subsequent EE. The SQR works fine without the 3rd array. I believe that the 3rd array is somehow being stepped on by something else - another array or something internal unbeknownst to me. The puzzling thing is, this SQR works fine in 7.51. HRMS 8.8 SP1, Tools 8.45 seems to have difficulty with the 3rd array. Is there anything different in release 8 having to do with arrays? If anyone can shed some light on this I would be very appreciative. Thanks in advance, Dave David L. Wright, II SAIC - Sr. Technical Consultant, PeopleSoft E-mail: david.l.wright.ii@saic.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 10:04:41 2005 From: "Robert Stojkovic" Subject: RE: [sqr-users] SQR using trees Date: Wed, 22 Jun 2005 08:03:19 -0700 Yes you can use the logic there to pull only the departments from the CBNA_F node. First you need to find the Tree Node Number and Tree Node Num end for the CBNA_F node {DEPTTREE} = FUNCTIONAL_ROLLUP Begin-Select BN.TREE_NODE_NUM BN.TREE_NODE_NUM_END LET #START_TREE_NODE_NUM = &BN.TREE_NODE_NUM LET #END_TREE_NODE_NUM = &BN.TREE_NODE_NUM_END FROM PSTREEDEFN AN, PSTREENODE BN WHERE AN.EFFDT = (SELECT MAX(A_ED.EFFDT) FROM PSTREEDEFN A_ED WHERE AN.SETID = A_ED.SETID AND AN.TREE_NAME = A_ED.TREE_NAME AND A_ED.EFFDT <= SYSDATE) AND AN.SETID = BN.SETID AND AN.TREE_NAME = BN.TREE_NAME AND BN.EFFDT = (SELECT MAX(B_ED.EFFDT) FROM PSTREENODE B_ED WHERE BN.SETID = B_ED.SETID AND BN.TREE_NAME = B_ED.TREE_NAME AND B_ED.EFFDT <= AN.EFFDT) AND AN.TREE_NAME = {DEPTTREE} AND AN.SETID = 'XXXX' AND BN.TREE_NODE = 'CBNA_F' End-Select Then uses these numbers you can get the Departments that are in the tree that roll up Begin-Select D.DEPTID #DEBUGD Show ' DEBUG: &D.DEPTID --|' &D.DEPTID '|--' LET $DEPTID_DATA = &D.DEPTID do GET-CHARTFIELDS If #Actuals_total <> 0 or #Encumbrance_total <> 0 or #PreEncumbrance_total <> 0 or #REV_total <> 0 or #Budget_total <> 0 Graphic (0,1,156) Horz-Line 5 DO GET-DEPT-DESCR DO PRINT-DEPT_SUBTOTAL END-IF FROM PSTREEDEFN A, PSTREENODE B, PSTREELEAF C, PS_DEPT_TBL D WHERE A.EFFDT = (SELECT MAX(A_ED.EFFDT) FROM PSTREEDEFN A_ED WHERE A.SETID = A_ED.SETID AND A.TREE_NAME = A_ED.TREE_NAME AND A_ED.EFFDT <= SYSDATE) AND A.SETID = B.SETID AND A.TREE_NAME = B.TREE_NAME AND B.EFFDT = (SELECT MAX(B_ED.EFFDT) FROM PSTREENODE B_ED WHERE B.SETID = B_ED.SETID AND B.TREE_NAME = B_ED.TREE_NAME AND B_ED.EFFDT <= A.EFFDT) AND B.SETID = C.SETID AND B.TREE_NAME = C.TREE_NAME AND B.TREE_BRANCH = C.TREE_BRANCH AND B.TREE_NODE_NUM = C.TREE_NODE_NUM AND C.EFFDT = (SELECT MAX(C_ED.EFFDT) FROM PSTREELEAF C_ED WHERE C.SETID = C_ED.SETID AND C.TREE_NAME = C_ED.TREE_NAME AND C_ED.EFFDT <= B.EFFDT) AND A.TREE_NAME = {DEPTTREE} AND A.SETID = 'XXXX' AND C.SETID = D.SETID AND D.EFFDT = (SELECT MAX(D_ED.EFFDT) FROM PS_DEPT_TBL D_ED WHERE D.SETID = D_ED.SETID AND D.DEPTID = D_ED.DEPTID AND D_ED.EFFDT <= C.EFFDT) AND D.DEPTID >= C.RANGE_FROM AND D.DEPTID <= C.RANGE_TO AND B.TREE_NODE_NUM BETWEEN #START_TREE_NODE_NUM AND #END_TREE_NODE_NUM ORDER BY D.DEPTID End-Select Trees can be powerful tools to help getting data organized in an SQR Robert Stojkovic robert.stojkovic@io-consulting .com visit our website www.io-consulting.com Providing Rocking Innovative Collaboration Every Day -----Original Message----- From: sqr-users-bounces+robert.stojkovic=io-consulting.com@sqrug.org [mailto:sqr-users-bounces+robert.stojkovic=io-consulting.com@sqrug.org] On Behalf Of Knapp, Richard Sent: Monday, June 20, 2005 12:46 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: [WARN] IOSPML RE: [sqr-users] SQR using trees The short answer is no. At least that is what I discovered some years ago when I attempted a similar SQR. Could be there are some more clever folks around these days, who knows? If the tree structure is still contained in the node and leaf tables, seems to me you are going to have to use them. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of Raghvendra Dharwada Sent: Monday, June 20, 2005 2:35 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR using trees Hi, I am trying to develop a query (probably an SQR) that should list all departments that roll up to 'CBNA_F' (Node) in the FUNCTIONAL_ROLLUP tree. We need the department number, description, business line and region I am working on PS Financials8.8 and Oracle9i There is an exisiting SQR that loads the data of FUNCTIONAL_ROLLUP tree in addition to 2 more trees(I am unconcerened with the other 2 trees), into a table called ps_tree_dept_tbl by joining the following tables: ps_dept_tbl, pstreenode , pstreeleaf ans ps_tree_node_tbl The flow of the SQR is as follows: Select all the depts from PS_DEPT_TBL DEPT where DEPT.eff_status = 'A' and DEPT.effdt = SELECT MAX(EFFDT) FROM PS_DEPT_TBL WHERE DEPT.SETID = SETID AND DEPT.DEPTID = DEPTID AND EFFDT <= SYSDATE) For each department get the leaf.tree_node_num from pstreeleaf leaf where where LEAF.setid = $dept_setid and LEAF.tree_name = $tree_name and $deptid between LEAF.range_from and LEAF.range_to and LEAF.effdt = (SELECT MAX(EFFDT) FROM PSTREELEAF WHERE LEAF.SETID = SETID AND LEAF.TREE_NAME = TREE_NAME AND EFFDT <= SYSDATE) For each leaf.tree_node_num get node.tree_node, node.tree_level_num from pstreenode node where NODE.setid = $dept_setid and NODE.tree_name = $tree_name !FUNCTIONAL_ROLLUP and NODE.tree_node_num = leaf.tree_node_num !ofcourse a variable is used here and NODE.effdt = (SELECT MAX(EFFDT) FROM PSTREENODE WHERE NODE.SETID = SETID AND NODE.TREE_NAME = TREE_NAME AND EFFDT <= SYSDATE) For each node.tree_node_num get the descr from ps_tree_node_tbl from PS_TREE_NODE_TBL DES where DES.setid = $dept_setid and DES.tree_node = $treenode ! node.tree_node_num and DES.effdt = (SELECT MAX(EFFDT) FROM PS_TREE_NODE_TBL WHERE DES.SETID = SETID AND DES.TREE_NODE = TREE_NODE AND EFFDT <= SYSDATE) Now , my question is , is there any way that I can get only those departments that will rollup only to the CBNA_F node in the FUNCTIONAL_ROLLUP tree by either cloning tbis SQR or using this SQR as a termplate? I tried some SQLs using pstreenode and pstreeleaf but . I am unable to figure out how I can grab the required only as per the requirement Please let me know if anyone can suggest me regarding this issue.I appreciate your help. Thanks in advance Raghav _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 12:21:14 2005 From: "radhika reddy" Date: Wed, 22 Jun 2005 12:20:12 -0500 Subject: [sqr-users] Report Layout Hi, I have to print a report which does not fit in 8x11 size. Can that be printed if it's landscape? i am not sure exactly what it does. i have an SQC - ptpsl177.sqc. Can i use this sqc to print the output. Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 12:27:29 2005 Date: Wed, 22 Jun 2005 13:25:49 -0400 From: "Prasanna Menta" Subject: Re: [sqr-users] Report Layout Yes - if not use setup32.sqc radhika reddy wrote: > > Hi, > > I have to print a report which does not fit in 8x11 size. Can that be > printed if it's landscape? i am not sure exactly what it does. i have an SQC > - ptpsl177.sqc. Can i use this sqc to print the output. > > Thanks. > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today - it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 14:39:09 2005 Date: Wed, 22 Jun 2005 12:38:02 -0700 (PDT) From: Jinesh Shah Subject: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi All, Any one could help me to create a SQR report, which will generate a report with the data to be exported in the Excel sheet. Here I could able to Create Excel sheet by using , OPEN , CLOSE and WRITE function of SQR Language. But could not able to write differen fields value in separate cells in the excel sheet. Is there any delimiter, I need to used beetween two values ? Following Code I have used in my SQR : ***************************************** BEGIN-PROCEDURE CREATE_EXCEL OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing record=1000:vary status=#filestat IF #filestat != 0 PRINT 'Unable to Create EQUIP_LIST.xls file on C:\' (+1,1) END-IF END-PROCEDURE ***************************************** BEGIN-SELECT eqnum &eqnum description &description PRINT &eqnum (+1, {Col1}) PRINT &description ( , {Col2}) LET $eqnum = &eqnum LET $desc = &description LET $s = $eqnum || ';' ||$desc !WRITE 1 FROM $eqnum $desc WRITE 1 FROM $s LET #rows_selected = #rows_selected + 1 from [$schema]equipment where [$where] and rownum < 100 order by 1 END-SELECT ******************************************* Thanks in advance. Regards Jinesh Shah ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 14:50:56 2005 From: Bob Stone Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Date: Wed, 22 Jun 2005 14:49:44 -0500 I find the easiest thing to do is pretend it's a tab delimited text file that just happens to have a '.xls' at the end. it will open it up, see the tabs, and assume those are cell spacings. So, TAB ...like this: encode <009> into $tab let $s = $eqnum || $tab || $desc write 1 from $s There's a lot you can do with Excel reports as far as formatting goes...but your best bet on all of that is to look in the SQR-User guide archive pages. http://www.sqrug.org/sqr-users/ There's been numerous discussions about it. Bob -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Jinesh Shah Sent: Wednesday, June 22, 2005 2:38 PM To: sqr-users@sqrug.org Subject: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi All, Any one could help me to create a SQR report, which will generate a report with the data to be exported in the Excel sheet. Here I could able to Create Excel sheet by using , OPEN , CLOSE and WRITE function of SQR Language. But could not able to write differen fields value in separate cells in the excel sheet. Is there any delimiter, I need to used beetween two values ? Following Code I have used in my SQR : ***************************************** BEGIN-PROCEDURE CREATE_EXCEL OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing record=1000:vary status=#filestat IF #filestat != 0 PRINT 'Unable to Create EQUIP_LIST.xls file on C:\' (+1,1) END-IF END-PROCEDURE ***************************************** BEGIN-SELECT eqnum &eqnum description &description PRINT &eqnum (+1, {Col1}) PRINT &description ( , {Col2}) LET $eqnum = &eqnum LET $desc = &description LET $s = $eqnum || ';' ||$desc !WRITE 1 FROM $eqnum $desc WRITE 1 FROM $s LET #rows_selected = #rows_selected + 1 from [$schema]equipment where [$where] and rownum < 100 order by 1 END-SELECT ******************************************* Thanks in advance. Regards Jinesh Shah ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 15:00:21 2005 From: James Womeldorf Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Date: Wed, 22 Jun 2005 14:59:11 -0500 If you need to create Excel files that contain formatting take a look at this on Ray's site. We've used this code at Fastenal Company for several years to create Excel files. http://www.ontko.com/sqr/sylk.html -----Original Message----- From: sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On Behalf Of Jinesh Shah Sent: Wednesday, June 22, 2005 2:38 PM To: sqr-users@sqrug.org Subject: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi All, Any one could help me to create a SQR report, which will generate a report with the data to be exported in the Excel sheet. Here I could able to Create Excel sheet by using , OPEN , CLOSE and WRITE function of SQR Language. But could not able to write differen fields value in separate cells in the excel sheet. Is there any delimiter, I need to used beetween two values ? Following Code I have used in my SQR : ***************************************** BEGIN-PROCEDURE CREATE_EXCEL OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing record=1000:vary status=#filestat IF #filestat != 0 PRINT 'Unable to Create EQUIP_LIST.xls file on C:\' (+1,1) END-IF END-PROCEDURE ***************************************** BEGIN-SELECT eqnum &eqnum description &description PRINT &eqnum (+1, {Col1}) PRINT &description ( , {Col2}) LET $eqnum = &eqnum LET $desc = &description LET $s = $eqnum || ';' ||$desc !WRITE 1 FROM $eqnum $desc WRITE 1 FROM $s LET #rows_selected = #rows_selected + 1 from [$schema]equipment where [$where] and rownum < 100 order by 1 END-SELECT ******************************************* Thanks in advance. Regards Jinesh Shah ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 22 15:07:00 2005 Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem inpopulating data in different Cells Date: Wed, 22 Jun 2005 14:05:53 -0600 From: "Lance Munger" First declare the file name in your begin-program. let $file_name =3D 'FareBasisSumm.xls' open $file_name as 1 for-writing record=3D3000:vary status=3D#file_status_out encode '<009>' into $delimiter and then in your print detail string it together and write out the records as you print.=20 ! excel output begin string $curr_cust_name &passenger_name &ticket_num &invoice_num $issue_date $departure_date $adv_purch_days &validating_airline &class &trip_routing $ticket_amount $normal_coach_fare $savings $low_fare $Potential_Savings &code_description by $delimiter into $record write 1 from $record ! excel output end Hope this helps! Lance D. Munger RF4 Developer 303.925.3120 office 720.364.4721 mobile -----Original Message----- From: sqr-users-bounces+lance.munger=3Dtq3navigant.com@sqrug.org [mailto:sqr-users-bounces+lance.munger=3Dtq3navigant.com@sqrug.org] On Behalf Of Bob Stone Sent: Wednesday, June 22, 2005 1:50 PM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem inpopulating data in different Cells I find the easiest thing to do is pretend it's a tab delimited text file that just happens to have a '.xls' at the end. it will open it up, see the tabs, and assume those are cell spacings. So, TAB ...like this:=20 encode <009> into $tab let $s =3D $eqnum || $tab || $desc write 1 from $s There's a lot you can do with Excel reports as far as formatting goes...but your best bet on all of that is to look in the SQR-User guide archive pages. http://www.sqrug.org/sqr-users/ There's been numerous discussions about it. Bob -----Original Message----- From: sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=3Dfastenal.com@sqrug.org]On Behalf Of Jinesh Shah Sent: Wednesday, June 22, 2005 2:38 PM To: sqr-users@sqrug.org Subject: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi All, Any one could help me to create a SQR report, which will generate a report with the data to be exported in the Excel sheet.=20 Here I could able to Create Excel sheet by using , OPEN , CLOSE and WRITE function of SQR Language. But could not able to write differen fields value in separate cells in the excel sheet. Is there any delimiter, I need to used beetween two values ? Following Code I have used in my SQR : ***************************************** BEGIN-PROCEDURE CREATE_EXCEL OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing record=3D1000:vary status=3D#filestat IF #filestat !=3D 0=20 PRINT 'Unable to Create EQUIP_LIST.xls file on C:\' (+1,1) =20 END-IF END-PROCEDURE ***************************************** BEGIN-SELECT eqnum &eqnum description &description PRINT &eqnum (+1, {Col1}) PRINT &description ( , {Col2}) LET $eqnum =3D &eqnum LET $desc =3D &description LET $s =3D $eqnum || ';' ||$desc !WRITE 1 FROM $eqnum $desc WRITE 1 FROM $s LET #rows_selected =3D #rows_selected + 1 =09 from [$schema]equipment where [$where] and rownum < 100 order by 1 =09 END-SELECT ******************************************* Thanks in advance. Regards Jinesh Shah =09=09 ____________________________________________________=20 Yahoo! Sports=20 Rekindle the Rivalries. Sign up for Fantasy Football=20 http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 10:18:54 2005 Date: Thu, 23 Jun 2005 08:17:46 -0700 (PDT) From: Jinesh Shah Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi Bob, Thanks a lot for your immediate help and it's works fine. Thank you once again. Regards Jinesh Shah --- Bob Stone wrote: > I find the easiest thing to do is pretend it's a tab > delimited text file > that just happens to have a '.xls' at the end. it > will open it up, see the > tabs, and assume those are cell spacings. So, TAB > ...like this: > > encode <009> into $tab > let $s = $eqnum || $tab || $desc > write 1 from $s > > There's a lot you can do with Excel reports as far > as formatting goes...but > your best bet on all of that is to look in the > SQR-User guide archive pages. > http://www.sqrug.org/sqr-users/ There's been > numerous discussions about it. > > Bob > > > -----Original Message----- > From: > sqr-users-bounces+bstone=fastenal.com@sqrug.org > [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On > Behalf Of > Jinesh Shah > Sent: Wednesday, June 22, 2005 2:38 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Export SQR Report Data to Excel > File - Problem in > populating data in different Cells > > > Hi All, > > Any one could help me to create a SQR report, which > will generate a report with the data to be exported > in > the Excel sheet. > > Here I could able to Create Excel sheet by using , > > OPEN , CLOSE and WRITE function of SQR Language. > But could not able to write differen fields value in > separate cells in the excel sheet. Is there any > delimiter, I need to used beetween two values ? > > Following Code I have used in my SQR : > ***************************************** > BEGIN-PROCEDURE CREATE_EXCEL > > OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing > record=1000:vary status=#filestat > > IF #filestat != 0 > > PRINT 'Unable to Create EQUIP_LIST.xls file on > C:\' (+1,1) > > END-IF > > END-PROCEDURE > > ***************************************** > BEGIN-SELECT > > eqnum &eqnum > description &description > > PRINT &eqnum (+1, {Col1}) > PRINT &description ( , {Col2}) > > LET $eqnum = &eqnum > LET $desc = &description > > LET $s = $eqnum || ';' ||$desc > > !WRITE 1 FROM $eqnum $desc > > WRITE 1 FROM $s > > LET #rows_selected = #rows_selected + 1 > > from [$schema]equipment > where [$where] and rownum < 100 > order by 1 > > END-SELECT > ******************************************* > > Thanks in advance. > > Regards > > Jinesh Shah > > > > > > > > > ____________________________________________________ > > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > > http://football.fantasysports.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 10:22:10 2005 Date: Thu, 23 Jun 2005 08:19:41 -0700 (PDT) From: Jinesh Shah Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem in populating data in different Cells Hi James, Thanks for the information. I have downlaoded this file and will go through it. Regards Jinesh Shah --- James Womeldorf wrote: > If you need to create Excel files that contain > formatting take a look at > this on Ray's site. We've used this code at > Fastenal Company for several > years to create Excel files. > > http://www.ontko.com/sqr/sylk.html > > -----Original Message----- > From: > sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org > [mailto:sqr-users-bounces+jwomeldo=fastenal.com@sqrug.org]On > Behalf Of > Jinesh Shah > Sent: Wednesday, June 22, 2005 2:38 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Export SQR Report Data to Excel > File - Problem in > populating data in different Cells > > > Hi All, > > Any one could help me to create a SQR report, which > will generate a report with the data to be exported > in > the Excel sheet. > > Here I could able to Create Excel sheet by using , > > OPEN , CLOSE and WRITE function of SQR Language. > But could not able to write differen fields value in > separate cells in the excel sheet. Is there any > delimiter, I need to used beetween two values ? > > Following Code I have used in my SQR : > ***************************************** > BEGIN-PROCEDURE CREATE_EXCEL > > OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing > record=1000:vary status=#filestat > > IF #filestat != 0 > > PRINT 'Unable to Create EQUIP_LIST.xls file on > C:\' (+1,1) > > END-IF > > END-PROCEDURE > > ***************************************** > BEGIN-SELECT > > eqnum &eqnum > description &description > > PRINT &eqnum (+1, {Col1}) > PRINT &description ( , {Col2}) > > LET $eqnum = &eqnum > LET $desc = &description > > LET $s = $eqnum || ';' ||$desc > > !WRITE 1 FROM $eqnum $desc > > WRITE 1 FROM $s > > LET #rows_selected = #rows_selected + 1 > > from [$schema]equipment > where [$where] and rownum < 100 > order by 1 > > END-SELECT > ******************************************* > > Thanks in advance. > > Regards > > Jinesh Shah > > > > > > > > > ____________________________________________________ > > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > > http://football.fantasysports.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 10:25:26 2005 Date: Thu, 23 Jun 2005 08:21:56 -0700 (PDT) From: Jinesh Shah Subject: RE: [sqr-users] Export SQR Report Data to Excel File - Problem inpopulating data in different Cells Hi Lance, Thanks for the details. It's working fine now. Regards Jinesh Shah --- Lance Munger wrote: > First declare the file name in your begin-program. > > let $file_name = 'FareBasisSumm.xls' > open $file_name as 1 for-writing record=3000:vary > status=#file_status_out > encode '<009>' into $delimiter > > and then in your print detail string it together and > write out the > records as you print. > > ! excel output begin > string $curr_cust_name &passenger_name &ticket_num > &invoice_num > $issue_date $departure_date $adv_purch_days > &validating_airline > &class &trip_routing $ticket_amount > $normal_coach_fare $savings > $low_fare $Potential_Savings &code_description > by $delimiter into $record > write 1 from $record > ! excel output end > > Hope this helps! > > Lance D. Munger > RF4 Developer > 303.925.3120 office > 720.364.4721 mobile > > -----Original Message----- > From: > sqr-users-bounces+lance.munger=tq3navigant.com@sqrug.org > [mailto:sqr-users-bounces+lance.munger=tq3navigant.com@sqrug.org] > On > Behalf Of Bob Stone > Sent: Wednesday, June 22, 2005 1:50 PM > To: 'This list is for discussion about the SQR > database reporting > languagefrom Hyperion Solutions.' > Subject: RE: [sqr-users] Export SQR Report Data to > Excel File - Problem > inpopulating data in different Cells > > I find the easiest thing to do is pretend it's a tab > delimited text file > that just happens to have a '.xls' at the end. it > will open it up, see > the > tabs, and assume those are cell spacings. So, TAB > ...like this: > > encode <009> into $tab > let $s = $eqnum || $tab || $desc > write 1 from $s > > There's a lot you can do with Excel reports as far > as formatting > goes...but > your best bet on all of that is to look in the > SQR-User guide archive > pages. > http://www.sqrug.org/sqr-users/ There's been > numerous discussions about > it. > > Bob > > > -----Original Message----- > From: > sqr-users-bounces+bstone=fastenal.com@sqrug.org > [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On > Behalf Of > Jinesh Shah > Sent: Wednesday, June 22, 2005 2:38 PM > To: sqr-users@sqrug.org > Subject: [sqr-users] Export SQR Report Data to Excel > File - Problem in > populating data in different Cells > > > Hi All, > > Any one could help me to create a SQR report, which > will generate a report with the data to be exported > in > the Excel sheet. > > Here I could able to Create Excel sheet by using , > > OPEN , CLOSE and WRITE function of SQR Language. > But could not able to write differen fields value in > separate cells in the excel sheet. Is there any > delimiter, I need to used beetween two values ? > > Following Code I have used in my SQR : > ***************************************** > BEGIN-PROCEDURE CREATE_EXCEL > > OPEN 'C:\EQUIP_LIST.xls' as 1 for-writing > record=1000:vary status=#filestat > > IF #filestat != 0 > > PRINT 'Unable to Create EQUIP_LIST.xls file on > C:\' (+1,1) > > END-IF > > END-PROCEDURE > > ***************************************** > BEGIN-SELECT > > eqnum &eqnum > description &description > > PRINT &eqnum (+1, {Col1}) > PRINT &description ( , {Col2}) > > LET $eqnum = &eqnum > LET $desc = &description > > LET $s = $eqnum || ';' ||$desc > > !WRITE 1 FROM $eqnum $desc > > WRITE 1 FROM $s > > LET #rows_selected = #rows_selected + 1 > > from [$schema]equipment > where [$where] and rownum < 100 > order by 1 > > END-SELECT > ******************************************* > > Thanks in advance. > > Regards > > Jinesh Shah > > > > > > > > > ____________________________________________________ > > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > > http://football.fantasysports.yahoo.com > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 12:44:53 2005 Date: Thu, 23 Jun 2005 12:43:47 -0500 From: "Wood, Jason" Subject: [sqr-users] How to email lis/pdf output file from SQR executed in PeopleSoft on UNIX Is there a way to email the output file from an SQR executed in PeopleSoft? I've used the "call system" command and "mailx -s" command to successfully email an existing file on UNIX, but I can't email the output file of the SQR program since it does not exist at the time I execute the mailx -s command. Any ideas?=20 =20 Thanks, Jason =20 Jason C. Wood PeopleSoft Sr. Systems Analyst RGA Reinsurance Group of America Phone: (636) 736-8104 Fax: (636) 736-8504 jwood@rgare.com =20 =20 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 13:10:49 2005 From: Bob Stone Subject: RE: [sqr-users] How to email lis/pdf output file from SQR execute d in PeopleSoft on UNIX Date: Thu, 23 Jun 2005 13:09:39 -0500 uh...create the file first and then email? I've created a file and sent it, but instead of using the print commands I would use open/write/close commands for the file. Then I could close it off and email it before the end of the program. Otherwise, you could create another SQR that runs right after it that just emails the outputted file after successful completion of the first...make some sort of PS job that puts the 2 together. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Wood, Jason Sent: Thursday, June 23, 2005 12:44 PM To: sqr-users@sqrug.org Subject: [sqr-users] How to email lis/pdf output file from SQR executed in PeopleSoft on UNIX Is there a way to email the output file from an SQR executed in PeopleSoft? I've used the "call system" command and "mailx -s" command to successfully email an existing file on UNIX, but I can't email the output file of the SQR program since it does not exist at the time I execute the mailx -s command. Any ideas? Thanks, Jason Jason C. Wood PeopleSoft Sr. Systems Analyst RGA Reinsurance Group of America Phone: (636) 736-8104 Fax: (636) 736-8504 jwood@rgare.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 13:25:56 2005 Subject: Re: [sqr-users] How to email lis/pdf output file from SQR executed in PeopleSoft on UNIX From: Olga.Gal@bbh.com Date: Thu, 23 Jun 2005 14:24:24 -0400 Try to do NEW-REPORT dummy-filename before you execute your CALL SYSTEM. NEW-REPORT will close the current report, which is your real output, and open a new (dummy) report file. Then, I think, you can do whatever you want with your output file. Also, if your output is generated from an interim SPF file, you may need to call SQRP command to convert it to your desired output type. Normally SQR does it automatically upon completion. For example for PDF output you do: CALL SYSTEM USING 'sqrp myfile.spf -printer:pd' #status NOWAIT Hope it helps. "Wood, Jason" Sent by: sqr-users-bounces+olga.gal=bbh.com@sqrug.org To 06/23/2005 01:43 PM cc Subject Please respond to [sqr-users] How to email lis/pdf output file from SQR executed in PeopleSoft on UNIX "This list is for discussion about the SQR database reporting language from Hyperion Solutions." Is there a way to email the output file from an SQR executed in PeopleSoft? I've used the "call system" command and "mailx -s" command to successfully email an existing file on UNIX, but I can't email the output file of the SQR program since it does not exist at the time I execute the mailx -s command. Any ideas? Thanks, Jason Jason C. Wood PeopleSoft Sr. Systems Analyst RGA Reinsurance Group of America Phone: (636) 736-8104 Fax: (636) 736-8504 jwood@rgare.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users ----------------------------------------- *************************** IMPORTANT NOTE ***************************** The opinions expressed in this message and/or any attachments are those of the author and not necessarily those of Brown Brothers Harriman & Co., its subsidiaries and affiliates ("BBH"). There is no guarantee that this message is either private or confidential, and it may have been altered by unauthorized sources without your or our knowledge. Nothing in the message is capable or intended to create any legally binding obligations on either party and it is not intended to provide legal advice. BBH accepts no responsibility for loss or damage from its use, including damage from virus. ************************************************************************ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 14:22:25 2005 From: "Anu Bagde" Date: Thu, 23 Jun 2005 19:21:21 +0000 Subject: [sqr-users] Record field names Hello Group, I am looking for an utility, which will read the record name and list the record field names as output fiel in some way (space, comma or tab delimited). Is their some utility available that will do this? Thanks for any answers you have for this. Regards, Anu _________________________________________________________________ Millions of marriage proposals. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your match on BharatMatrimony.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 14:38:45 2005 Date: Thu, 23 Jun 2005 13:37:42 -0600 From: Robert Goshko Subject: Re: [sqr-users] Record field names On 6/23/05, Anu Bagde wrote: >=20 > Hello Group, >=20 >=20 > I am looking for an utility, which will read the record name and list the > record field names as output fiel in some way (space, comma or tab > delimited). Is their some utility available that will do this? >=20 > Thanks for any answers you have for this. I have some SQL on my web site that will decode the record definitions and list all the fields including the ones from the subrecords, these ones are "Oracle centric", I have a DB2 (UDB) version that I need to put up as well. http://www.axis-dev.ca/modules.php?op=3Dmodload&name=3DDownloads&file=3Dind= ex&req=3Dviewsdownload&sid=3D2 --=20 ...Rob -- No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Robert Goshko Registered Linux User #260513 Want a Gmail account, 2+ GB web mail, just ask me. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 14:41:53 2005 Date: Thu, 23 Jun 2005 12:40:20 -0700 (PDT) From: Dattatraya Shetty Subject: Re: [sqr-users] Record field names Anu, If you can give and example that will be great. Datta. --- Anu Bagde wrote: > > Hello Group, > > > I am looking for an utility, which will read the record name and list > the > record field names as output fiel in some way (space, comma or tab > delimited). Is their some utility available that will do this? > > Thanks for any answers you have for this. > > Regards, > Anu > > _________________________________________________________________ > Millions of marriage proposals. > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your > match on > BharatMatrimony.com > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 23 14:52:56 2005 From: Bob Stone Subject: RE: [sqr-users] Record field names Date: Thu, 23 Jun 2005 14:51:53 -0500 I'm not sure what it is across different databases, but in oracle there's a table called USER_TAB_COLUMNS that holds table_name and column_name - begin-select column_name let $output = $output || $tab || &column_name from USER_TAB_COLUMNS where table_name = 'TABLE_XYZ' end-select That's how you'd do that in SQR. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Anu Bagde Sent: Thursday, June 23, 2005 2:21 PM To: sqr-users@sqrug.org Subject: [sqr-users] Record field names Hello Group, I am looking for an utility, which will read the record name and list the record field names as output fiel in some way (space, comma or tab delimited). Is their some utility available that will do this? Thanks for any answers you have for this. Regards, Anu _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 09:31:20 2005 From: "radhika reddy" Date: Fri, 24 Jun 2005 09:30:13 -0500 Subject: [sqr-users] Size of flat file Hi, I never thought that there would be difference in specifying the flat file size in first statement and second statement. But I see that the size in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=301:VARY STATUS = #OPEN1 Statement 1: while 1 = 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 09:39:56 2005 Date: Fri, 24 Jun 2005 10:39:06 -0400 From: "Larry Roux" Subject: Re: [sqr-users] Size of flat file If you do a read on the first one it will only read the first 301 characters of the line. The next will load the first 400. Stupid parameter if you ask me (but since it is required...). Larry Roux Syracuse University lroux@syr.edu >>> radhika_05@hotmail.com 06/24/05 10:30 AM >>> Hi, I never thought that there would be difference in specifying the flat file size in first statement and second statement. But I see that the size in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=301:VARY STATUS = #OPEN1 Statement 1: while 1 = 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 09:42:58 2005 Subject: RE: [sqr-users] Size of flat file Date: Fri, 24 Jun 2005 09:41:43 -0500 From: "Knapp, Richard" 99 Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of radhika reddy Sent: Friday, June 24, 2005 9:30 AM To: sqr-users@sqrug.org Subject: [sqr-users] Size of flat file Hi, I never thought that there would be difference in specifying the flat file size in first statement and second statement. But I see that the size=20 in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=3D301:VARY STATUS =3D #OPEN1 Statement 1: while 1 =3D 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!=20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 09:48:11 2005 Date: Fri, 24 Jun 2005 10:47:17 -0400 From: "Larry Roux" Subject: RE: [sqr-users] Size of flat file Larry Roux Syracuse University lroux@syr.edu >>> KnappR@umsystem.edu 06/24/05 10:41 AM >>> 99 Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of radhika reddy Sent: Friday, June 24, 2005 9:30 AM To: sqr-users@sqrug.org Subject: [sqr-users] Size of flat file Hi, I never thought that there would be difference in specifying the flat file size in first statement and second statement. But I see that the size in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=301:VARY STATUS = #OPEN1 Statement 1: while 1 = 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 11:41:10 2005 Date: Fri, 24 Jun 2005 13:40:37 -0300 From: "PeterG Clark" Subject: Re: [sqr-users] Size of flat file In this particular case, there will be no effect upon your program, however= it it had been the reverse (400 on the Open and 301 on the Read) you would= have encountered some truncation. I believe that the length specified on the open is used on some platforms b= y the O/S to validate that the (maximum) length specified matches the entry= in the file header (on an open for read) or to establish the file header o= n the media for an open for write. The length specifies how much of the record in the buffer will be moved to = the specified variable. So, if the open had specified 400 but your read onl= y 301, up to 99 bytes at the end of your record would be truncated as it wa= s moved into $record. In some instances this may be exactly what you want t= o do if you had a huge record but were only interesting in looking at the f= irst few fields. >>> radhika_05@hotmail.com 2005/06/24 11:30:13 >>> Hi, I never thought that there would be difference in specifying the flat=20 file size in first statement and second statement. But I see that the size= =20 in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=3D301:VARY STATUS =3D #OPEN1 Statement 1: while 1 =3D 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!= =20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 12:05:22 2005 Date: Fri, 24 Jun 2005 13:04:49 -0400 From: Gina Bencke Subject: RE: [sqr-users] Size of flat file Thank you gentlemen for the humor. Just in case one is actually looking for a technical answer, the size specified on the open for-reading statement is the number of bytes or characters returned with each read. If I remember correctly, a read will fail if the record length specified on the open is smaller than the record you are reading. If on the other hand the size of the record specified on the read is smaller than the actual record size, SQR will simply truncate the record and return the first n bytes or characters. Cheers, Gina Bencke Business Analyst Information Services & Technology Cleveland State University Phone: (216) 875-9630 Fax: (216) 687-9200 -----Original Message----- From: sqr-users-bounces+gina.work=bencke.com@sqrug.org [mailto:sqr-users-bounces+gina.work=bencke.com@sqrug.org] On Behalf Of Larry Roux Sent: Friday, June 24, 2005 10:47 AM To: sqr-users@sqrug.org Subject: RE: [sqr-users] Size of flat file Larry Roux Syracuse University lroux@syr.edu >>> KnappR@umsystem.edu 06/24/05 10:41 AM >>> 99 Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of radhika reddy Sent: Friday, June 24, 2005 9:30 AM To: sqr-users@sqrug.org Subject: [sqr-users] Size of flat file Hi, I never thought that there would be difference in specifying the flat file size in first statement and second statement. But I see that the size in first statement is 301 and in second it is 400. what is the difference? Statement 1: OPEN $filename1 AS 10 FOR-READING RECORD=301:VARY STATUS = #OPEN1 Statement 1: while 1 = 1 read 10 into $record:400 Thanks _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 14:25:56 2005 From: "radhika reddy" Subject: Re: [sqr-users] Size of flat file Date: Fri, 24 Jun 2005 14:24:50 -0500 But when i read some documentation about Open, it says that when it is Vary(which is default), it is max size of the record allowed and used mainly if records are of different sizes(here it is 301). I am assuming that Read should have been less than 301 as that is the max size allowed. though i have header in my flat file i am assuming that we are not concerned about the size of the header. Is my assumption correct? Thanks. >From: "PeterG Clark" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: >Subject: Re: [sqr-users] Size of flat file >Date: Fri, 24 Jun 2005 13:40:37 -0300 > >In this particular case, there will be no effect upon your program, however >it it had been the reverse (400 on the Open and 301 on the Read) you would >have encountered some truncation. > >I believe that the length specified on the open is used on some platforms >by the O/S to validate that the (maximum) length specified matches the >entry in the file header (on an open for read) or to establish the file >header on the media for an open for write. > >The length specifies how much of the record in the buffer will be moved to >the specified variable. So, if the open had specified 400 but your read >only 301, up to 99 bytes at the end of your record would be truncated as it >was moved into $record. In some instances this may be exactly what you want >to do if you had a huge record but were only interesting in looking at the >first few fields. > > > >>> radhika_05@hotmail.com 2005/06/24 11:30:13 >>> >Hi, > > I never thought that there would be difference in specifying the flat >file size in first statement and second statement. But I see that the size >in first statement is 301 and in second it is 400. what is the difference? > > >Statement 1: OPEN $filename1 AS 10 > FOR-READING > RECORD=301:VARY > STATUS = #OPEN1 > >Statement 1: while 1 = 1 > read 10 into $record:400 > >Thanks > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 15:32:30 2005 Date: Fri, 24 Jun 2005 13:31:25 -0700 (PDT) From: Jeet Subject: [sqr-users] Writing to a file problem Hi All, I have opened a file for writing in a SQR program. After I am done writing in to the file using WRITE command, I close the file. It always creates a new blank line at the end of file from nowhere. So when I am reading the file in another software, there is always an extra line in the end containing nothing. And I have to delete it manually every time. Can anybody help me, so that I can avoid the extra line in the end of the output file? Thanks a lot in advance! - Jeet. -------------------------------------------------------------------- Jitendra Hansraj Patel, 100 Western Ave, Apt# Q6, Kalamazoo, MI 49008. Phone => Office : 616-387-3997; Home : 616-387-5983 Email : jhpatel@cs.wmich.edu -------------------------------------------------------------------- __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 15:37:50 2005 Date: Fri, 24 Jun 2005 13:36:45 -0700 From: Raghvendra Dharwada Subject: [sqr-users] SQR to Excel - error in opening the output file. Hi, I have a custom sqc (MM_EXCEL.sqc) which has several functions for=20 outputting data from SQR to excel. I am using this SQC in my SQR to print= =20 the output to excel.The excel file is created successfully and also I get= =20 the correct output too in the required format.But then, when I try to open= =20 this excel file I get errors displayed on the Message box saying: 1st Message box: Cannot read record 7199. Continue reporting each error? And when I click 'No' I get the following on the 2nd Message Box: Microsoft Office Excel cannot convert some of the cells. The total number of errors found is 1 One of my colleague suggested me to check the cell widths and the numeric= =20 formats of the cells I am going to print. I verified them too, but still I= =20 cannot get rid of the error. Since this is not a general case, I know, it is hard for someone to provide= =20 a solution, but my hope is that if anyone happened to get similar errors,= =20 please let me know how you rectified it. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 15:44:23 2005 From: Bob Stone Subject: RE: [sqr-users] SQR to Excel - error in opening the output file. Date: Fri, 24 Jun 2005 15:43:15 -0500 That means the excel file was not closed off correctly, and it expects to find whatever EOF character(s) at the end... Check your logic on closing the file. (different than just open/write/close sometimes...depending on how complicated your excel printing is). -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Raghvendra Dharwada Sent: Friday, June 24, 2005 3:37 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR to Excel - error in opening the output file. Hi, I have a custom sqc (MM_EXCEL.sqc) which has several functions for outputting data from SQR to excel. I am using this SQC in my SQR to print the output to excel.The excel file is created successfully and also I get the correct output too in the required format.But then, when I try to open this excel file I get errors displayed on the Message box saying: 1st Message box: Cannot read record 7199. Continue reporting each error? And when I click 'No' I get the following on the 2nd Message Box: Microsoft Office Excel cannot convert some of the cells. The total number of errors found is 1 One of my colleague suggested me to check the cell widths and the numeric formats of the cells I am going to print. I verified them too, but still I cannot get rid of the error. Since this is not a general case, I know, it is hard for someone to provide a solution, but my hope is that if anyone happened to get similar errors, please let me know how you rectified it. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Fri Jun 24 16:28:27 2005 From: James Womeldorf Subject: RE: [sqr-users] SQR to Excel - error in opening the output file. Date: Fri, 24 Jun 2005 16:27:21 -0500 Does your sqc produce files in the SYLK format? If so. the last line of the file must consist of an uppercase E. -----Original Message----- From: Bob Stone Sent: Friday, June 24, 2005 3:43 PM To: 'This list is for discussion about the SQR database reporting language from Hyperion Solutions.' Subject: RE: [sqr-users] SQR to Excel - error in opening the output file. That means the excel file was not closed off correctly, and it expects to find whatever EOF character(s) at the end... Check your logic on closing the file. (different than just open/write/close sometimes...depending on how complicated your excel printing is). -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Raghvendra Dharwada Sent: Friday, June 24, 2005 3:37 PM To: sqr-users@sqrug.org Subject: [sqr-users] SQR to Excel - error in opening the output file. Hi, I have a custom sqc (MM_EXCEL.sqc) which has several functions for outputting data from SQR to excel. I am using this SQC in my SQR to print the output to excel.The excel file is created successfully and also I get the correct output too in the required format.But then, when I try to open this excel file I get errors displayed on the Message box saying: 1st Message box: Cannot read record 7199. Continue reporting each error? And when I click 'No' I get the following on the 2nd Message Box: Microsoft Office Excel cannot convert some of the cells. The total number of errors found is 1 One of my colleague suggested me to check the cell widths and the numeric formats of the cells I am going to print. I verified them too, but still I cannot get rid of the error. Since this is not a general case, I know, it is hard for someone to provide a solution, but my hope is that if anyone happened to get similar errors, please let me know how you rectified it. Thanks. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 27 05:01:54 2005 Date: Mon, 27 Jun 2005 07:00:32 -0300 From: "PeterG Clark" Subject: Re: [sqr-users] Size of flat file Yes, that is correct ... in the open, it is the size of the largest record = in a variable length record file. The size in the Read does not matter as l= ong as it is equal to or greater than the size specified in the Open (if it= is less, you will encounter some truncation of the record as it is moved f= rom the I/O buffer).=20 It is not the size of the header itself that I was referring to, but the sp= ecification of the maximum length of the records in a variable length file = (or record size if a fixed record length file). Some operating systems will= validate the record size specification contained in the file header agains= t the record size specified in the Open statement. >>> radhika_05@hotmail.com 2005/06/24 16:24:50 >>> But when i read some documentation about Open, it says that when it is=20 Vary(which is default), it is max size of the record allowed and used mainl= y=20 if records are of different sizes(here it is 301). I am assuming that Read should have been less than 301 as that is the max= =20 size allowed. though i have header in my flat file i am assuming that we are not concerne= d=20 about the size of the header. Is my assumption correct? Thanks. >From: "PeterG Clark" >Reply-To: "This list is for discussion about the SQR database=20 >reportinglanguage from Hyperion Solutions." >To: >Subject: Re: [sqr-users] Size of flat file >Date: Fri, 24 Jun 2005 13:40:37 -0300 > >In this particular case, there will be no effect upon your program, howeve= r=20 >it it had been the reverse (400 on the Open and 301 on the Read) you would= =20 >have encountered some truncation. > >I believe that the length specified on the open is used on some platforms= =20 >by the O/S to validate that the (maximum) length specified matches the=20 >entry in the file header (on an open for read) or to establish the file=20 >header on the media for an open for write. > >The length specifies how much of the record in the buffer will be moved to= =20 >the specified variable. So, if the open had specified 400 but your read=20 >only 301, up to 99 bytes at the end of your record would be truncated as i= t=20 >was moved into $record. In some instances this may be exactly what you wan= t=20 >to do if you had a huge record but were only interesting in looking at the= =20 >first few fields. > > > >>> radhika_05@hotmail.com 2005/06/24 11:30:13 >>> >Hi, > > I never thought that there would be difference in specifying the flat >file size in first statement and second statement. But I see that the size >in first statement is 301 and in second it is 400. what is the difference? > > >Statement 1: OPEN $filename1 AS 10 > FOR-READING > RECORD=3D301:VARY > STATUS =3D #OPEN1 > >Statement 1: while 1 =3D 1 > read 10 into $record:400 > >Thanks > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today - it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/=20 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org=20 >http://www.sqrug.org/mailman/listinfo/sqr-users=20 > > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org=20 >http://www.sqrug.org/mailman/listinfo/sqr-users=20 _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE!= =20 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/=20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org=20 http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 27 10:47:13 2005 From: "Anu Bagde" Subject: Re: [sqr-users] Record field names Date: Mon, 27 Jun 2005 15:46:35 +0000 Dattatraya, Example would be be ADDRESSES tables has various fields which I do not know about. After running the utility (may be record name can be entered as a input), I should get output file as: address1, address2, address3, city, state, zip, country I hope this helps. Thanks for all your help. Regards, Anu >From: Dattatraya Shetty >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reporting >languagefrom Hyperion Solutions." >Subject: Re: [sqr-users] Record field names >Date: Thu, 23 Jun 2005 12:40:20 -0700 (PDT) > >Anu, > If you can give and example that will be great. > >Datta. > > >--- Anu Bagde wrote: > > > > > Hello Group, > > > > > > I am looking for an utility, which will read the record name and list > > the > > record field names as output fiel in some way (space, comma or tab > > delimited). Is their some utility available that will do this? > > > > Thanks for any answers you have for this. > > > > Regards, > > Anu > > > > _________________________________________________________________ > > Millions of marriage proposals. > > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your > > match on > > BharatMatrimony.com > > > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > > > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Adore Arshad Warsi? http://server1.msn.co.in/sp05/iifa/ Think he is the funniest? _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 27 12:30:18 2005 Date: Mon, 27 Jun 2005 14:13:03 -0400 (EDT) Subject: Re: [sqr-users] Record field names From: "Sudeep Vaidya" Anu, I'm not aware of any such utility, but creating one would be an easy job. Just write a small SQR to fetch data from PSRECFIELD and PSRECFIELDDB, and provide the values to the where clause using the Run Control Record. You can then write them on to a File as per your choice... Ofcourse , you would need a Run control record and run control page. should not take more than a couple of hours to create and test ! hope this helps Sudeep > Dattatraya, > > Example would be be ADDRESSES tables has various fields which I do not > know > about. After running the utility (may be record name can be entered as a > input), I should get output file as: > > address1, > address2, > address3, > city, > state, > zip, > country > > I hope this helps. > > Thanks for all your help. > > Regards, > Anu > >>From: Dattatraya Shetty >>Reply-To: "This list is for discussion about the SQR database >>reportinglanguage from Hyperion Solutions." >>To: "This list is for discussion about the SQR database reporting >>languagefrom Hyperion Solutions." >>Subject: Re: [sqr-users] Record field names >>Date: Thu, 23 Jun 2005 12:40:20 -0700 (PDT) >> >>Anu, >> If you can give and example that will be great. >> >>Datta. >> >> >>--- Anu Bagde wrote: >> >> > >> > Hello Group, >> > >> > >> > I am looking for an utility, which will read the record name and list >> > the >> > record field names as output fiel in some way (space, comma or tab >> > delimited). Is their some utility available that will do this? >> > >> > Thanks for any answers you have for this. >> > >> > Regards, >> > Anu >> > >> > _________________________________________________________________ >> > Millions of marriage proposals. >> > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your >> > match on >> > BharatMatrimony.com >> > >> > >> > _______________________________________________ >> > sqr-users mailing list >> > sqr-users@sqrug.org >> > http://www.sqrug.org/mailman/listinfo/sqr-users >> > >> >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam protection around >>http://mail.yahoo.com >> >>_______________________________________________ >>sqr-users mailing list >>sqr-users@sqrug.org >>http://www.sqrug.org/mailman/listinfo/sqr-users > > _________________________________________________________________ > Adore Arshad Warsi? http:/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 27 12:47:40 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] Record field names Date: Mon, 27 Jun 2005 10:47:05 -0700 When you use PSRECFIELD, watch out for subrecords. Anu's example, ADDRESSES, has a subrecord. When you find a subrecord, you have to go back to PSRECFIELD and look up the fields in the subrecord. Also, subrecords can have subrecords, although that is rare. Another possibility is to use the table that your database manager uses. Ask your DBA. -----Original Message----- From: Sudeep Vaidya [mailto:sudeep.vaidya@patni.com] Sent: Monday, June 27, 2005 11:13 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Record field names Anu, I'm not aware of any such utility, but creating one would be an easy job. Just write a small SQR to fetch data from PSRECFIELD and PSRECFIELDDB, and provide the values to the where clause using the Run Control Record. You can then write them on to a File as per your choice... Ofcourse , you would need a Run control record and run control page. should not take more than a couple of hours to create and test ! hope this helps Sudeep > Dattatraya, > > Example would be be ADDRESSES tables has various fields which I do not > know > about. After running the utility (may be record name can be entered as a > input), I should get output file as: > > address1, > address2, > address3, > city, > state, > zip, > country > > I hope this helps. > > Thanks for all your help. > > Regards, > Anu > >>From: Dattatraya Shetty >>Reply-To: "This list is for discussion about the SQR database >>reportinglanguage from Hyperion Solutions." >>To: "This list is for discussion about the SQR database reporting >>languagefrom Hyperion Solutions." >>Subject: Re: [sqr-users] Record field names >>Date: Thu, 23 Jun 2005 12:40:20 -0700 (PDT) >> >>Anu, >> If you can give and example that will be great. >> >>Datta. >> >> >>--- Anu Bagde wrote: >> >> > >> > Hello Group, >> > >> > >> > I am looking for an utility, which will read the record name and list >> > the >> > record field names as output fiel in some way (space, comma or tab >> > delimited). Is their some utility available that will do this? >> > >> > Thanks for any answers you have for this. >> > >> > Regards, >> > Anu >> > >> > _________________________________________________________________ >> > Millions of marriage proposals. >> > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your >> > match on >> > BharatMatrimony.com >> > >> > >> > _______________________________________________ >> > sqr-users mailing list >> > sqr-users@sqrug.org >> > http://www.sqrug.org/mailman/listinfo/sqr-users >> > >> >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam protection around >>http://mail.yahoo.com >> >>_______________________________________________ >>sqr-users mailing list >>sqr-users@sqrug.org >>http://www.sqrug.org/mailman/listinfo/sqr-users > > _________________________________________________________________ > Adore Arshad Warsi? http:/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Mon Jun 27 15:28:27 2005 Date: Mon, 27 Jun 2005 13:27:23 -0700 (PDT) From: Jeet Subject: [sqr-users] Writing flat files Hi All, I was wondering does SQR create an extra line (blank line) in the end, for every flat file we create/write? I am creating a new flat file (using OPEN for writing) and writing lines (using WRITE command) in them. After I am done writing all the lines, I see an extra line present in end? Also, I am closing the file with Close statement. Is this behavior normal? Can we avoid that? Because this extra line is creating errors while importing data into other systems. Thanks a lot in advance! - Jeet. ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 28 06:21:40 2005 Date: Tue, 28 Jun 2005 16:50:10 +0530 From: Subject: [sqr-users] RE: Record field names - SQL Query Hi Anu, Steve and sudeep are right; it is very easy to create one such utility. You may try the below query which will give you the desired result in Oracle. Query: - SELECT column_name FROM all_tab_columns WHERE=0D table_name =3D ORDER BY column_id Sorry if I am trying to deviate you from the problem. Regards, Tej Always keep your words soft and sweet, just in case you have to eat them. -----Original Message----- From: Alexander, Steve [mailto:Steven.Alexander@sanjoseca.gov]=0D Sent: Monday, June 27, 2005 11:17 PM To: 'This list is for discussion about the SQR database reportinglanguagefrom Hyperion Solutions.' Subject: RE: [sqr-users] Record field names When you use PSRECFIELD, watch out for subrecords. Anu's example, ADDRESSES, has a subrecord. When you find a subrecord, you have to go back to PSRECFIELD and look up the fields in the subrecord. Also, subrecords can have subrecords, although that is rare. Another possibility is to use the table that your database manager uses. Ask your DBA. -----Original Message----- From: Sudeep Vaidya [mailto:sudeep.vaidya@patni.com] Sent: Monday, June 27, 2005 11:13 AM To: sqr-users@sqrug.org Subject: Re: [sqr-users] Record field names Anu, I'm not aware of any such utility, but creating one would be an easy job. Just write a small SQR to fetch data from PSRECFIELD and PSRECFIELDDB, and provide the values to the where clause using the Run Control Record. You can then write them on to a File as per your choice... Ofcourse , you would need a Run control record and run control page. should not take more than a couple of hours to create and test ! hope this helps Sudeep > Dattatraya, > > Example would be be ADDRESSES tables has various fields which I do not > know > about. After running the utility (may be record name can be entered as a > input), I should get output file as: > > address1, > address2, > address3, > city, > state, > zip, > country > > I hope this helps. > > Thanks for all your help. > > Regards, > Anu > >>From: Dattatraya Shetty >>Reply-To: "This list is for discussion about the SQR database >>reportinglanguage from Hyperion Solutions." >>To: "This list is for discussion about the SQR database reporting >>languagefrom Hyperion Solutions." >>Subject: Re: [sqr-users] Record field names >>Date: Thu, 23 Jun 2005 12:40:20 -0700 (PDT) >> >>Anu, >> If you can give and example that will be great. >> >>Datta. >> >> >>--- Anu Bagde wrote: >> >> > >> > Hello Group, >> > >> > >> > I am looking for an utility, which will read the record name and list >> > the >> > record field names as output fiel in some way (space, comma or tab >> > delimited). Is their some utility available that will do this? >> > >> > Thanks for any answers you have for this. >> > >> > Regards, >> > Anu >> > >> > _________________________________________________________________ >> > Millions of marriage proposals. >> > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Find your >> > match on >> > BharatMatrimony.com >> > >> > >> > _______________________________________________ >> > sqr-users mailing list >> > sqr-users@sqrug.org >> > http://www.sqrug.org/mailman/listinfo/sqr-users >> > >> >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam protection around >>http://mail.yahoo.com >> >>_______________________________________________ >>sqr-users mailing list >>sqr-users@sqrug.org >>http://www.sqrug.org/mailman/listinfo/sqr-users > > _________________________________________________________________ > Adore Arshad Warsi? http:/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users Confidentiality Notice=0D The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may contain confidential or p= rivileged information. If you are not the intended recipient, please notify the sender at Wipro or Ma= iladmin@wipro.com immediately and destroy all copies of this message and any attachments. _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Tue Jun 28 08:18:16 2005 From: "Anu Bagde" Subject: Re: [sqr-users] Record field names Date: Tue, 28 Jun 2005 13:17:11 +0000 Thank you all for all your thoughts on my little problem. I guess I will write an SQR to do this. Regards, Anu >From: Robert Goshko >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reporting >languagefrom Hyperion Solutions." >Subject: Re: [sqr-users] Record field names >Date: Thu, 23 Jun 2005 13:37:42 -0600 > >On 6/23/05, Anu Bagde wrote: > > > > Hello Group, > > > > > > I am looking for an utility, which will read the record name and list >the > > record field names as output fiel in some way (space, comma or tab > > delimited). Is their some utility available that will do this? > > > > Thanks for any answers you have for this. > >I have some SQL on my web site that will decode the record definitions >and list all the fields including the ones from the subrecords, these >ones are "Oracle centric", I have a DB2 (UDB) version that I need to >put up as well. > >http://www.axis-dev.ca/modules.php?op=modload&name=Downloads&file=index&req=viewsdownload&sid=2 > >-- >...Rob > >-- No trees were killed in the sending of this message. However a >large number of electrons were terribly inconvenienced. > >==================================================================== >Robert Goshko >Registered Linux User #260513 > >Want a Gmail account, 2+ GB web mail, just ask me. > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ Top-of-the-line jobs!. http://creative.mediaturf.net/creatives/timesjobs/hotmail_TOL.htm Log on to timesjobs.com and apply TODAY! _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 06:46:23 2005 From: "Ravindran Rajan" Date: Wed, 29 Jun 2005 17:12:12 +0530 Subject: [sqr-users] Sum of Group by Field Hi All, I want to get a Sum of similar to Crystal Reports... In Crystal Report there is a function for calculating sum for group by sum ( fieldname , groupby field name ) This will return the sum value based on the group by field name.. Is there any other similar expression for calculating the sum of group by expression????????? ______________________________________________________________________ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 09:14:30 2005 From: "radhika reddy" Subject: Re: [sqr-users] Report Layout Date: Wed, 29 Jun 2005 09:13:26 -0500 Hi, Thanks for replying. I selected PDF when running through Process scheduler but it truncates the data at the end and gives only data which fits in 8x11 size. Do i have to do more than what i am doing. At present I am doing the following: begin-setup #Include 'ptpsl177.sqc' end-setup and later just doing printing. I haven't used any Layout or Printer declarations. When i went through this sqc, it only has page-size of A4 and Letter. I think my requirement needs a bigger size paper. I have about 300 characters in each line and about 17 columns. Any help would be great. Thanks. >From: "Prasanna Menta" >Reply-To: "This list is for discussion about the SQR database >reportinglanguage from Hyperion Solutions." >To: "This list is for discussion about the SQR database reporting >languagefrom Hyperion Solutions." >Subject: Re: [sqr-users] Report Layout >Date: Wed, 22 Jun 2005 13:25:49 -0400 > >Yes - if not use setup32.sqc > >radhika reddy wrote: > > > > Hi, > > > > I have to print a report which does not fit in 8x11 size. Can that be > > printed if it's landscape? i am not sure exactly what it does. i have an >SQC > > - ptpsl177.sqc. Can i use this sqc to print the output. > > > > Thanks. > > > > _________________________________________________________________ > > Express yourself instantly with MSN Messenger! Download today - it's >FREE! > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > _______________________________________________ > > sqr-users mailing list > > sqr-users@sqrug.org > > http://www.sqrug.org/mailman/listinfo/sqr-users > >_______________________________________________ >sqr-users mailing list >sqr-users@sqrug.org >http://www.sqrug.org/mailman/listinfo/sqr-users _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 14:07:14 2005 From: "Anu Bagde" Date: Wed, 29 Jun 2005 19:06:01 +0000 Subject: [sqr-users] Running SQR using PeopleSoft Page Button Hello all, I am trying to run a SQR using PeopleSoft Push button, instead of using a run control page (change properties of page field and choose destination as 'process' and select SQR Report process type and Name). But 'Run Control ID' parameter is not getting populated properly and I am getting an error. Has anyone done some project like this? Please help. Thanks, Anu _________________________________________________________________ Claim your space online! http://www.msn.co.in/spaces Share your world for free! _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 15:18:00 2005 Date: Wed, 29 Jun 2005 17:01:23 -0400 (EDT) Subject: Re: [sqr-users] Running SQR using PeopleSoft Page Button From: "Sudeep Vaidya" Anu, You can actually schedule a process (on Process scheduler)through a custom button with PeopleCode doing the job. However, there are some prerequisites : 1. You must have a valid Process definition for the SQR. You would have to write custom code on the Button for Fieldchange event. Use the Processrequest class from PeopleBooks. It gives lots and lots of options. I don't remember the syntax, but it should be like this : Local processrequest &MYRQST; &MYRQST = createprocessrequest(process type, process name); &MYRQST.Schedule(); If &MYRQST.Status = 0 then /* distribute etc */ Else /*scheduling failed, do error processing */ End-If; This code is called from the Push button, triggering the SQR. You might want to give a link to the process monitor from there. > Hello all, > > I am trying to run a SQR using PeopleSoft Push button, instead of using a > run control page (change properties of page field and choose destination > as > 'process' and select SQR Report process type and Name). But 'Run Control > ID' > parameter is not getting populated properly and I am getting an error. Has > anyone done some project like this? Please help. > > Thanks, > Anu > > _________________________________________________________________ > Claim your space online! http://www.msn.co.in/spaces Share your world for > free! > > > _______________________________________________ > sqr-users mailing list > sqr-users@sqrug.org > http://www.sqrug.org/mailman/listinfo/sqr-users > _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 15:34:21 2005 From: Bob Stone Date: Wed, 29 Jun 2005 15:33:12 -0500 Subject: [sqr-users] biif0001.sqr and billing processing Hi there, I have a question for anybody slightly familar with the main billing process BIIF0001.sqr from PS 7.5. We're trying to figure out the reason/logic behind the piggy-backing (or chaining) of multile MRs (merchandise returns) on the original invoices. Why is it done this way? Why not attach everything back to the original invoice? We don't have any programmers left from when this was implemented. Right now if there's a 2nd MR where a line also appears on the first MR (returns more of same product, ex.), it should attach to the MR instead of the original invoice. We're making changes to allow same-day MRs (and multiple MRs on the same day), and we got to this piggy-back idea (which i know how to implement for same-day too)...but I want to figure out why we even do it that way. 're trying to figure out whether we need to do this 'piggy-backing' idea...and the more we look at it, the more we think that it's unnecessary. We don't have any of the original programmers left in my group...so we don't know what they were thinking when they originally implemented this. I'm not sure why to keep it, anybody have any ideas? (besides keeping PS delivered stuff the exact same...which we aren't worried about). What I mean by 'piggy-backing': we have 2 MRs agains the same CG invoice, the way they do it is to link MR1 to CG and then MR2 to MR1. CG <--MR1 <--MR2 What I'm thinking we should do is just link them both back to the same CG: CG <--MR1 <--MR2 any ideas of possible problems? Thanks Bob Stone Fastenal PS AR/Billing Developer (507) 453-8514 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Wed Jun 29 21:16:13 2005 Subject: Re: [sqr-users] Record field names From: MPietersz@adecco.com.au Date: Thu, 30 Jun 2005 12:21:15 +1000 Anu In your SQR, if you select on the Peopletools tables to do this rather than database tables (eg ALL_TABLES in Oracle) at least your program is database independant. Regards Mark This communication is confidential and may be legally privileged and/or con= tain material protected by copyright or other intellectual property laws. = If you are not the intended recipient of this email, any use, forwarding, = printing or reproduction of it or any attachment, is prohibited. If you ha= ve received this communication in error, immediately contact us by return e= mail or by calling +61 3 9954 2100 and then irretrievably delete it and an= y attachments. Email sent from or to us may be monitored for the purposes of quality contr= ol, systems administration and legal compliance. You should check for viruses or other harmful components before opening or = using any attachments to this email. Our liability is limited by all appli= cable laws, and otherwise restricted to resupplying any affected attachmen= ts. Our Privacy Policy can be viewed at http:\\www.adecco.com.au _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 10:59:59 2005 Date: Thu, 30 Jun 2005 08:58:47 -0700 From: "McCown, Larry" Subject: [sqr-users] Array Sub divide Question Greetings, I have been using SQR for years but never attempted to use an array. The current report basically requires that I use one. I am trying to follow the samples in the SQR Server User's Guide Version 4.3 (Program ex8a,b,c. pages 55-67 ) and I get individual output ok.=20=20 But what I need to get is subtotals of monthly hours like: AC (Problem code) CA (craft) 1 2 2 1 3 1 0 0 0 0 0 0 CU 0 0 0 1 2 2 0 0 0 0 0 0 UW 5 5 6 2 8 5 0 0 0 0 0 0 AC (total) 6 7 8 4 13 8 0 0 0 0 0 0=20=20 AD (Problem Code)=20=20=20=20 CA 0 0 1 1 1 2 0 0 0 0 0 0=20=20=20=20 CU 1 1 1 2 2 5 0 0 0 0 0 0 UW 5 5 5 6 6 2 0 0 0 0 0 0 AD (Total) 6 6 7 9 9 9 0 0 0 0 0 0 etc. =20 Can anyone help direct me to a good place to find information on building array's? This guide is very basic Thank you.=20 =20 =20 =20=20=20=20 =20=20=20=20=20 =20 Larry *=20 Larry McCown=20 Northrop Grumman Western Region Facilities=20 One Hornet Way WG00/W5=20 El Segundo, CA. 90245=20 Phone (310)628-3939=20 Fax. (310)332-3149=20 Larry.McCown@NGC.com =20 Words Kill, words give life; they're either poison or fruit - you choose.=20 It's amazing what can be accomplished when you don't care who gets the credit. =20 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 11:42:03 2005 Subject: RE: [sqr-users] Array Sub divide Question Date: Thu, 30 Jun 2005 11:41:22 -0500 From: "Knapp, Richard" I'm guessing you understand from the book how to get the data into an array.=20=20 Now, you've got to ask yourself, what data do you want in the array? Do you want the entire slug (I'm assuming a year's worth) or can you live with just a month's at a time or maybe just a running total which you report when the (ordered) data stream has come to month's end and re-initialize and reuse for the next month's data? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of McCown, Larry Sent: Thursday, June 30, 2005 10:59 AM To: sqr-users@sqrug.org Subject: [sqr-users] Array Sub divide Question Greetings, I have been using SQR for years but never attempted to use an array. The current report basically requires that I use one. I am trying to follow the samples in the SQR Server User's Guide Version 4.3 (Program ex8a,b,c. pages 55-67 ) and I get individual output ok.=20=20 But what I need to get is subtotals of monthly hours like: AC (Problem code) CA (craft) 1 2 2 1 3 1 0 0 0 0 0 0 CU 0 0 0 1 2 2 0 0 0 0 0 0 UW 5 5 6 2 8 5 0 0 0 0 0 0 AC (total) 6 7 8 4 13 8 0 0 0 0 0 0=20=20 AD (Problem Code)=20=20=20=20 CA 0 0 1 1 1 2 0 0 0 0 0 0=20=20=20=20 CU 1 1 1 2 2 5 0 0 0 0 0 0 UW 5 5 5 6 6 2 0 0 0 0 0 0 AD (Total) 6 6 7 9 9 9 0 0 0 0 0 0 etc. =20 Can anyone help direct me to a good place to find information on building array's? This guide is very basic Thank you.=20 =20 =20 =20=20=20=20 =20=20=20=20=20 =20 Larry *=20 Larry McCown=20 Northrop Grumman Western Region Facilities=20 One Hornet Way WG00/W5=20 El Segundo, CA. 90245=20 Phone (310)628-3939=20 Fax. (310)332-3149=20 Larry.McCown@NGC.com =20 Words Kill, words give life; they're either poison or fruit - you choose.=20 It's amazing what can be accomplished when you don't care who gets the credit. =20 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 12:18:29 2005 Subject: RE: [sqr-users] Array Sub divide Question Date: Thu, 30 Jun 2005 10:17:20 -0700 From: "McCown, Larry" Hi Richard, I can get the array to give me a monthly breakout of hours for the year by either problemcode(pc) or by craft (Maximo). What I want is a monthly breakout of hours by problemcode subdivided by craft. Brief sample of what I want the output to look like. Jan Feb Mar etc. AC (PC)=09 CA (craft) 2 3 5 EL (craft) 3 3 2 AC Total 5 6 7 Previous monthly totals and current running month is what I am looking for and getting. But I currently can only to get it to give me the "AC Total" not the "craft" subtotals. Thanks=20 Larry=09=09 -----Original Message----- From: sqr-users-bounces+larry.mccown=3Dngc.com@sqrug.org [mailto:sqr-users-bounces+larry.mccown=3Dngc.com@sqrug.org] On Behalf Of Knapp, Richard Sent: Thursday, June 30, 2005 9:41 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: RE: [sqr-users] Array Sub divide Question I'm guessing you understand from the book how to get the data into an array.=20=20 Now, you've got to ask yourself, what data do you want in the array? Do you want the entire slug (I'm assuming a year's worth) or can you live with just a month's at a time or maybe just a running total which you report when the (ordered) data stream has come to month's end and re-initialize and reuse for the next month's data? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of McCown, Larry Sent: Thursday, June 30, 2005 10:59 AM To: sqr-users@sqrug.org Subject: [sqr-users] Array Sub divide Question Greetings, I have been using SQR for years but never attempted to use an array. The current report basically requires that I use one. I am trying to follow the samples in the SQR Server User's Guide Version 4.3 (Program ex8a,b,c. pages 55-67 ) and I get individual output ok.=20=20 But what I need to get is subtotals of monthly hours like: AC (Problem code) CA (craft) 1 2 2 1 3 1 0 0 0 0 0 0 CU 0 0 0 1 2 2 0 0 0 0 0 0 UW 5 5 6 2 8 5 0 0 0 0 0 0 AC (total) 6 7 8 4 13 8 0 0 0 0 0 0=20=20 AD (Problem Code)=20=20=20=20 CA 0 0 1 1 1 2 0 0 0 0 0 0=20=20=20=20 CU 1 1 1 2 2 5 0 0 0 0 0 0 UW 5 5 5 6 6 2 0 0 0 0 0 0 AD (Total) 6 6 7 9 9 9 0 0 0 0 0 0 etc. =20 Can anyone help direct me to a good place to find information on building array's? This guide is very basic Thank you.=20 =20 =20 =20=20=20=20 =20=20=20=20=20 =20 Larry * Larry McCown Northrop Grumman Western Region Facilities One Hornet Way WG00/W5 El Segundo, CA. 90245 Phone (310)628-3939 Fax. (310)332-3149 Larry.McCown@NGC.com Words Kill, words give life; they're either poison or fruit - you choose.=20 It's amazing what can be accomplished when you don't care who gets the credit. =20 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 14:14:52 2005 Subject: RE: [sqr-users] Array Sub divide Question Date: Thu, 30 Jun 2005 14:14:11 -0500 From: "Knapp, Richard" Do you want row totals and column totals (rows being craft, columns being problem code)? If so, send me the create-array statement so we can be speaking the same language. Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of McCown, Larry Sent: Thursday, June 30, 2005 12:17 PM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: RE: [sqr-users] Array Sub divide Question Hi Richard, I can get the array to give me a monthly breakout of hours for the year by either problemcode(pc) or by craft (Maximo). What I want is a monthly breakout of hours by problemcode subdivided by craft. Brief sample of what I want the output to look like. Jan Feb Mar etc. AC (PC)=09 CA (craft) 2 3 5 EL (craft) 3 3 2 AC Total 5 6 7 Previous monthly totals and current running month is what I am looking for and getting. But I currently can only to get it to give me the "AC Total" not the "craft" subtotals. Thanks=20 Larry=09=09 -----Original Message----- From: sqr-users-bounces+larry.mccown=3Dngc.com@sqrug.org [mailto:sqr-users-bounces+larry.mccown=3Dngc.com@sqrug.org] On Behalf Of Knapp, Richard Sent: Thursday, June 30, 2005 9:41 AM To: This list is for discussion about the SQR database reportinglanguage fromHyperion Solutions. Subject: RE: [sqr-users] Array Sub divide Question I'm guessing you understand from the book how to get the data into an array.=20=20 Now, you've got to ask yourself, what data do you want in the array? Do you want the entire slug (I'm assuming a year's worth) or can you live with just a month's at a time or maybe just a running total which you report when the (ordered) data stream has come to month's end and re-initialize and reuse for the next month's data? Richard Knapp Database Programmer/Analyst Institutional Research and Planning University of Missouri System 573-882-8856 knappr@umsystem.edu -----Original Message----- From: sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org [mailto:sqr-users-bounces+knappr=3Dumsystem.edu@sqrug.org] On Behalf Of McCown, Larry Sent: Thursday, June 30, 2005 10:59 AM To: sqr-users@sqrug.org Subject: [sqr-users] Array Sub divide Question Greetings, I have been using SQR for years but never attempted to use an array. The current report basically requires that I use one. I am trying to follow the samples in the SQR Server User's Guide Version 4.3 (Program ex8a,b,c. pages 55-67 ) and I get individual output ok.=20=20 But what I need to get is subtotals of monthly hours like: AC (Problem code) CA (craft) 1 2 2 1 3 1 0 0 0 0 0 0 CU 0 0 0 1 2 2 0 0 0 0 0 0 UW 5 5 6 2 8 5 0 0 0 0 0 0 AC (total) 6 7 8 4 13 8 0 0 0 0 0 0=20=20 AD (Problem Code)=20=20=20=20 CA 0 0 1 1 1 2 0 0 0 0 0 0=20=20=20=20 CU 1 1 1 2 2 5 0 0 0 0 0 0 UW 5 5 5 6 6 2 0 0 0 0 0 0 AD (Total) 6 6 7 9 9 9 0 0 0 0 0 0 etc. =20 Can anyone help direct me to a good place to find information on building array's? This guide is very basic Thank you.=20 =20 =20 =20=20=20=20 =20=20=20=20=20 =20 Larry * Larry McCown Northrop Grumman Western Region Facilities One Hornet Way WG00/W5 El Segundo, CA. 90245 Phone (310)628-3939 Fax. (310)332-3149 Larry.McCown@NGC.com Words Kill, words give life; they're either poison or fruit - you choose.=20 It's amazing what can be accomplished when you don't care who gets the credit. =20 =20 _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 15:30:54 2005 From: "radhika reddy" Date: Thu, 30 Jun 2005 15:29:47 -0500 Subject: [sqr-users] print Hi, I have to print the in the following format: Address1 Address2 Address3 phone county - line by line I would do something like this: print address1 (0,1) print address2 (+1,1) print address3 (+1,1) print phone (+1,1) print county (+1,1) My problem is sometimes address2, addr3,phone,county might be empty then there would be 4 lines of space which i don't want to have. I don't want to put If statement for each of these to see if they are empty. Is there any better way to do this? Thanks. Any help is great. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 15:45:09 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] print Date: Thu, 30 Jun 2005 13:44:37 -0700 I can think of other ways to handle this, but they're all more complex and verbose than putting each print in an IF statement. -----Original Message----- From: radhika reddy [mailto:radhika_05@hotmail.com] Sent: Thursday, June 30, 2005 1:30 PM To: sqr-users@sqrug.org Subject: [sqr-users] print Hi, I have to print the in the following format: Address1 Address2 Address3 phone county - line by line I would do something like this: print address1 (0,1) print address2 (+1,1) print address3 (+1,1) print phone (+1,1) print county (+1,1) My problem is sometimes address2, addr3,phone,county might be empty then there would be 4 lines of space which i don't want to have. I don't want to put If statement for each of these to see if they are empty. Is there any better way to do this? Thanks. Any help is great. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 16:48:15 2005 From: Bob Stone Subject: RE: [sqr-users] print Date: Thu, 30 Jun 2005 16:47:08 -0500 Good word, Steve: verbose. I think Steve's right...the easiest way to do it is with an IF statement for each of them. Not just easiest to write, but also easiest to follow. The if statements won't slow up the program any noticeable amount...I'm not sure why you would want to find a harder way to do it?? Just because it's the 'easy way' doesn't mean it's not also smart, good programming. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Alexander, Steve Sent: Thursday, June 30, 2005 3:45 PM To: 'This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions.' Subject: RE: [sqr-users] print I can think of other ways to handle this, but they're all more complex and verbose than putting each print in an IF statement. -----Original Message----- From: radhika reddy [mailto:radhika_05@hotmail.com] Sent: Thursday, June 30, 2005 1:30 PM To: sqr-users@sqrug.org Subject: [sqr-users] print Hi, I have to print the in the following format: Address1 Address2 Address3 phone county - line by line I would do something like this: print address1 (0,1) print address2 (+1,1) print address3 (+1,1) print phone (+1,1) print county (+1,1) My problem is sometimes address2, addr3,phone,county might be empty then there would be 4 lines of space which i don't want to have. I don't want to put If statement for each of these to see if they are empty. Is there any better way to do this? Thanks. Any help is great. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users From sqr-users-bounces+sqrusersarch=sqrug.org@sqrug.org Thu Jun 30 18:18:49 2005 From: "Alexander, Steve" Subject: RE: [sqr-users] print Date: Thu, 30 Jun 2005 16:18:21 -0700 I don't blame Radhika for looking for another way. It's frustrating to have to repeat the same concept to the compiler over and over. It would be nice if SQR had a conditional print statement that only advanced the position pointer and printed a variable if that variable weren't null. Even if the address lines were in an array, the loop would be awkward because the print statement doesn't take array elements. -----Original Message----- From: Bob Stone [mailto:bstone@fastenal.com] Sent: Thursday, June 30, 2005 2:47 PM To: 'This list is for discussion about the SQR database reporting languagefrom Hyperion Solutions.' Subject: RE: [sqr-users] print Good word, Steve: verbose. I think Steve's right...the easiest way to do it is with an IF statement for each of them. Not just easiest to write, but also easiest to follow. The if statements won't slow up the program any noticeable amount...I'm not sure why you would want to find a harder way to do it?? Just because it's the 'easy way' doesn't mean it's not also smart, good programming. -----Original Message----- From: sqr-users-bounces+bstone=fastenal.com@sqrug.org [mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of Alexander, Steve Sent: Thursday, June 30, 2005 3:45 PM To: 'This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions.' Subject: RE: [sqr-users] print I can think of other ways to handle this, but they're all more complex and verbose than putting each print in an IF statement. -----Original Message----- From: radhika reddy [mailto:radhika_05@hotmail.com] Sent: Thursday, June 30, 2005 1:30 PM To: sqr-users@sqrug.org Subject: [sqr-users] print Hi, I have to print the in the following format: Address1 Address2 Address3 phone county - line by line I would do something like this: print address1 (0,1) print address2 (+1,1) print address3 (+1,1) print phone (+1,1) print county (+1,1) My problem is sometimes address2, addr3,phone,county might be empty then there would be 4 lines of space which i don't want to have. I don't want to put If statement for each of these to see if they are empty. Is there any better way to do this? Thanks. Any help is great. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users _______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users