Subscribe Bookmark RSS Feed

jmp script: hvordan navngiver man tabellen i et server udtræk?

hanspeterjakobs

Community Trekker

Joined:

Oct 23, 2013

Jeg laver et udtræk fra en server via dette script:

_importsasconn << Import Data(

    "_AUTO032.CALREAD",

    Columns( "DATETIME", "POSITION", "VALUE0"),

    Where(

        "CALREAD.DATETIME > '01jul2013 00:00'dt '"

    ),

    SQLTableVariable( 1 ),

    UseLabelsForVarNames( 0 )

);

AUTO032.CALREAD er den specifikke server jeg henter data fra.

Jeg vil gerne kunne navngive tabellen på forhånd således jeg kan concatenate den med andre tabeller i en efterfølgende del af scriptet.

På forhånd tak for hjælpen.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I don't have SAS to test, but your code seems return a data table. Then it should be possible to rename it the usual way by << set name("new name").

Like this:

dt = _importsasconn << Import Data( ... );

dt << set name( "Import" );


Or if you don't need the data table variable:

(_importsasconn << Import Data( ... )) << set name( "Import" );

2 REPLIES
Solution

I don't have SAS to test, but your code seems return a data table. Then it should be possible to rename it the usual way by << set name("new name").

Like this:

dt = _importsasconn << Import Data( ... );

dt << set name( "Import" );


Or if you don't need the data table variable:

(_importsasconn << Import Data( ... )) << set name( "Import" );

hanspeterjakobs

Community Trekker

Joined:

Oct 23, 2013

That worked perfectly - thanks a lot!