HI all
how can i create a table in access by using proc sql. I also write code to do the same activity but i couldn't make the necessary result.
Here i put ma code on below.If anyone help me to do the task
proc sql;
connect to access(path='C:\Users\Krishna\Desktop\sass\three.mdb');
execute(create table kc (id number,name text,depid number)by access;
execute(insert into kc values(1,'abcd',101)) by access;
execute(insert into kc values(2,'jack',102)) by access;
execute(insert into kc values(2,'kilby',103)) by access;
disconnect from access;
quit;
Thanking you
Krishnachandran
So what is the result? DO you get any errors, or does your table not look as you expect?
I assume that the three.mdb already exists.
Are you doing this for testing/educational purposes? Inserting data in Access via SAS using hard coded insert values isn't best practice...
Hai Linush am beginner in sas.
The question was about for my learning purpose .Here the three.mdb already exist and the file also contain a table Krish.My need is to add new table in three.mdb with the name kc.I saw the same code in log window while i run the code .I couldn't saw any error messages.
If you don't see any messages at all, you probably haven't fixed the parenthesis problem.
You should see a
NOTE: PROCEDURE SQL used...
after you submitted your code.
You are missing a right parenthesis in your create table code line.
Once there it works for me. I use MS Access 2013 on SAS 9.4.
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!
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.