Hi,
I'm having a problem with a query and was hoping someone could help me out.
I have 3 tables each with the same key.
Table 1 - List of Customers (500 rows)
Table 2 - Usage (500 rows)
Table 3 - Status (400 rows)
I attempted to do this:
Select a.*
from customers a left join usage b on...
Hi All,
I have a problem, I need to select the max value of a row and get the field(s) that its associated to.
Example:
ID MONTH1 MONTH2 MONTH3 MONTH4 MONTH5 MONTH6
1 22 33 32 56 234 234
I need to be able to select and retrieve ID, MONTH5 and MONTH6 (not the values but...
Hi, I am attempting to set up an environment where users can update the same table concurrently.
I know that in order to do this I have to use SAS/Share if they are SAS datasets. But we also connect to an oracle library which then does not need SAS/Share. Is it possible to use Proc SQL to do...
I have a table where the date column has some data that is not formatted correctly. How can I update this column?
I tried:
proc sql;
update customer
set datefield = datefield format=mmddyy10.;
quit;
You mention
"Your programs would use the ip address of the sas server in the libname statement."
Everything is located on the same machine, datasets, sas application, sas/share.
Is this possible?
I need concurrent users to be allowed to write to a dataset at the same time.
Here is the setup(not my idea).
One PC that has 2 partitions so 2 people remote into their respective partition and use SAS from there and access the same libraries. If I were to get SAS/SHARE would I install it on...
I need to know if it is possible to share datasets between users. I know that SAS/SHARE exists, but can't find much information regarding it. Can SAS/SHARE run on a regular desktop with Windows XP or does it require a server?
Is there any other method of sharing a dataset besides SAS/SHARE?
I have a PROC SQL query that goes like the following:
PROC SQL;
SELECT * FROM TABLE1
WHERE START_DATE BETWEEN (beginning of last month) TO (end of last month);
QUIT;
How do I do this? The base date I want to manipulate is sysdate.
Thanks
I have a macro that reads a filename and then I wish to use substr and index to grab specific parts of the filename.
%macro test
%let campaign_code = %substr(&filename,1,8);
%let campaign_cycle = %substr(&filename,10,1);
%let month = %substr(&filename,12,3);
%let year =...
The filename is pretty dynamic.
Here is the proposed layout due to the need of the information.
Code_Cycle_Month_Year_ProgramName.txt
The code is an in house code that changes month to month.
Basically I would like to retrieve the filename into SAS and extract variables using substr to...
I have a file that requires importing. The filename is relevant to the program so I would like to take that filename and extract parts of it and place them in variables. The filename changes so it cannot be hardcoded, is there a way to bring the filename in dynamically?
Hey Chris, thanks for the reply. I will try the datastep method. One question though, for date_field=date_field + 7, what would be the syntax if the date was formatted in 01/30/2007?
Thanks for the clarification.
Here is one scenario:
I wish to insert data into a table but based on the date.
For example(this is general logic, not code specific)
if date = jan then
insert data into table 1
elseif date = feb
insert data into table 2
end if
My logical thinking comes from programming in VB, so please bear with me.
Is this possible?
data _null_;
if x=0 then;
proc sql;
sql statement
quit;
end;
run;
Please correct me if I am wrong, data steps/proc statements are unique to SAS, Macros are equivalent to functions in other languages.
Now, besides surrounding code statements with data steps/proc/macro is there a way of just coding if statements and other functions in SAS?
Ok, I have a program that is automatically run every wednesday. There is a cycle field that needs to be incremented everytime it runs. The value is based on the week # in the month. I have to also take into consideration that there are some months with 5 weeks rather than the regular 4.
Can...
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.