0

When I get data from SQL Server ,

It asks me database(optional) but I cant skip it.

example query below

select 
 *
from example1.dbo.table1  CP 
inner join example2.dbo.table2 CC on CC.exampleId=CP.Id
inner join example3.dbo.table3 CT on CC.Id=CT.exampleId
where B.Id='" & Id & "' and CP.Id in
(
select xId from example1.dbo.table1 
where Id='" & Id & "'
)

So I need to join 3 tables from 3 database. BTW I know server and I have admin account. With a single admin account I can connect that 3 database.

I tried import mode, It asks me database. When I write one of that 3 database name into that place,

Details: "Microsoft SQL: The target principal name is incorrect.  Cannot generate SSPI context.

How can I solve that problem.

bestpro
  • 5
  • 3

2 Answers2

0

You can find additional details on that specific error here

When you connect to the SQL Database make sure you are selecting the correct authentication mechanism. Windows is for your network login and password. Database is for a SQL username and password and Microsoft account is for an Azure AD account (e.g. what you would use to log in to Exchange Online or Office 365).

enter image description here

Murray Foxcroft
  • 12,785
  • 7
  • 58
  • 86
0

I used OLE DB mode Instead of SQL Server - Import to solve the problem.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
bestpro
  • 5
  • 3