Good morning: I am having a problem using the SATTACH command with the column ALIAS option. I am using R:Base 6.5++ 1.866xRT03. I have SCONNECTed to an Oracle database and then want to SATTACH the table MECH_CHEM_SPECIFICATIONS.
The following statement works SATTACH MECH_CHEM_SPECIFICATIONS AS MECH_CHEM_SPECS USING ALL At this point I have to redefine a number of the columns since they exceed the 18 character limit in R:Base. I can successfully alias each column if I do it manually. I would like to automate the process in a program. Here is the text from rsyntax.com that shows how the SATTACH with ALIAS option should work: Notice that the table Orders will be attached as tOrders, column OrderID will be used as the Primary Key and instead of defining individual columns, you can start the list of columns with comma, add comma for each column and the AliasColumn, such a tFreight, to be aliased, and then continue with a comma for each additional column. In the above example we have eight (8) commas, then AliasColumn and an additional six (6) commas. (equals 15 total I think) There are a total of fourteen (14) columns in tOrders table. So, start with first comma, seven commas for first seven columns, AliasName, and then additional six commas for columns nine through fourteen. (Which adds up to 15) I was somewhat unclear on example 02A since the text says the tOrders table has 14 columns but the example appears to allow for 15. The following code gives me a SYNTAX ERROR. I have been over it with a fine-toothed comb and checked it against the examples at rsyntax.com. This example effectively renames each column in the SATTACHed table. SATTACH MECH_CHEM_SPECIFICATIONS + AS MECH_CHEM_SPECS + USING ALL + ALIAS SPECTYPE, + SPEC_NUMBER, + SPEC_NAME, + GRADE_DESC, + SPEC_REV, + PROD_SPEC_DESC, + HCR_CODE, + SHEET_STRIP_CODE, + MATL_HARD_DESC, + MATL_FIN_DESC, + HEAT_TREAT_COND, + HARD_UNIT, + PROG_ID, + LOG_DATE, + USER_ID, + DIST_LIST, + SPEC_ORIG_DATE What am I missing? Thanks for any help. Mike Ramsour c/o AK Steel Coshocton Works Voice: 740-829-4340 --- RBASE-L ================================================ TO POST A MESSAGE TO ALL MEMBERS: Send a plain text email to [EMAIL PROTECTED] (Don't use any of these words as your Subject: INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP) ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: INTRO ================================================ TO UNSUBSCRIBE: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: UNSUBSCRIBE ================================================ TO SEARCH ARCHIVES: Send a plain text email to [EMAIL PROTECTED] In the message SUBJECT, put just one word: SEARCH-n (where n is the number of days). In the message body, place any text to search for. ================================================

