Hi,
thanks for the response. You're correct, this is a very complex task and I actually found this article which describes the problem a lot better. Sadly it also highlights the unlikelihood of me achieving this!
http://en.wikipedia.org/wiki/Knapsack_problem
Thanks anyway,
Nick
where would...
I have a very large dataset from which I need to create a subset of customers where their balance equals a target value...
So for example, giving the following dataset:
Customer 1 - 30
Customer 2 - 100
Customer 3 - 50
Customer 4 - 20
Customer 5 - 50
If I set my target value to 120, then I...
Having a problem rounding a number to the tenth decimal place. Using SAS V8.
data Inputs;
input NoIn $50.;
datalines;
325256.95299286436284664885258
;
run;
data Rounded;
set Inputs;
format NoOut 32.10;
NoOut = round(NoIn,.0000000001);
run;
Would expect to see a return of...
...got this one working using SQL passthrough:
proc sql;
connect to odbc(dsn=sqlsrv user=user pwd=pwd);
create table new as select * from connection to odbc
(select * from ReallyReallyReallyReallyReallyLongTableName);
quit;
Nick
where would we be without rhetorical...
123sush, you could use proc transpose to reshape your dataset and then from there it will be much easier to do your calculation. i.e.
data Inputs;
input @1 DrugName $6.
@8 Year $4.
@13 Price 2.;
datalines;
Drug A 2005 10
Drug B 2005 5
Drug C 2005 4
Drug A 2006 12
Drug B 2006 6
Drug C...
Hi, using SAS version 8. If I set up a remote library to a SQL Server, any tables on that SQL server with names longer than 32 characters do not show in the library. Is there a setting somewhere to just have SAS truncate the name so it is visible?
Cheers
Nick
where would we be without...
Guys, sorry been away for a while! Thanks for the explaination, I think I have been treating SAS macro's incorrectly, shame they dont act like a function, would be extremely useful!
Thanks again
Nick
where would we be without rhetorical questions...
Chris, using your code appears to invoke the macro but it then error's within the macro itself. However if I just call the macro outside of a datastep it works fine!
macro:
%macro FindUltimateParent(ChildOID);
%let ParentID = &ChildOID;
proc sql noprint;
select Primary_LE_ID into: NextID...
I've created a macro which returns a single value. how do I implement it within a datastep so as to create a new variable within that datastep. i.e.
data AppendParent;
set MyInputs;
format UltimateParent 11.;
UltimateParent = FindUltimateParent(ChildEntity);
run;
So basically I want my...
...this out but now hoping some macro guru can now help me out...!
filename Results pipe 'command/c find /c /i "incremental" "x:\core sas\data\*.sas"';
data Results ;
infile Results length=recLen;
input buffer $varying256. reclen;
OccurancesInFile = scan(buffer,-1,':');
if...
Not sure if this is possible but can I parse the results of the following into a dataset?
x 'find /c "searchstr" "x:\sas\data\*.sas"';
basically all this does is call the DOS "find" command. The idea of the program is that it will search sas program files for a particular word or phrase...
...you wont be able to do is remote submit any Enterprise Guide or Miner queries as this requires Integration Technologies which SAS will charge for. *Note: you have to use an older version of Miner if you done purchase Integration tech as the new Java version (v5.2) requires this.
Hope this of...
Has anyone been involved in a SAS server upgrade. SAS are telling us that the Metadata server is fundamental to the operation of SAS 9. I can't help think that this is just SAS trying to squeeze yet more money out of us. Can anyone shed any light on this?
where would we be without rhetorical...
hoinz, basically your last statement is what I am looking for. The total number of nulls throughout the whole table. The table has about 200 columns so I thought some sort of loop but I'm not really that great with PL/SQL as I've only used SQL server before.
where would we be without rhetorical...
Is it possible to count every NULL in a table? I have a large table and users are asking how well it's populated.
Thanks
nick
where would we be without rhetorical questions...
Yeh the code was more for illustration purposes. Doesn't really resolve the issue though. If I hide the element with an absolute reference I can happily make visible/hidden over and over. It only happens if I hide these using a loop.
Very bizarre
where would we be without rhetorical questions...
This is a bit of strange one although it's probably my fault!
I loop through all the <select> elements on my page and set the visibility to 'hidden'
function HideAllObj(){
var objType = document.getElementsByTagName('select');
for(var i=0; i <= objType.length-1; i++){...
Basically I have a fairly large xml file and all I'm wanting to achieve is add some sort of paging to this so if you have a better solution feel free to chip in!
I thought the best way to achieve the above would be to load the XMl to a recordset however no matter what I try I get the following...
Hi Lexx, You have to use Javascript when dealing with frames:
RedirectStr= "<script language='Javascript'>"
RedirectStr= RedirectStr& "parent.frames('FRAMENAME').location.href='http://webtest.parkdeanholidays.co.uk/promothanks.htm';"
RedirectStr= RedirectStr& "</script>";
response.write...
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.