Desktop productivity for business analysts and programmers

Changing Input datasets to a query w/out losing the query

Reply
N/A
Posts: 0

Changing Input datasets to a query w/out losing the query

My ERP system just went through a major upgrade. This included making table name changes. Since my Queries in EG can no longer see the table, they won't open up.

If I remove the table, all my selected, where clause, group by, order by fields will disappear. I then have to redo all that logic (assuming I remember what it is).

Is there any way to swap out a table i.e. I want to right-click and hit 'Select Input Data'...just like I do with 'Sort Data'


TIA

- Matthew
Contributor
Posts: 73

Re: Changing Input datasets to a query w/out losing the query

A couple of ideas:

1. Go to EGuide Explorer and deassign and reassign the old library nickname to the new place where the data resides?

2. My last resort is to right click on the icon and choose "Open Last Submitted Code". Then, I can copy and paste that code and modify it to go to the proper new place. Or, I can use the code to remind me of the options that I want as I create a new point & click task.
N/A
Posts: 0

Re: Changing Input datasets to a query w/out losing the query

Thanks for your input, however, this does not solve the problem.

1. Changing the library won't matter. The table name has changed not the library.

2. I already tried 'Open Last Submitted Code' only to see

%put ERROR: Unable to get SAS code. Error opening data "ST_CLASS_V1_ROOT".;


Any other ideas ??????

TIA

- Matthew
Contributor
Posts: 23

Re: Changing Input datasets to a query w/out losing the query

Swapping the libnames does seem like a good start. How about the following:

Assign a different libname to point to your "real" database.
Create a new SAS library, which will wind up containing nothing but views. Have your existing libname point to this new library.
In PROC SQL, create a view for each table with a name change, something like CREATE VIEW oldname.OldTableName AS SELECT * FROM diffname.NewTableName.

I'd pick one query first and try just creating the view(s) for the table(s) it uses, to see whether the idea works. Hopefully the optimizer will be smart enough that this will cost you little if anything performance-wise.
Ask a Question
Discussion stats
  • 3 replies
  • 253 views
  • 0 likes
  • 3 in conversation