Skip to content

Commit 159b70a

Browse files
author
jonsan21
committed
Script updated
1 parent e24045d commit 159b70a

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

7.Reading from SQL Databases/Reading from SQL Databases.R

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#Reading from SQL databases}
22

33
library(RODBC)
4+
45
connStr <- paste(
56
"Server=msedxeus.database.windows.net",
67
"Database=DAT209x01",
@@ -25,42 +26,6 @@ if(.Platform$OS.type != "windows"){
2526

2627
conn <- odbcDriverConnect(connStr)
2728

28-
\end{itemize}
29-
\end{itemize}
30-
\end{frame}
31-
32-
33-
\begin{frame}[fragile]%%\linespread{0.9}
34-
\frametitle{Connecting to a local SQL Database on your harddisk:}
35-
\begin{itemize}
36-
\item Replace server name with the SQL server name on the local machine;
37-
38-
\item With the default SQL installation, this is equal to the {\bf name of the local machine}:
39-
40-
41-
\begin{Sinput}
42-
>connStr <- paste(
43-
+ "Server=My_Machine",
44-
+ "Database=DAT205x01",
45-
+ "uid=PBIlogin",
46-
+ "pwd=P@ssw0rd",
47-
+ "Driver={SQL Server}",
48-
+ sep=";"
49-
+ )
50-
51-
connStr <- paste(
52-
"Server=msedxeus.database.windows.net",
53-
"Database=DAT209x01",
54-
"uid=PBIlogin",
55-
"pwd=P@ssw0rd",
56-
"Driver=FreeTDS",
57-
"TDS_Version=8.0",
58-
"Port=1433",
59-
sep=";"
60-
)
61-
62-
conn <- odbcDriverConnect(connStr)
63-
6429
#A first query
6530

6631
tab <- sqlTables(conn)

0 commit comments

Comments
 (0)