Monday, December 31, 2018

Connect a SQL Server database to your workbook

How to Connect excel With a SQL Server database?

Solution :

In Office 2017, Go to Excel > Data >From Other Sources > From SQL Server 

See Following Figure 1.1

See Following Figure 1.2

1. Server Name : Enter here Instance Name of SQL 2014

2. Log on Credentials: here you have to choice

 [a] Use Windows Authentication : Excel connect with server admin login

 [b] Use the following user Name and password
User Name : sa
Password :xxxxxxxxx

See Following Figure 1.3


See Following Figure 1.4

 

See Following Figure 1.5

 

See Following Figure 1.6

 

Now As per View Procedure you will get Result on your excel file. if you like to Compare "excel data" with SQL view Procedure, run "Select * from <ViewProcedureName>,

E.g. "select * from Exporttoexcel_2018, as per documentation


How to Create View Procedure 

Example1

CREATE VIEW [Brazil Customers] AS
SELECT CustomerName, ContactName
FROM Customers
WHERE Country = "Brazil";



 

No comments:

Post a Comment

How to Generate Bill from Debit Note?

Q : How to Generate Bill from Debit Note? Solution : Follow below steps for Generate " Bill" from Debit Note Step No. 1   In Debit...