Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql fields with spaces in column name
Message
 
À
29/12/2008 14:01:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01369972
Message ID:
01369975
Vues:
7
This message has been marked as the solution to the initial question of the thread.
>Hello,
>
>I'm trying to interface to Sage's ACT!. Yeah, woe is me.
>
>Anyways. There are some fields in there that look like: CONTACT OPPORTUNITY CONTACTID
>
>Obviously, this confuses me, but I figured I'd try to SQL it anyways with ADO.
>
>cSQL = [select * from VRP_CONTACT where CONTACT CONTACTID = "] + crsrs.contact_opportunity_contactid + ["]
>
>This confuses ADO too, so I'm not alone.
>
>I tried using just contactid and contact_contactid.
>
>Nothing seems to go. Any ideas?

If that is using standard SQL Server syntax, then you should be using something like..

cSQL = "select * from VRP_CONTACT where [CONTACT CONTACTID] = '" + crsrs.contact_opportunity_contactid + """

Brackets around identifiers are SQL Server's way of handling illegal names.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform