Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
SQL, DB, TBL, FLD |
Mon, Feb 4 2008 3:52 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
I'm working on altering my code generator and I want to make 100% sure I know what is and isn't allowed so if you can correct any mistakes I'd be pleased. SELECT DB.TBL.FLD - not allowed TBL.FLD - ok alias.FLD - ok FLD - ok FROM DB.TBL - ok TBL - ok JOIN DB.TBL - ok TBL - ok GROUP BY DB.TBL.FLD - not allowed TBL.FLD - ok alias.FLD - ok FLD - ok ORDER BY DB.TBL.FLD - not allowed TBL.FLD - ok alias.FLD - ok FLD - ok Roy Lambert |
Mon, Feb 4 2008 3:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< I'm working on altering my code generator and I want to make 100% sure I know what is and isn't allowed so if you can correct any mistakes I'd be pleased. >> Here's a simple rule to use in order to remember for DML (SELECT, INSERT, UPDATE, DELETE): Table references in the FROM and JOIN clauses - [Database.][Schema.]Table Column references elsewhere - [Table.]Column (Table could also be a correlation name as specified in the statement's FROM clause) Any other type of DDL operation only permits table and column references, where applicable. IOW, if a database reference or name is required (BACKUP, RESTORE), then of course it can be specified. However, CREATE TABLE cannot use a database or schema qualifier. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Feb 5 2008 2:32 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Can the correlation name be surrounded by "? Roy Lambert |
Tue, Feb 5 2008 7:15 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Can the correlation name be surrounded by "? >> Yes. A correlation name for a table or SELECT column is simply a replacement identifier for the purposes of the current statement. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, May 3, 2024 at 06:06 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |