08-02-2013 06:45 AM
Hi everyone, i'm new to the forum and EG so please be gentle.
I am using EG 4.3 and have created around 20 queries from a database of patient summary level data for last year. I want to link the same queries to previous years without going in and re producing them. I've tried right clicking on the relevant query/and or the dataset and link but it comes up with a dotted line and still links to the year I originally used. I've tried to delete the dataset but it deletes the queries. I'm sure there is a way to amend in the code what to do but i'd rather not go down that route. Can anyone point me in the right direction. Sorry if this seems a basic question but we have limited support and knowledge here and i'm getting stuck.
Thanks in advance
08-02-2013 09:50 AM
I like EG but I think you have run up against one of its limitations. If you want to change the source tables in a query you lose all the calculations relating to the source.
Suggestion 1: Convert each query into a SAS program by copying and pasting the code into a program object. Then replace the queries with the program objects. Now you can edit the programs to replace dataset names with macro variables, which can be set in a separate program at the start of your precess.
Suggestion 2: Outside of EG rename your original datasets, then rename the new datasets to have the same name as the original datasets used in the query. This is a heinous bodge but it may work for you in the short term.
Suggestion 3: Rewrite the processes, this time using generic dataset names. You can then use an initial query/program to copy your dated data to the generic data you use to start the process. Use the exerciuse to annotate your process flow with notes and consider whether to create a stored process. Counsel of perfection.
08-02-2013 10:21 AM
If you use suggestion 1 you can still link each program to its source tables to preserve the flow diagram.
My other beef with EG (4.3) is that you cannot write subqueries which means that the coding is sometimes a lot more prolix than it need be.