SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
abhik_giri
Calcite | Level 5

I need to look at the query for a view in Oracle DB. Hence I run the following: "select * from all_views where view_name=..." to get the record for a particular view. I get a truncated "Text" column. For the particular view, "Text_length" = 5558 but length of "Text" is only 1000.
Looks like this is a drawback of SAS as the URL http://support.sas.com/kb/36/237.html says that "Currently, there is no solution or workaround for this problem."

Please suggest what should be done.

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

Hi

 

Have a look at the DBMAX_TEXT option. This option sets the maximum length of char variable coming from the DBMS.

 

See example below

 

proc sql;
  connect to oracle (
    path="host/dbms"
    user=yourUser
    password=yourPassword
    DBMAX_TEXT=32767
  );

  create table myViews as
  select
    *
  from 
    connection to oracle (
    select * from all_views 
  )
  ;
quit;

Bruno

View solution in original post

2 REPLIES 2
BrunoMueller
SAS Super FREQ

Hi

 

Have a look at the DBMAX_TEXT option. This option sets the maximum length of char variable coming from the DBMS.

 

See example below

 

proc sql;
  connect to oracle (
    path="host/dbms"
    user=yourUser
    password=yourPassword
    DBMAX_TEXT=32767
  );

  create table myViews as
  select
    *
  from 
    connection to oracle (
    select * from all_views 
  )
  ;
quit;

Bruno

RW9
Diamond | Level 26 RW9
Diamond | Level 26

In addition, I would check why the database has a field setup which is >5.5k characters in length in the first place.  E.g. a) is a database a good format for what is essentially a book, and b) if it needs to be in the database, why is it not coded, or reduced into component rows of < 200 characters?  

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2927 views
  • 0 likes
  • 3 in conversation