Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert into SQL with a '
Message
De
22/08/2019 12:06:25
 
 
À
22/08/2019 12:02:25
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01670208
Message ID:
01670254
Vues:
55
>> "Present all solutions" is a bad idea, in my opinion. I can think of a lot scenarios where I can easily present 10-20 solutions, but why should I? The one who asks usually wants the best and/or the most flexible solution.
>
>I guess we will have to vehemently agree to disagree (and I am glad you were never one of my teachers in school!).
>
>If someone asked for the fastest way to get their SQL INSERT working SQL Sever Management Studio, and all they had to do is add an apostrophe, I wouldn't instruct them on how to use TRANSACT-SQL parameters and tell them it is the _only_ way to perform the task at hand. Using params in SSMS is simple enough, but if someone is in a hurry, why not tell them the fastest way to do what they want and then additionally discuss alternate (i.e. better) ways of doing things? Isn't that the best of both worlds -- helpful and educational at the same time?
>
>It's not my job to force other people to use best practices (I would be fired from my job if I tried, in fact) -- they have to come to terms with that on their own. In the meantime I will always provide everything I can in an answer. Within reason, obviously. I am not going to write 20 routines using all the different looping structures, for example. I am not talking about teaching syntax and/or basic programming tips. This question was very specific, and there aren't 20 ways to do it unless you just want to name the parameters something else...
>
>Thanks,
>Joe Kaufman

From all the books I have read, and that's a lot, using ?parameter has always been mentioned as the "correct" solution. However, you are free to use whatever solution you prefer.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform