BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Pato485
Calcite | Level 5

Hello, i want to ask how can i set a field to varchar(10) in sas enterprise guide, i tried this:

PROC SQL;
CREATE TABLE SASDATA.ETF_VHODNOST AS
SELECT DISTINCT t1.cislonavrhu,
t1.nazov_produkt,
t1.StaraSa,
t1.MA_Meno_starasa,
t1.'registrácia_KT'n,
t1.Veduci,
t2.name LABEL="sposobvyhodnotenia" AS sposobvyhodnotenia,
t3.name LABEL="stavvyhodnotenia" AS stavvyhodnotenia,
t4.name LABEL="vyjadrenieklienta" AS vyjadrenieklienta,
t5.name LABEL="typprovizie" AS typprovizie,
t6.name LABEL="typvyhodnotenia" AS typvyhodnotenia,
t1.MA_Meno_veduci,
t1.LD_Meno,
t1.StavPriradenia,
t1.StavServisovania,
t1.Klient,
t1.platnostod,
t1.platnostdo,
t1.hodnotitel,
t1.typ_hodnotitela,
t1.datumobnovy,
t1.obnova_dni,
t1.obnova_interval,
t1.datumvyjadklienta,
t1.datumvyhodnotenia,
t1.protokolelektronicky,
t1.zmluvanavrh,
/* MA_nahradnik */
("") FORMAT=$CHAR10. LABEL="MA_nahradnik" AS MA_nahradnik
FROM WORK.QUERY_FOR_PRODUKT_0001 t1
LEFT JOIN MYLIB.ctenumeration t2 ON (t1.sposobvyhodnotenia = t2.pk)
LEFT JOIN MYLIB.ctenumeration t3 ON (t1.stavvyhodnotenia = t3.pk)
LEFT JOIN MYLIB.ctenumeration t4 ON (t1.stavvyjadklienta = t4.pk)
LEFT JOIN MYLIB.ctenumeration t5 ON (t1.typprovizie = t5.pk)
LEFT JOIN MYLIB.cte....

 

but when i loook at it in sql microsoft management studio - design it shows me varchar(1), how to set it to varchar(10)?

Pato485_0-1652088568663.png

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Try adding LENGTH =

("") FORMAT=$CHAR10. length = 10 LABEL="MA_nahradnik" AS MA_nahradni

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

Try adding LENGTH =

("") FORMAT=$CHAR10. length = 10 LABEL="MA_nahradnik" AS MA_nahradni
Pato485
Calcite | Level 5

Awesome, it helped. Thank u

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 1001 views
  • 3 likes
  • 2 in conversation