Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Bases";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Good people help with the stored procedure. Find similar branches


Rev   (2001-12-03 12:19) [0]

Можно ли написать хранимую процедуру,
которая будет возвращать ГОД (2001)
(ГОД типа CHAR(4) или INTEGER)
при входящем параметре (ADate DATE).
Срочно надо.



Romkin   (2001-12-03 12:48) [1]

http://ib.demo.ru/DevInfo/Datetime.txt
Странно, предыдущий ответ испарился..



Женька   (2001-12-03 12:49) [2]


CREATE PROCEDURE YearFromDate (
aDate DATE)
RETURNS (
nYear INTEGER)
AS
BEGIN
FOR
select EXTRACT(year from :aDate) from rdb$database INTO :nYear
DO
BEGIN
SUSPEND;
END
END



Alexandr   (2001-12-04 08:45) [3]

2Женька:
Это что, прикол?
CREATE PROCEDURE YearFromDate (
aDate DATE)
RETURNS (
nYear INTEGER)
AS
BEGIN
select EXTRACT(year from :aDate) from rdb$database INTO :nYear
Suspend;
END

it's easier.
Кстати, это только для IB6 и Firebird



yuger   (2001-12-05 12:09) [4]

Гм.. Странно.
У меня доже под Firebird-ом не проходит такой синтаксис.
Пишет:
Token Unknown - line 7, char 21
from



Pages: 1 whole branch

Forum: "Bases";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.82 MB
Time: 0.028 c
1-22175
voyager
2001-12-20 16:06
2002.01.08
about hint


1-22177
Cutting
2001-12-21 09:38
2002.01.08
Why do not work bryaki in


6-22309
Dense
2001-10-10 19:02
2002.01.08
There is a NETWORK CARD without a passport, sealed up!


14-22411
Madburro
2001-11-12 20:52
2002.01.08
WinXP cd-key


1-22007
creepster
2001-12-17 18:09
2002.01.08
screen saver





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish