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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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