×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Probably.

Something like this, where the SQL name is COLUMNNAME and AS400NME is the native name:

/* Creating table LENNONS1.TEST */
CREATE TABLE LENNONS1.TEST ( COLUMNNAME FOR AS400NME CHARACTER (10) ) ;

/* Setting column labels for LENNONS1.TEST */
LABEL ON COLUMN LENNONS1.TEST ( COLUMNNAME TEXT IS 'This is the text field text' );

/* Setting column headings for LENNONS1.TEST */
LABEL ON COLUMN LENNONS1.TEST ( COLUMNNAME IS 'Heading 1 Heading 2 Heading 3 ' );

If you have access to iSeries Navigator, you can use it to create SQL tables and other SQL related stuff. It's a "fill in the blanks" process, which is what I used on the above code, since I can never remember the syntax.

There is an article I wrote here if you need help finding the right menu in iSeries Nav:

http://www.mcpressonline.com/sql/prompted-sql-ddl-creation.html

Sam

On 8/22/2012 8:33 PM, James Lampert wrote:
We've got an SQL jock with little or no AS/400 experience developing an
entirely SQL-generated database for us (and in fact, that script that
was giving us trouble recently was part of it -- I passed along the
answers, and he was able to get the script working; thanks!).

At any rate, we're getting (not unexpectedly) SQL field names coming up
as column headings, looking at the file in QuestView. and generated
AS/400 native field names appearing wherever the SQL field names exceed
10 characters.

Is there a way to specify both the AS/400-native and SQL-native field
names when creating the file? And what about specifying an AS/400-native
filename when the SQL-native filename exceeds 10 characters?

I know about "LABEL ON" for column headings; I've used it in my own SQL
scripts

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.