Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: RinaGreen
  • Order by date
  1. RinaGreen

    How to use Macro code?

    Dear Experts, I wrote code which looks pretty much the same in all three parts and differs just because of the different datasets. Data set names are the followings: Retire NoChoice Choice My code looks too long with 3 parts of it almost the same (actually other products(datasets) are coming...
  2. RinaGreen

    CAT and CARDS (?)

    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
  3. RinaGreen

    proc SQL update?

    Chris, Thank you for the quick and helpful responce. It works!!! I wonder if the same thing can be implemented in SAS syntax? Thank a million. Rina
  4. RinaGreen

    proc SQL update?

    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...
  5. RinaGreen

    failure to convert from Numeric to Character

    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...
  6. RinaGreen

    Urgent help with PROC SQL DELETE query is needed

    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...
  7. RinaGreen

    Problem to output all fields using aggregate function

    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...
  8. RinaGreen

    Urgent help with PROC SQL DELETE query is needed

    One more note... Actually I realized that I 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...
  9. RinaGreen

    Urgent help with PROC SQL DELETE query is needed

    Hi Everybody, I have a problem with SQL PROC DELETE query... After I successfully created table Denlab I need to eliminate partly duplicated records in order to leave just those ones with the same ID who are the most recent However those ones who have just one record shold not be touched...
  10. RinaGreen

    Proc SQL creates a table but does not populate it!

    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...
  11. RinaGreen

    How to treat data type memo in SAS?

    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
  12. RinaGreen

    IMPORT FROM EXCEL WITH COLUMN RENAMING

    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...
  13. RinaGreen

    IMPORT FROM EXCEL WITH COLUMN RENAMING

    Hi I need to import file from Excel to SAS and to rename all fields. Actually I already imported file from Access ones. I assume it should be like the following....I assume I just need to put FILE instead TABLE (in Access). Also I assume I need to specify a sheet.... I am not sure how to...
  14. RinaGreen

    import from Excel with renaming columns and adding some leading zeroes

    Sorry, I mistakenly posted in a wrong part (imstead SAS)!
  15. RinaGreen

    import from Excel with renaming columns and adding some leading zeroes

    Hi I need to import file from Excel to SAS and to rename all fields. Actually I already imported file from Access ones. I assume it should be like the following....I assume I just need to put FILE instead TABLE (in Access). Also I assume I need to specify a sheet.... I am not sure how to...
  16. RinaGreen

    Using Tag in loop and in (drop=tag)

    Thank you very much. This is really about deduping!
  17. RinaGreen

    Using Tag in loop and in (drop=tag)

    Hi Being absolutely new in SAS I got confused with the TAG in the following construction. I assume that this is a conditional loop. However I wonder what is the role of TAG? I tried to find it in help-on-line …but failed. Could you please explain me? Thank you in advance Rina data data1...
  18. RinaGreen

    Run-time Error 424 :object required

    Actually Ihave just understood why. It happened because I populated recordset just with [MWMBER ID] !!!! cmd.ActiveConnection = CurrentProject.Connection strSQL = "SELECT DISTINCT [MEMBER ID] FROM orig_" cmd.CommandText = strSQL I updated it with : cmd.ActiveConnection =...
  19. RinaGreen

    Run-time Error 424 :object required

    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...
  20. RinaGreen

    Run-time Error 424 :object required

    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...

Part and Inventory Search

Back
Top