App Engine and SQL Server %NoUppercase
Amazing how after all these years, there’s still nuggets of information that I keep finding out about PeopleSoft. Today for example I am working on an Application Engine for one of our customers. This particular AE is being built to replicate a dynamic list of tables from one database to another as part of an archiving strategy (more on that soon).
I began building a SQL Statement which references the sysobjects view, checking to see if a table exists in the target database, if it does exist then it must be dropped. My Code looked something like this:
&MySQLStatement = "IF EXISTS (SELECT 'X' FROM DEMO.[dbo].sysobjects WHERE TYPE = 'U' AND NAME = 'PS_MYTABLE') DROP TABLE DEMO.[dbo].PS_MYTABLE"
&MySQL = CreateSQL(&MySQLStatement);
I ran this SQL in SQL Client, ran perfectly. However the App Engine kept returning no success due to SQL Errors. Further investigation showed that PeopleSoft will Uppercase all the SQL inside &MySQLStatement, making the code passed to SQL Server look like this:
IF EXISTS (SELECT 'X' FROM DEMO.[DBO].SYSOBJECTS WHERE TYPE = 'U' AND NAME = 'PS_MYTABLE') DROP TABLE DEMO.[DBO].PS_MYTABLE
Which of course will fall over as SYSOBJECTS in the Uppercase does not exist. ([DBO] should also be referenced as [dbo]), I scratched my head for a while, coming up with all sorts of mad ways around this, none of which worked. Finally I resorted to PeopleBooks and the Chapter for the SQL Class inside the PeopleTools PeopleCode API Reference Book, the section section in this Book has a “See Also of %NoUppercase”, clicking on this took me through to the PeopleCode Language Reference Book and a description of the %NoUppercase Meta-SQL Command, which states:
%NoUppercase - When processing a SQL statement, the system automatically casts all field names and possibly record names to uppercase when processing a SQL statement. When processing records from a third party, fields that are lowercase are cast into uppercase, which can create runtime issue on case-sensitive platforms.
To prevent this, use the %NoUppercase meta-SQL statement at the beginning of the SQL statement.
Very interesting, and not a meta-SQL statement I’d come across before. Utilising this %NoUppercase statement now makes my code look like this:
&MySQLStatement = "%NoUppercase IF EXISTS (SELECT 'X' FROM DEMO.[dbo].sysobjects WHERE TYPE = 'U' AND NAME = 'PS_MYTABLE') DROP TABLE DEMO.[dbo].PS_MYTABLE"
&MySQL = CreateSQL(&MySQLStatement);
This is then passed exactly as is to SQL Server which now executes it perfectly.
In conclusion file the %NoUppercase meta-SQL statement under your “Very Useful Stuff” category and don’t forget it!
IBM and Oracle – They work a lot closer together than you think…
I’ve worked with Oracle for 20+ years, Solidnet have been Oracle and IBM Partners for many years, but I did not realise just how close the cooperation is between the two companies. I had the good fortune last week of being invited to the “IBM does Oracle best” event, hosted by Fiona Martin of IBM. A day of presentations, discussion and information gathering. In particular several good speakers, including Alain Cyr and Frederic Dubois of the IBM Oracle Center in Montpellier.
A lot of information on just how IBM products integrate directly with Oracle, a good background to the IBM Oracle relationship, including some rather large figures on the amount of investment both companies put into their relationship.
Alain and Frederic demonstrated some very good IBM innovations on the Oracle platform, including Live Partitioning using Oracle RAC, a good indepth overview of the various IBM hardware offerings, including System X and IBM Power. A good workshop on sizing Oracle products for IBM platforms followed, including sizing for eBusiness, Siebel and PeopleSoft.
The day ended with a summary of IBM Products and how they can fit side by side with Oracle solutions, an example of this is IBM Optim for Data Masking and Management – I’ll blog more on that solution in the next few weeks.
Finally, you can follow IBM and Oracle on Twitter @IBMandOracle
Thanks to Fiona and the IBM guys for a really interesting day. Over the next couple of weeks I’ll go into more detail on IBM Optim and the other products in the portfolio that can help you with your Oracle Databases and Applications.
OUG PeopleSoft Conference 2011 – Highlights
Spent two days manning the Solidnet stand at the OUG PeopleSoft Conference 2011 held at the Park Inn at Heathrow. Whilst not as busy as last year, still a great two days and we met and exchanged views with old customers and potential new ones too.
As always the event was well organised by the http://www.oug.org.uk and came complete with a live twitter feed on the day.
For me, the top sessions were:
- PeopleSoft Roadmap and Update by March Weintraub of Oracle
- Global Payroll Performance Optimisation with Dave Kurtz
- Simple Web Services by Daniel Storey
- PeopleSoft Test Framework with Jeff Robbins (a Blog post on this to come shortly, it’s a very very useful tool).
- The excellent Talemetry Demo, showing off the scary social integration into Recruitment
Also some good sessions on the HCM, Financials and Global Payroll streams.
What can we deduce from the Conference? Well there’s plenty of mileage in PeopleSoft yet, Oracle are continuing to develop and support the product – perhaps with a little more marketing we’d get some new customers as well. Hopefully next years conference will be better attended, there’s lots to be learned from these sessions on ways of working with and enhancing PeopleSoft.
Recent Comments