Solved

what is .. in sql

Posted on 2008-10-29
7
197 Views
Last Modified: 2012-05-05
Hello Experts,

What is ".." in SQL?

Thanks,
Wayne
0
Comment
Question by:thewayne73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831116
you refer to 4-part-notation

see some variations on how to specify the table you want to query, specifying the table owner, database, linked server name, all optional.

SELECT * FROM table
SELECT * FROM table_owner.table
SELECT * FROM database.table_owner.table
SELECT * FROM database..table
SELECT * FROM linked_server.database.table_owner.table
SELECT * FROM linked_server.database..table
SELECT * FROM linked_server...table

Open in new window

0
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 total points
ID: 22831117
it is use to omit the schema name of an object...so, this:

select * from databasename.schemaname.tablename

can be written (if the schemaname is dbo) as

select * from databasename..tablename

you're just leaving out the schema name
0
 
LVL 16

Expert Comment

by:brad2575
ID: 22831118
you need to be more specific.

Where at are you referring to this?  In a query?  In a table name path definition?

0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 60

Expert Comment

by:chapmandew
ID: 22831125
angelIII, can you do this? (ive never tried it, but it doesn't make sense that you can)

SELECT * FROM linked_server...table
0
 

Author Closing Comment

by:thewayne73
ID: 31511172
Perfect explaination.  Thanks.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831249
>angelIII, can you do this? (ive never tried it, but it doesn't make sense that you can)
>SELECT * FROM linked_server...table

yes. the default database of the login used will be "used" implicitly
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22831264
also, some "linked server" (like oracle) do not have the "concept" of "instance/database", but just database, so that part of "database" must be left empty.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Search query matching words 20 48
Replication failure 1 31
SQL Query Returns Records in SSMS but not Classic ASP 5 47
Error in sql query statment. 21 70
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question