13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

430 CONNECT Statement 4 Chapter 13DEFER=NO | YESdetermines when the connection to the DBMS occurs.Default value: NOIf DEFER=YES, the connection to the DBMS occurs when the firstPass-Through statement is executed. If DEFER=NO, the connection to theDBMS occurs when the CONNECT statement occurs.VALIDVARNAME=V6indicates that only <strong>SAS</strong> 6 variable names are considered valid. Specify thisconnection argument if you want the SQL pass-through facility to operate in<strong>SAS</strong> 6 compatibility mode.By default, DBMS column names are changed to valid <strong>SAS</strong> names,following these rules:3 Up to 32 mixed-case alphanumeric characters are allowed.3 Names must begin with an alphabetic character or an underscore.3 Characters that are not permitted are changed to underscores.3 Any column name that is not unique when it is normalized is madeunique by appending a counter (0,1,2,...) to the name.When VALIDVARNAME=V6 is specified, the <strong>SAS</strong>/<strong>ACCESS</strong> engine <strong>for</strong> theDBMS truncates column names to eight characters, as it does in <strong>SAS</strong> 6. Ifrequired, numbers are appended to the ends of the truncated names to makethem unique. Setting this option overrides the value of the <strong>SAS</strong> system optionVALIDVARNAME= during (and only during) the Pass-Through connection.This example shows how the SQL pass-through facility usesVALIDVARNAME=V6 as a connection argument. Using this option causesthe output to show the DBMS column "Amount Budgeted$" as AMOUNT_Band "Amount Spent$" as AMOUNT_S.proc sql;connect to oracle (user=gloria password=teachervalidvarname=v6)create view budget2000 asselect amount_b, amount_sfrom connection to oracle(select "Amount Budgeted$", "Amount Spent$"from annual_budget);quit;proc contents data=budget2000;run;For this example, if you omit VALIDVARNAME=V6 as a connectionargument, you must add it in an OPTIONS= statement in order <strong>for</strong> PROCCONTENTS to work:options validvarname=v6;proc contents data=budget2000;run;Thus, using it as a connection argument saves you coding later.Note: In addition to the arguments listed here, several other LIBNAMEoptions are available <strong>for</strong> use with the CONNECT statement. See the section aboutthe SQL pass-through facility in the documentation <strong>for</strong> your <strong>SAS</strong>/<strong>ACCESS</strong>interface to determine which LIBNAME options are available in the SQLpass-through facility <strong>for</strong> your DBMS. When used with the SQL pass-through

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!