01-22-2025
Aexor
Lapis Lazuli | Level 10
Member since
05-05-2020
- 187 Posts
- 149 Likes Given
- 0 Solutions
- 4 Likes Received
-
Latest posts by Aexor
Subject Views Posted 625 01-21-2025 11:27 PM 679 01-21-2025 04:12 PM 1275 12-06-2024 06:30 AM 1295 12-06-2024 06:09 AM 1141 12-06-2024 03:26 AM 1141 12-06-2024 03:25 AM 1141 12-06-2024 03:23 AM 1301 12-05-2024 05:21 PM 842 12-04-2024 06:37 AM 2070 03-09-2024 10:12 AM -
Activity Feed for Aexor
- Posted Re: ERROR: A name token was expected on SAS Viya. 01-21-2025 11:27 PM
- Posted ERROR: A name token was expected on SAS Viya. 01-21-2025 04:12 PM
- Posted Re: Need to store a code in macro variable on SAS Programming. 12-06-2024 06:30 AM
- Posted Need to store a code in macro variable on SAS Programming. 12-06-2024 06:09 AM
- Posted Re: Need to add semicolon in values getting printed on SAS Programming. 12-06-2024 03:26 AM
- Posted Re: Need to add semicolon in values getting printed on SAS Programming. 12-06-2024 03:25 AM
- Liked Re: Need to add semicolon in values getting printed for Tom. 12-06-2024 03:24 AM
- Posted Re: Need to add semicolon in values getting printed on SAS Programming. 12-06-2024 03:23 AM
- Liked Re: Need to add semicolon in values getting printed for Ksharp. 12-06-2024 03:23 AM
- Liked Re: Need to add semicolon in values getting printed for ballardw. 12-06-2024 03:22 AM
- Liked Re: Need to add semicolon in values getting printed for data_null__. 12-06-2024 03:21 AM
- Liked Re: Need to add semicolon in values getting printed for data_null__. 12-06-2024 03:21 AM
- Posted Need to add semicolon in values getting printed on SAS Programming. 12-05-2024 05:21 PM
- Posted macro variable in title statement is not getting resolved correctly on SAS Programming. 12-04-2024 06:37 AM
- Posted Re: Getting duplicate value because of do loop on SAS Programming. 03-09-2024 10:12 AM
- Posted Re: Getting duplicate value because of do loop on SAS Programming. 03-08-2024 06:44 PM
- Posted Getting duplicate value because of do loop on SAS Programming. 03-08-2024 11:44 AM
- Liked Re: do loop is not working as expected for ballardw. 03-01-2024 05:42 AM
- Posted Re: do loop is not working as expected on SAS Programming. 03-01-2024 03:55 AM
- Posted do loop is not working as expected on SAS Programming. 03-01-2024 02:35 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 03-03-2023 09:24 AM 2 08-09-2021 02:35 AM 1 07-29-2021 07:26 AM
05-02-2023
01:46 PM
Thank i tried as you suggested . Please refer below comparison . without applying the sub setting method NOTE: The execution of this query involves performing one or more Cartesian product joins that can not be optimized. NOTE: Table mywork.dates created, with 10790 rows and 5 columns. NOTE: PROCEDURE SQL used (Total process time): real time 0.35 seconds cpu time 0.51 seconds with apply sub setting NOTE: The execution of this query involves performing one or more Cartesian product joins that can not be optimized. NOTE: Table mywork.dates created, with 10790 rows and 5 columns. NOTE: PROCEDURE SQL used (Total process time): real time 0.39 seconds cpu time 0.53 seconds I am still getting notes and the its taking more time in sub setting method. . Can you please suggest if I am missing anything.
... View more
05-02-2023
09:37 AM
Hi All,
I need to know is there any way I can optimize this join. I am getting notes :
NOTE: The execution of this query involves performing one or more Cartesian product joins that can not be optimized. mywork.dates
proc sql noprint;
create table mywork.dates as
select
distinct
a.prod_sk,
a.geo_sk,
b.date_sk,
b.fiscal_start_dt,
b.fiscal_end_dt
from
mywork.tmp_plan_actuals_pgr a,
mylib.date_nm b
where b.fiscal_start_dt >= &min_start_dt.
and b.fiscal_end_dt <= &max_end_dt.
and date_lvl_no = &time_low_lvl.;
quit;
&min_start_dt. , &max_end_dt. , &time_low_lvl these have some values . these are getting created in previous steps and totally independent from the tables present in join.
Please help.
... View more
04-26-2023
02:58 PM
Hi ,
I have a query. Currently I am facing ERROR: Insufficient space in file and time issue. I am working on optimization of a SAS code. FOr the same matter I need one suggestion
In the existing code I can see multiple external db connection to create some tables in database as
for e.g
step 1 . proc sql noprint;
connect to db (<credential>);
execute (
create table abc
) by db.;
disconnect from db;
;
quit;
step 2 .
proc sql noprint;
connect to db (<credential>);
execute (
create table xyz
) by db.;
disconnect from db;
;
quit;
like that I have multiple steps, I can make only one connection and create both xyz and abc table.
will this help in any sort of optimization. any explanation will be very helpful. Thanks!!!!!!
... View more
03-03-2023
09:27 AM
Hello, I want to learn about hashing and parallel processing in SAS. Somehow I am not getting any proper documentation where I can get all information and some practice question. can someone please help.
Thanks a ton!
... View more
03-03-2023
09:24 AM
1 Like
issue resolved, I was using wrong table reference . thank you
... View more
02-28-2023
05:32 AM
proc sql noprint; 81 create table work.ids as 82 select distinct trim(lowcase(CAST (plan_id as uuid))) -- 22 202 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, ), *, **, +, ',', -, '.', /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. ERROR 202-322: The option or parameter is not recognized and will be ignored.
... View more
02-28-2023
05:30 AM
No, I am not using sql passthrough .
... View more
02-28-2023
03:43 AM
Thank you. I am getting error like ERROR: Table "A" not found in FROM clause
... View more
02-25-2023
10:45 AM
Yes It is not working. Any other option I can use in place of subquery ?
... View more
02-24-2023
08:42 AM
I have a proc fed sql query where I am passing a query as text .
I wanted to run a another query . but I am getting error
ERROR: Unsupported operation in FedSQL query: IN/ANY/ALL subquery.
proc cas; fedsql.execdirect status=s/ query="create table CAS_LIB.newt {options replace=true} as select a.buis_id as b_id , b.plan_set as p_s , b.version_no as ver_no , a.date as date , a.mkd_price_amt as mkd_price_amt , from old_cas.tab1 as a, old_cas.tab2 as b where a.buis_id in (select id from new_cas.tab3) and upcase(a.a.buis_id) = upcase(b.buis_id)";
How can I use this subquery here in fed sql.
... View more
02-23-2023
01:06 PM
I am getting this error . Thought in previous step CAS_LIB is working fine. am I missing anything here. Please help proc fedsql ; create table CAS_LIB.tmp_OUTFOR_102 as select a.* ,b.time_id as start_dt_sk from CAS_LIB.OUTFOR_102 normal: a, CAS_LIB.ed_OUTFOR_102 b where a.start_date between b.start_date and b.end_date; error: ERROR: Table "CAS_LIB.OUTFOR_102" does not exist or cannot be accessed error: ERROR: BASE driver, schema name CAS_LIB was not found for this connection
... View more
02-23-2023
10:53 AM
Sorry , Can you please elaborate , What could be the correct syntax
... View more
02-23-2023
10:52 AM
Thank you for your suggestion. I will try this. VF_LIB = CAS_LIB throughout the session . I have used CAS_LIB as libname to avoid using libref which is more than 8 char . I want tables to be created in CAS_LIB and I want those tables to get accessed in later steps to which is not happening. if you check the attached code . I have mentioned the code steps .
... View more
02-23-2023
09:06 AM
Hi ,
I need suggestion for the error I am getting while creating table.
Since I have libray refernce having more than 8 char. So I created a libref
like this
libname CAS_LIB cas caslib="&mp_sourceName";
but whenever I am trying to create table using CAS_LIB as library . It is throwing error.
I have also inserted code for ref
proc casutil;
load data =planning.ed_&inputTable CASOUT="ed_&inputTable"
OUTCASLIB="&mp_sourceName" replace;
libname &vf_lib cas caslib="&mp_sourceName";
proc fedsql SESSREF=&_SESSREF_;
create table &vf_lib..tmp_&inputTable. as
select a.* ,b.time_id as start_dt_sk
from
&vf_lib..&inputTable. a, &vf_lib..ed_&inputTable b
where
a.%bquote(&time_dim.) between b.start_date and b.end_date;
quit;
proc cas;
sessionProp.setsessopt / caslib="&mp_sourceName";
table.alterTable / columns={{rename="%TRIM(&prd_var)",
name="actual"},
{rename="%sysfunc(catx(_,&prd_var.,fcst))", name="predict"}}
name="tmp_&inputTable.";
quit;
/* This mp_source name have values like CASUSER(CMSTEST), ShoppingInsight , ModelValuation , etc */
ernce.
normal: MPRINT(X): proc casutil; note: NOTE: The UUID '3887c308-3320-8d4d-81f1-b24a9322bcac' is connected using session CASAUTO. normal: SYMBOLGEN: Macro variable PLAN_LIB resolves to planning normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: && resolves to &. normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: MPRINT(X): load data =planning.ed_OUTFOR_102 CASOUT="ed_OUTFOR_102" OUTCASLIB="CASUSER(cmstest)" replace; note: NOTE: PLANNING.ED_OUTFOR_102 was successfully added to the "CASUSER(cmstest)" caslib as "ED_OUTFOR_102". normal: SYMBOLGEN: Macro variable VF_LIB resolves to CAS_LIB normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: MPRINT(NPF_INPUT_CDL_FACT): libname CAS_LIB cas caslib="CASUSER(cmstest)"; note: NOTE: Libref CAS_LIB was successfully assigned as follows: note: Engine: CAS note: Physical Name: 3887c308-3320-8d4d-81f1-b24a9322bcac note: NOTE: PROCEDURE CASUTIL used (Total process time): note: real time 0.28 seconds note: cpu time 0.05 seconds note: note: normal: SYMBOLGEN: Macro variable _SESSREF_ resolves to CASAUTO normal: MPRINT(X): proc fedsql SESSREF=CASAUTO; normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 title: 17 The SAS System Wednesday, February 22, 2023 05:25:00 PM title: normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable MP_SOURCENAME resolves to CASUSER(cmstest) normal: SYMBOLGEN: Macro variable INPUTTABLE resolves to OUTFOR_102 normal: SYMBOLGEN: Macro variable TIME_DIM resolves to start_date normal: MPRINT(X): create table CASUSER(cmstest).tmp_OUTFOR_102 as select a.* ,b.time_id as start_dt_sk from normal: CASUSER(cmstest).OUTFOR_102 a, CASUSER(cpstest).ed_OUTFOR_102 b where a.start_date between b.start_date and b.end_date; error: ERROR: Syntax error at or near ".T"
... View more
02-23-2023
08:49 AM
Hi All,
I want to know if we can use CAST like functionality in PROC SQL.
I have query where the internal query returns value which is in varchar format and outer query is having UUID datatype . So whenever I am trying to compare values it is throwing errors .
Thanks!
... View more