PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > What does it mean to SET a value?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
What does it mean to SET a value?

Réponse
 
LinkBack Outils de la discussion
Vieux 01/04/2008, 10h59   #1
steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut What does it mean to SET a value?

What does it mean to set a value or April fools all year long

http://beyondsql.blogspot.com/2008/0...set-value.html
  Réponse avec citation
Vieux 03/04/2008, 04h16   #2
Ed Murphy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What does it mean to SET a value?

steve wrote:

> What does it mean to set a value or April fools all year long
>
> http://beyondsql.blogspot.com/2008/0...set-value.html


The relevant portion of this article appears to be the following:

> In Sql when there are multiple rows that satisfy a
> a WHERE clause the variable is left undefined and an error generated:
>
> DECLARE @MyFrt MONEY;
> SET @MyFrt = (SELECT Freight FROM Orders WHERE OrderID<=10249);
> -- Subquery returned more than 1 value. This is not permitted when the subquery follows
> -- =, !=, <, <= , >, >= or when the subquery is used as an expression.
>
> This is really a valid logical operation, an attempt to set (assign) a table to a variable.
> This is precisely what D4 does:
>
> var MyFrt:=Orders where OrderID<=10249 {Freight};
>
> select MyFrt;
>
> Freight //A table.
> -------
> $11.61
> $32.38
>
> select MyFrt is table{Freight:Money};//Returns True confirming MyFrt is a table type.


But why not simply use a temporary table?

select Freight into #MyFrtTable from Orders where OrderID <= 10249

Your previous line of argument (explicit table-valued procedure
parameters, replacing implicit temp-table input/output and/or
SELECT/FROM-based output) was more compelling; my objection to it
was limited to D4 being an utter non-starter for the large number
of existing systems already implemented in SQL. This line of
argument, while understandable in principle, is less of a big deal.
  Réponse avec citation
Vieux 04/04/2008, 10h32   #3
steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What does it mean to SET a value?

Hello Ed,

>But why not simply use a temporary table?
>select Freight into #MyFrtTable from Orders where OrderID <= 10249


Though it's apples and oranges I confess I smiled when I saw your
suggestion

>This line of argument, while understandable in principle, is less of a big deal.


This is the heart of the matter. A system based on principles versus a
system based on arbitrary choices! I'm trying to show the advantages
of a system based on a comprehensive theory. That I have to make the
case for logic says something about the database world

Now that dataphor is back in development as an open source project:
http://www.dataphor.org
http://databaseconsultinggroup.com
http://databaseconsultinggroup.com/downloads/
I think you'll see some people build 'new' systems with it. Just where
these people will come from I'm sure. I hope some of them come from
the sql community. What is the problem with just moving on? Was MS
worried about the large number of existing sql systems when they were
developing LINQ? And dataphor represents a very viable alternative to
users considering LINQ

You comments are appreciated.

best,
steve
www.beyondsql.blogspot.com

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h30.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11786 seconds with 11 queries