General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Using field aliases in remote views
I am writing an application that will link into an accounting package. In order to give my application the flexibility to run using different packages, I am trying to use remote views. I have created the ODBC link okay through to the datasource, created a connection to the datasource and then created a view using the connection. A sample of the code trying to extract basic details from the STOCK file is as follows:
CREATE CONNECTION conn1 DATASOURCE 'anydata'
CREATE VIEW vewtester CONNECTION conn1 AS ;
SELECT stStockCode AS stockref, ;
stDesc1 AS stockdesc, ;
stStockType AS stocktype, ;
stStkValType AS valuation ;
FROM Stock
This returns the data okay but it is not using the 'as' field names I am specifying, the fields are all returned using the original field names.
Does anyone know what I am doing wrong.
Thanks
Sue
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only