Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to contruct a query using SQL alone and nothing else

Status
Not open for further replies.

Clipper2000

Programmer
Nov 28, 2004
54
US
By that I mean:

First, I believe that SQL is a universal language, although different vendors can adapt the language and make some minor adjustments to it to better suite a particular development platform, i.e., Access, SQL server etc.

When I code a query in Access, I may use Access SQL, as well as some VBA functions within the query code to return me the desired result.

However, if I'm going for an interview for a SAS SQL position, and I don't know SAS. Well, could I not just use SQL alone?

What I am trying to convey is: a good SQL programmer can structured his queries (i.e., via different aliases etc) in a way that SQL alone can do all the work for you without using any user functions from a particular development platform. Is that possible?

 
Is that possible
Yes, if the goal is only to retrieve data without manipulation on it...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Your question suggests that there's something called "SQL" that is independent of a particular RDBMS vendor. In theory that's true ... there is a thing called the SQL Standard with various revisions like "SQL 89", "SQL 92". etc.

All well and good but the particular dialect of SQL that actually works on a given system is determined by the software vendor who may have selectively implemented "Standard" SQL in their product. By "Selectively" I mean that some features in the standard will be implemented; some will not; and almost every vendor has their own SQL extensions that are not part of the standard at all.

Just about all vendors (as PHV suggests) have implemented the standard "SELECT" syntax and that's more or less portable from one platform to another. Unfortunately being limited to just standard "SELECT" syntax doesn't give you very much power. For that you will need to come up to speed on the extensions and functions that the vendors have implemented.
 
simple example: select all rows where the date column value is within the next 30 days

try doing that with standard sql and let's see which databases support the syntax

hint: microsoft products don't, oracle doesn't, ibm udb doesn't...



rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (course starts January 9 2005)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top