Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
14Activity
0 of .
Results for:
No results containing your search query
P. 1
Proceduri stocate exemple

Proceduri stocate exemple

Ratings: (0)|Views: 1,257 |Likes:
Published by Cosmina B
BAZE DE DATE AVANSATE - SQL SERVER 2008
BAZE DE DATE AVANSATE - SQL SERVER 2008

More info:

Categories:Types, School Work
Published by: Cosmina B on Feb 02, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

07/12/2013

pdf

text

original

 
PROCEDURI STOCATE
EXEMPLE
1
 
Tabelele utilizate pentru exemple:
2
 
Exemplu cu variabile de memorie
Cerin
ţă
:
In tabelul
 Angajati 
exist
ă pentru fiecare salariat
DataAngajare
 
şi
DataPlecare
în/din firma. Realiza
ţi oprocedură stocată cu parametru pentru a vizualiza pentru o anumită persoană (CNP
-ul transmis ca parametru),care au fost angaja
ţii care au lucrat în firmă în perioada cu respectivul angajat.
 
CREATE PROC EXEMPLU1@cnp AS CHAR(13) ASDECLARE @Data1 AS datetimeDECLARE @Data2 AS datetimeset @Data1= (select DataAngajare From Angajati WHERE CNP=@cnp)set @Data2= (select DataPlecare From Angajati WHERE CNP=@cnp)SELECT NUME, DataAngajare, DataPlecareFROM ANGAJATIWHERE DataAngajare BETWEEN @Data1 AND @Data2or DataPlecare BETWEEN @Data1 AND @Data2or @Data1 between DataAngajare and DataPlecare
Se memorează
 
data angajării şi data plecării
angajatului in 2 variabileSalariatii veniti in intervalul incare a lucrat angajatulSalariatii plecati in intervalulin care a lucrat angajatulSalariatii veniti inainteaangajatului si plecati dupaplecarea acestuia
3

Activity (14)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
logy99 liked this
Ionutz Guguye liked this
Antoniu Mihaela liked this
C_O_D2006 liked this
OtiliaL liked this
diddy_toma liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->