Hi all, Today I am trying to join a table to another table by means of a key column to be joined on; but the key column format differs...it's Character $28 against numeric Best12... so that I receive an error on performing the join stating that "cannot join on data types that differ". So on the left-hand side my column has a key called as t1.out_key in the character format (blahblah_id 14536, 14538, 14589 etc.) and on the right-hand side figures the same column t2.out_key, contains the needed id's 14536, 14538, 14589 but there column's been formatted as numeric. There is no choice except to join my two tables on exactly that one, since it's the primary key. (There are over a million rows, otherwise I'd've already quickly exported the table into a txt file and back into SAS so as to reformat - but that, I think, although it would work, would make my networking-infra support people really unhappy as it would clog the network / the txt-export would be too big.) So I am trying to solve this with the graphical user interface offered by Enterprise Guide v8, that's because I have no other SAS tooling and I'm not so good with code (yet). I looked this problem up in the documentation and so I tried the PUTN function ... so as to try to reformat the column in the left-hand side to a new, numeric, computed column, using Advanced Expression which is in the QueryBuilder tooling, however it keeps calling for 3 arguments whereas as per documentation there should be only 2 (and with two arguments it gives me syntax-errors but that might be due to me rather than due to SAS EG). I then tried PUTC function so as to try to reformat the column in the right-hand side to a new character computed column, but it also failed. I then tried Recode Column which is in the QueryBuilder but it seems, although radio-button Numeric can be selected, that it will invariably produce a character outcome nonetheless: i.e. your source column will have same format as your destination column so that Recode is not solving my issue. I am not so good with coding; yet it seems I cannot solve this by means of the graphical user-interface. How can I proceed? I used PUTN(t1.out_key,BEST12.w) with and without width and I get syntax error as that an asterisk is lacking, however adding asterisks does not solve this -and when I read up about it, the function seems to call for 2 arguments, the 3rd being optional. Which, here, is the correct syntax for the graphical user interface to work or how can I make this join work? Or does a programme need to be written (in that case I need more help I fear)...? Thanks so much, let me know if more detail is needed, All the best, -heleen.
... View more