...= substr(glS,1,1);
Bmem2 = substr(suS,1,1);
Bmem3 = substr(UrS,1,1);
Bmem4 = substr(hS,1,1);
Bmem5 = substr(ES,1,1);
Bmem6 = substr(fS,1,1);
/* Count # of Knowledge Questions for each patient out of the 6 of interest */
array Bcalc [6] $Bmem1-Bmem6;
Bcount=0;
do i=1 to 6;
if...
Hi,
Still being new in SAS, I am just wondering what CAT means in SAS? When it is needed? When to use it? Is it used just with CARDS? I inherited somebody’s code and struggle with it!
For ex.
CAT='ALL'
CARDS;
lines of data
Thanks in advance,
Rina
Hello everybody!
I have two tables:
1st table name is substFormat: with two num fields: Policy and new1
2nd table name is Full: with Policy field
I need to replace Policy field in FULL table with NEW1 if substFormat.policy=Full.policy
I tried to do it in Proc SQL UPDATE STATEMENT
proc...
I need to convert numbers to characters as I have quest1 values equal 1 or 2 or 3, or
4, or 5.
I need quest1 field whch is numeric (length 8) into char Y or NO depending on criteria.
However I failed to do it. Moreover log tells me:
NOTE: Character values have been converted to numeric...
Klaz,
Actually I found the way!!! Rather tan using delete query I used select and I got recent date.
proc sort data=d.denlab;
by id dt_dy
run:
data d.recent;
set d.denlab;
by id dt_day;
if last.id;
run;
HOWEVER I do not know how to get an appropriate format of the date mm/dd/yyyy
Instead...
Hi everybody
I created the following SQL query and it does work except I need all other fields in the output.
select id,Max(dt_day)
FROM DenLab
GROUP BY id;
However I found out that whenever I add some of the other fields to select clause, it doesn't give me correct answer
for example...
...can create a copy of the dataset instead aliases to use it in my DELETE query...
data d.DenLab2;
set d.denlab;
run;
proc sql;
DELETE *
FROM d.DenLab
WHERE d.DenLab.[bb.dt_day] Is Not Null AND Int([bb.dt_day])<(SELECT Max(Int([bb.dt_day]))
FROM d.DenLab2
WHERE...
...SQL is in conflict with SAS syntax.
How should I implement my DELETE query in SAS?
Could you please give me a hand?
Thank You in advance,
Rina
*****************************************************************************************
libname d 'c:\MyFolder\SAS Datasets';
proc sql...
Hi Everybody,
I am in a trouble with a Proc SQL which I implemented as below:
************************************************************
libname DA 'C:\MYfolder\SAS Datasets';
proc sql;
create table da.Den as
select * FROM da.combineBothTbls mc
join DA.LAB...
Hi!
When I connected to Datawarehose (DB2) through ODBC to Access 2002 I got a comment field with data type memo .
Now I am trying to write Proc SQL in SAS...
Which datatype I should assign in the PROC SQL SAS code? Character? An with what size?
Thank you!
Rina
Chris,
In my previous thread I needed to import for Access to SAS.
In the current one I had needed to import from Excel to SAS.
I had to change all column headings in Excel however because SAS didn't allow me to rename from improper Excel names (like member id without underscore). On the...
...9 digits (for ex I
need 012345678 instead 12345678). I assume I need to use FORMAT function? In what way?
Thank you very much in advance
Rina
*******************************************************************************
libname mylib 'c:\myDir\rina\myFolder\SAS Datasets';
*** InTbl...
...9 digits (for ex I
need 012345678 instead 12345678). I assume I need to use FORMAT function? In what way?
Thank you very much in advance
Rina
*******************************************************************************
libname mylib 'c:\myDir\rina\myFolder\SAS Datasets';
*** InTbl...
...data1;
end;
else if (condition2) then do;
tag=2;
output data2;
end;
else if (condition3) then do;
tag=3;
output data3;
end;
run;
/* after that there are sorting of each data1,2,3 by id*/
data data1_3;
set data1 data2 data3 ;
run;
proc sort data=data1_3;
by id tag;
data...
...ID] FROM orig_"
cmd.CommandText = strSQL
I updated it with :
cmd.ActiveConnection = CurrentProject.Connection
strSQL = "SELECT * FROM orig_"
cmd.CommandText = strSQL
However it doesn't recognise (run-time error 3265 collection again.
I assume that VBA does not like Access...
According to what was just mentioned I used dot (.) for Properties as EOF and bang (!) for for members of a collection ( for a recordset object, that would be the field names)
Therefore there should be no difference of assigning
mID = rst![Member Id]
OR
mAsked = rst![Asked...
Now when I populated the object first and use it next like the following:
Set cmd = New ADODB.Command
Set rst = New ADODB.Recordset
'populate
cmd.ActiveConnection = CurrentProject.Connection
strSQL = "SELECT DISTINCT [MEMBER ID] FROM orig_"
cmd.CommandText = strSQL
'use object...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.