Re: [R] Extracting data from SQL Server based on R parameters

2012-01-23 Thread Jeff Newmiller
Without write access to the SQL database, you cannot merge data from both sources within the SQL query. You can use paste to build a list of literal strings that you can refer to in the SQL where clause with IN, pull the results into R, then use the merge function to combine the data frames in R

[R] Extracting data from SQL Server based on R parameters

2012-01-22 Thread dthomas
Hi, Can you extract data from a SQL server table based on parameters already in R? For example I have a list of unique patient IDs with latest hospitalisation date which I've processed in R. I need to join this data to other tables in SQL server. The tables in SQL server are too large to import wi

Re: [R] Extracting Data from SQL Server

2012-01-10 Thread dthomas
a.diag03 = b.[ICD-10 Codes] I am not sure why your table name CVD_ICD10 has a suffix $. From: Jeff Newmiller <[hidden email]> To: dthomas <[hidden email]>; [hidden email] Sent: Tuesday, 10 January 2012, 8:00 Subject: Re: [R] Extracting Data from SQL Ser

Re: [R] Extracting Data from SQL Server

2012-01-10 Thread Ajay Askoolum
Newmiller To: dthomas ; r-help@r-project.org Sent: Tuesday, 10 January 2012, 8:00 Subject: Re: [R] Extracting Data from SQL Server This is OT here. However, you might want to investigate the UNIQUE keyword in the SQL Server documentation for SELECT

Re: [R] Extracting Data from SQL Server

2012-01-10 Thread Jeff Newmiller
This is OT here. However, you might want to investigate the UNIQUE keyword in the SQL Server documentation for SELECT. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#.

[R] Extracting Data from SQL Server

2012-01-09 Thread dthomas
Hi, I am new to R (and rusty on SQL!) and I'm trying to extract records from a SQL server database. I have a table of patient records (LoadPUS) which have three code columns which i want to evaluate against a list of particular codes (CVD_ICD$ table). Given the size of the patient table I want to