Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement