Jim: Thank you, thank you and THANK YOU! I modified my code and specified the two columns needed to make each row unique and voila it works.
This is yet another example of the vast knowledge that exists in this wonderful community. Sincerely Mike Ramsour -----Original Message----- From: Jim Bentley [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 06, 2004 1:09 PM To: [EMAIL PROTECTED] Subject: [RBASE-L] - RE: Using SATTACH with column ALIAS option Mike, Your problem may be phrase "USING ALL". Following is quoted from RSyntax. "USING ALL Specifies all columns uniquely identify the rows in an attached table if no primary or unique keys are defined. USING collist Specifies which columns uniquely identify the rows in an attached table if no primary or unique keys are defined" Do you really mean to say that "ALL" columns are needed to uniquely identify the rows? If so you may exceed the limit allowed for the "Key" value in an RBase Index. What I suspect is that the Oracle table already has a "primary" or "unique" key. If so you may be able to omit the "USING" phrase. Note! from RSyntax Again "If no qualkey is specified, automatic qualkeys will be assigned based on information from the ODBC source". Also, In my opinion there seems to be gramatical errors in the RSyntax explanation, Column counts do not seem to jibe in the examples for (ver 6.5++), Build:1.847 and higher for Windows. -- Sincerely, Jim Bentley American Celiac Society 266 Midway Dr River Ridge LA 70123 email: [EMAIL PROTECTED] Phone: 504-738-6165 -----Original Message----- From: Ramsour Mike <[EMAIL PROTECTED]> Sent: Wed, 6 Oct 2004 09:23:02 -0400 To: [EMAIL PROTECTED] (RBASE-L Mailing List) Subject: [RBASE-L] - Using SATTACH with column ALIAS option 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

