Rename Tables

Reply
Occasional Contributor
Posts: 5

Rename Tables

Hi,

I want to rename tables which are in DB2 - however I keep getting errors.

proc datasets library=myfiles;

    change stock_apr=stock_apr12;

run;

/*error*/ SQL0108N The name "stock_apr12" has the wrong number of qualifiers.

No luck with proc sql either:

proc sql;

connect to DB2 (datasrc=EDW user=tumtum password=123)

select * from connection to DB2

(rename table myfiles.stock_apr to myfiles.stock_apr12);

quit;

/*error*/ SQL0108N The name "stock_apr12" has the wrong number of qualifiers.

I normally manage to find solutions when I get stuck, but not this time around. I'd really appreciate some ideas from.

PROC Star
Posts: 7,468

Re: Rename Tables

Occasional Contributor
Posts: 5

Re: Rename Tables

Hi Arthur,

Thank you for the feedback.

I did have a look at that previosly. That led me to use the proq sql to generate an explicit pass-through. Unless I am completely missing something o_O

Ask a Question
Discussion stats
  • 2 replies
  • 510 views
  • 0 likes
  • 2 in conversation