BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
stuart_snap
Fluorite | Level 6

Hi.

 

Is it possible to write to an Oracle table thats name is longer than 32 Char?  I am able to read it using SQL Passthrough as suggested in several other threads, but when I try to insert some rows, i get...

"ERROR 65-58: Name 'WP_MARKETINGPROMOTIONSELIGIBILITY_BKUP' is too long for a SAS name in this context."

 

I am using the code below.  Am I missing something, or is writing not possible?

 

data test;

input cardcode $ promoid took $ segmentatdrop $ presented $ presenteddate presentedby;

cards;

S123456 3000 N Fringe Y . 999

S123457 3000 N Fringe N . 999

S123458 3000 N Fringe N . 999

run;

 

proc sql;

connect to odbc as myconn (datasrc=Prod user=sas password="edited" readbuff=3000);

insert into WP_MarketingPromotionsEligibility_bkup (cardcode, promoid, took, segmentatdrop, presented, presenteddate, presentedby)

select * from test;

disconnect from myconn;

quit;

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Your insert into is not in a PASSTHRU step:

 

proc sql;
connect to odbc as myconn (datasrc=Prod user=sas password="edited" readbuff=3000);
execute (
insert into WP_MarketingPromotionsEligibility_bkup (cardcode, promoid, took, segmentatdrop, presented, presenteddate, presentedby)) by myconn;
disconnect from myconn;
quit;

View solution in original post

2 REPLIES 2
SASKiwi
PROC Star

Your insert into is not in a PASSTHRU step:

 

proc sql;
connect to odbc as myconn (datasrc=Prod user=sas password="edited" readbuff=3000);
execute (
insert into WP_MarketingPromotionsEligibility_bkup (cardcode, promoid, took, segmentatdrop, presented, presenteddate, presentedby)) by myconn;
disconnect from myconn;
quit;
LinusH
Tourmaline | Level 20
Or create a view with a name with 32 or less chars.
Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 857 views
  • 0 likes
  • 3 in conversation