Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Variable in SQL Server sproc
Message
De
11/06/2005 19:54:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Table Variable in SQL Server sproc
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01022528
Message ID:
01022528
Vues:
56
Is it possible to reference a table variable's columns directly in an sproc? My code:
DECLARE @OldData TABLE
	(ind_title VARCHAR(255) NOT NULL, 
	ind_bps_hms_id_other VARCHAR(50) NOT NULL, 
	ind_title_alternate TEXT NOT NULL, 
	ind_rationale TEXT NOT NULL, 
	ind_primary_reference TEXT NOT NULL)

-- Get old values currently in DB:
INSERT INTO @OldData 
	SELECT 
		ind_title, 
		ind_bps_hms_id_other, 
		ind_title_alternate, 
		ind_rationale, 
		ind_primary_reference 
		FROM Indicators 
		WHERE ind_pkey = @ind_pkey

-- It seems logical to be able to now reference the columns as @OldData.< some column >
-- but that doesn't seem to work.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform