Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find a shorter text on a longer column?
Message
De
12/12/2006 13:36:24
 
 
À
12/12/2006 13:29:49
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01176930
Message ID:
01176939
Vues:
10
>>You can use LIKE operator. It's optimizable as long as it doesn't start with wildcard character.
>>WHERE trandate LIKE LEFT(myexceldate,10) + '%'
>>
>
>
>Great! I'll try that.
>
>I was dreading having to go back to the client to have them resend the data with all info (which they may not even have). And I certainly modify structure and create another column and populate it with only left(10). We'll see how it goes and what speed do I get. I have to look for about 2000 transactions out of 41 mill.
>
>Thanks.
>
>PS: Would SQL syntax be:
>
>... " AND trandate LIKE '" + LEFT(myexceldate,10) + "%'"
>
Where you write this?
In QA no, if you write it in VFP program or IDE, yes.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform