Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored procedures and MS SQL or PostgreSQL
Message
De
21/12/2018 17:41:44
 
 
À
21/12/2018 17:24:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01664815
Message ID:
01664816
Vues:
69
If I'm understanding your question correctly, stored procs are written in some form of SQL or T-SQL and look amazingly like what you're used to with VFP, with some minor 'packaging' around them.

USE [database]

(Create)
ALTER PROCEDURE [dbo].[ProcName]
@UserName varchar(25),
@Name varchar(75) output,
@Phone varchar(15) output,
@Ext varchar(10) output,
@Email varchar(100) output

AS
BEGIN
SET NOCOUNT ON;
select @Name = ltrim(rtrim(first_name)) + ' ' + ltrim(rtrim(last_name)),
@Phone = substring(Phone,1,3) + '-' + SUBSTRING(Phone, 4,3) + '-' + substring(phone,7,4),
@Ext = Ext,
@Email = email
from tablename
where UserName = @UserName

END

That's a very simple stored proc. Others can get quite involved


>Kinda a random question but it has crossed my mind as I have worked through the many posts - what are stored procedures written in when they are contained within SQL Server or PostgreSQL server? I would assume it is some sort of function call that runs some sort of script?
>
>Albert
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform