Make your own free website on Tripod.com

 

 
MANUAL DE SQL
   

 

FUNCIONES

En Sql Existen un sin numero de funciones Aqui le presentamos algunas de ellas

print "Augusto Afán Medrano"
print upper ("Augusto Afán Medrano")
print lower ("Augusto Afán Medrano")
print left ("resultado", 4)
print right ("resultado" ,4)
print substring ("funciones",3,4)
print len("camionero")
print char (65)
print ascii("H")
print getdate()
print month(getdate())
print month('26/08/2003')
print year(getdate())
print day(getdate())
print datepart(year, getdate())
print datepart(weekday, getdate())
print datepart(week ,'31/12/2003')
print datepart(hour, getdate())print datepart(minute, getdate())
print+"Son Las " + cast (datepart (hour, getdate())as varchar(2)) +"horas con " + cast (datepart(minute,getdate())as varchar(2))+ "Minutos"
print" Hoy es " + cast (datepart(day,getdate())as varchar(2))+"-" + cast(datepart(month,getdate())as varchar(2))+"-"+ cast (datepart(year,getdate())as varchar(5))
print datename(month,getdate())
print datename(day,getdate())
print datename(year,getdate())
print datename(weekday,getdate())
print "la fecha de hoy es "+ datename(day,getdate())+" de "+ datename(month,getdate())+" del "+ datename(year,getdate())

print cast(left(datepart(second,getdate()),1)AS INT)+cast(right(datepart(second,getdate()),1)AS INT)+
cast(left(datepart(MINUTE,getdate()),1)AS INT)+cast(right(datepart(MINUTE,getdate()),1)AS INT)+
cast(left(datepart(HOUR,getdate()),1)AS INT)+cast(right(datepart(HOUR,getdate()),1)AS INT)


print lower (left (datename (weekday,getdate()),3))+upper (right (datename (weekday,getdate()),2))

print upper(left(datename(month,getdate()),3))+lower(right(datename(month,getdate()),2))

print "Usted debe pagar su Pension en"+" "+cast(dateadd(day,18,getdate())as char)+"!Gracias!!!"

 

 

 

Inicio

Bases De Datos-------Funciones------Procedimientos Almacenados------Consultas

©Copyrigth 2003 Todos los Derechos Reservados
Maria Afan Medrano
E-mail: mariaafan@hotmail.com
Av.Iquitos 1391
Lima- Peru