[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

sql - Oracle db - syntax error

I have this bit of code and I am getting the following error msg - "Command not properly ended."
I've used seimicolon and without  - and got the same results.

what am I doing wrong?

Thanks in advance!
pandkyon
CREATE DATABASE LINK TIdatamart-QA.reportdb CONNECT TO reportdb IDENTIFIED BY reportdb USING 'repqa1'

Open in new window

0
pandkyon
Asked:
pandkyon
1 Solution
 
MilleniumaireCommented:
You can't have a dash in the link name, but your problem is that you need to put the link name in double quotes.  Try this:

CREATE DATABASE LINK "TIdatamartQA.reportdb" CONNECT TO reportdb IDENTIFIED BY reportdb USING 'repqa1'
 

Open in new window

0
 
Gibu GeorgeCTOCommented:
CREATE DATABASE LINK TIdatamart-QA.reportdb CONNECT TO reportdb IDENTIFIED BY 'reportdb' USING 'repqa1'
0
 
pandkyonAuthor Commented:
perfect!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now