Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Guidance please
Thu, Apr 26 2007 11:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

I'm altering my query generator to use TMS and ElevateDB. Can you tell me where it is permissible to use qualifiers

eg

select information.tablecolumns.name,information.tablecolumns.type,information.tablecolumns.collation
from information.tablecolumns
WHERE tablename = 'MandN'

================================================================================
SQL Error (ElevateDB 1.02 Build 1)
================================================================================

ElevateDB Error #700 An error was found in the statement at line 1 and column 32
(Expected FROM but instead found .)



Roy Lambert
Thu, Apr 26 2007 12:46 PMPermanent Link

"Harry de Boer"
Roy

select tablecolumns.name,tablecolumns.type,tablecolumns.collation
from information.tablecolumns WHERE tablename = 'MandN'

should do the trick.

Regards, Harry

"Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht
news:BF59246D-7F1B-4721-BCC5-B71E528DA245@news.elevatesoft.com...
> Tim
>
> I'm altering my query generator to use TMS and ElevateDB. Can you tell me
where it is permissible to use qualifiers
>
> eg
>
> select
information.tablecolumns.name,information.tablecolumns.type,information.tabl
ecolumns.collation
> from information.tablecolumns
> WHERE tablename = 'MandN'
>
>
============================================================================
====
> SQL Error (ElevateDB 1.02 Build 1)
>
============================================================================
====
>
> ElevateDB Error #700 An error was found in the statement at line 1 and
column 32
> (Expected FROM but instead found .)
>
>
>
> Roy Lambert

Thu, Apr 26 2007 1:10 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Harry


Thanks, but rather than this specific case I'm after guidance for all scenarios. To better explain

select tc.name,tc.type,tc.collation
from information.tablecolumns tc WHERE tablename = 'MandN'

works and in my jaundiced worldview its the same as the one I just posted.

The idea is that I'll be producing code from a simple grid that the user can select stuff from so to build the sql I have to take account of selects, from (inc joins), order, where clauses etc so I have to know what's useable where not just in a specific case.

Roy Lambert
Thu, Apr 26 2007 2:36 PMPermanent Link

"Harry de Boer"
Roy,

I see. Well, it seems that 'select name from information.tablecolumns' is
also working. If I look at the Query Plan it seems that the 'information.'
part is not allowed in the <SelectColumn> = <ColumnExpression> [AS
<ColumnCorrelationName>] part of the query.

You can use the databasename however:
select name from northwind.information.tablecolumns where tablename =
'customers'

Regards, Harry

"Roy Lambert" <roy.lambert@skynet.co.uk> schreef in bericht
news:2B2DDAB4-557F-4D29-B557-82F004A86E51@news.elevatesoft.com...
> Harry
>
>
> Thanks, but rather than this specific case I'm after guidance for all
scenarios. To better explain
>
> select tc.name,tc.type,tc.collation
> from information.tablecolumns tc WHERE tablename = 'MandN'
>
> works and in my jaundiced worldview its the same as the one I just posted.
>
> The idea is that I'll be producing code from a simple grid that the user
can select stuff from so to build the sql I have to take account of selects,
from (inc joins), order, where clauses etc so I have to know what's useable
where not just in a specific case.
>
> Roy Lambert
>

Fri, Apr 27 2007 8:56 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I'm altering my query generator to use TMS and ElevateDB. Can you tell me
where it is permissible to use qualifiers >>

You can use database name qualifiers and/or schema name qualifiers for any
table reference in a SELECT statement.  You can only use table name or table
correlation name qualifiers for column references.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image