Home > front end >  What is the meaning of .WORK in SAS EG and can it be removed from my table names without consequence
What is the meaning of .WORK in SAS EG and can it be removed from my table names without consequence

Time:11-10

When SAS EG creates a query in the query builder it puts "work." in front of tables here is an example:

%_eg_conditional_dropds(WORK.QUERY_FOR_UNL_OBLIGATIONSBEHOLDN);

PROC SQL;
   CREATE TABLE WORK.QUERY_FOR_UNL_OBLIGATIONSBEHOLDN AS 
   SELECT t1.CUSTOM_1, 
          t1.CUSTOM_2, 
          /* REPORTING_AMOUNT */
            (SUM(t1.REPORTING_AMOUNT)) AS REPORTING_AMOUNT, 
          t1.LINE_ITEM, 
          t1.CUSTOM_5
      FROM WORK.UNL_OBLIGATIONSBEHOLDNING t1
      WHERE t1.CUSTOM_5 IN 
           (
           'VLIK9035_POS_NOTE',
           'VLIK9023_POS_COVERED_BOND'
           ) AND t1.CUSTOM_1 BETWEEN '20500000' AND '20599999' AND t1.LINE_ITEM NOT ='orphans'
      GROUP BY t1.CUSTOM_1,
               t1.CUSTOM_2,
               t1.LINE_ITEM,
               t1.CUSTOM_5;
QUIT;

If I remove "WORK." from the created table and the queried table nothing changes it works just as well as before, as far as I know.

What does it mean when a is named WORK.?

CodePudding user response:

Generally, a table is identified by a library name and a table name. A library can consist of several tables. So, the normal form is [library].[table] to identify a table. If you omit the library name SAS interprets this as work.[table] therefore you can remove 'work.' and nothing will change.

CodePudding user response:

Work is a temporary library. So yes, you can remove the work. part of your code.

  • Related