s-news
[Top] [All Lists]

Re: Database connectivity

To: Arjun Bhandari <arjun_bhandari@yahoo.com>
Subject: Re: Database connectivity
From: roger bos <roger.bos@gmail.com>
Date: Thu, 9 Jun 2005 09:10:06 -0400
Cc: s <s-news@lists.biostat.wustl.edu>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rSyzf9oGju8YmS55a7ph983byEtyhkbpU0mrpSS1vHAWLVJT+GCmQJqHyey6fxlpy6+IurjVBx7zZQ+gEjBSDoHwxBt2laSOEffaaRejnVikxngicdABLOTgopNiOvhytc7P3DK5wyWDh3JtNYW3gyRbCXLpBZF/6qmfPxGIB8c=
In-reply-to: <20050608200453.68959.qmail@web50609.mail.yahoo.com>
References: <20050608200453.68959.qmail@web50609.mail.yahoo.com>
Reply-to: roger bos <roger.bos@gmail.com>
S+ has a native SQL Server driver, so it should be pretty easy.  Here
is some code I used on version 6.2 to connect to a database on a
server.  Since your running the database on the local machine you will
have to adjust that, but I am not sure how.

sqlText <- paste("select trt, datadate from roger_return_1m where
gvkey='",gvkey,"' order by datadate",sep="")

output <- importData(type="DIRECT-SQL", user="xfl", password="xfl",
server="rinnycs0059", database="xf", table="", sqlQuery=sqlText)

HTH,

Roger



On 6/8/05, Arjun Bhandari <arjun_bhandari@yahoo.com> wrote:
> Hi,
> 
> I have an sql server running on my machine, but when I
> try to use the import data feature to import from one
> of the databases i have created on the server, i
> cannot see the database. is there any change that
> needs to be done to the settings such that i can see
> that database and write sql queries on the tables in
> that database.
> 
> I am using s+ version 6.2
> Best Regards,
> Arjun
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
>

<Prev in Thread] Current Thread [Next in Thread>