Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL statement
Message
De
24/08/2005 20:40:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/08/2005 13:36:16
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Versions des environnements
Environment:
C# 1.1
Database:
MS SQL Server
Divers
Thread ID:
01043492
Message ID:
01043662
Vues:
8
>In my VFP applications, I join fields together in many of my SQL statements using a VFP table. As such:
>
> SELECT mytable.field1, ALLTRIM(mytable.field2) + "-" + ALLTRIM(mytable.field3) AS mycolumn FROM mytable INTO CURSOR c_mycursor
>
>Is there any way to do something like this using Asp.Net and SQL Server?
>
>Thanks,
>
>Jerry

By the way, in VFP it is not a good idea to use variable-sized fields in a SELECT statement; VFP might choose a field without data to determine the total field length for the (fixed-size) result. You have to move spaces to the end, for example:
select ..., padr(alltrim(Field2) + "-" + alltrim(Field3), 30), ...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform