BookmarkSubscribeRSS Feed
alexandraIFCT
Calcite | Level 5

Bonjour,

J'ai un problème de format suite à l'utilisation de obdc et à l'importation de mes tables. Lorsque je me connecte via obdc au serveur où se trouve ma base de données, c'est SAS qui choisit le format de mes variables de façon automatique. Par exemple toutes mes variables integer se retrouve avec un format 30.6 comment puis je modifier ça et mettre du format integer dans mes tables SAS ?

Voici ma ligne de commande 

libname marvin odbc user="user" password="xxx" datasrc="xxx" schema=tvcache PRESERVE_TAB_NAMES=YES;

 

Merci de m'avoir lu et à ceux qui pourront m'aider.

Bien à vous,

Alexandra

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

ODBC is not the smartest. 

Your best bet is to use proc datasets after importing the data and changing the formats there.

alexandraIFCT
Calcite | Level 5

Je pensais qu'il y aurait plus rapide que de devoir spécifier le format de chaque variable après avoir les importer.

alexandraIFCT
Calcite | Level 5

J'ai essayé de regarder avec le pass-through SQL mais je n'arrive pas à me connecter à ma base de donnée avec ça

ChrisNZ
Tourmaline | Level 20

proc sql;

  connect using MARVIN;

  select * from connection to MARVIN (  passthru SQL  );

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 620 views
  • 0 likes
  • 3 in conversation