[firebird-support] Unsuccessful execution on delete FB 3 SP source code

2019-06-13 Thread 'Mr. John' mr_joh...@yahoo.com [firebird-support]
Using FB 3.0.4/Windows 10x64 ,I'm trying to delete SP source code as worked in 
2.5:      UPDATE RDB$PROCEDURES SET RDB$PROCEDURE_SOURCE = NULL WHERE 
RDB$SYSTEM_FLAG IS NULL  OR RDB$SYSTEM_FLAG=0;
bun now on FB 3 tried:
update RDB$PROCEDURES set rdb$procedure_source = NULL where 
rdb$procedure_nameSTARTING WITH 'MYPR_'
and got Unsuccessful execution caused by a system error that precludes 
successful execution of subsequent statements.UPDATE operation is not allowed 
for system table RDB$PROCEDURES.
that seems to be fixed:  [#CORE-4507] Unable delete procedure source on 
Firebird 3.0 Alpha 2.0 - Firebird RDBMS Issue Tracker

| 
| 
| 
|  |  |

 |

 |
| 
|  | 
[#CORE-4507] Unable delete procedure source on Firebird 3.0 Alpha 2.0 - ...


 |

 |

 |



Dmitry Yemanov 
"The ability to explicitly set the source code to NULL is restored. All other 
kinds of direct modifications are still prohibited"

but not workingthanks for any help

[firebird-support] Re: Unsuccessful execution on delete FB 3 SP source code

2019-06-13 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
13.06.2019 13:43, 'Mr. John' mr_joh...@yahoo.com wrote:

> Using FB 3.0.4/Windows 10x64 ,I'm trying to delete SP source code as 
> worked in 2.5:
>        UPDATE RDB$PROCEDURES SET RDB$PROCEDURE_SOURCE = NULL WHERE 
> RDB$SYSTEM_FLAG IS NULL  OR RDB$SYSTEM_FLAG=0;
> 
> bun now on FB 3 tried:
> 
> update RDB$PROCEDURES set rdb$procedure_source = NULL where 
> rdb$procedure_name
> STARTING WITH 'MYPR_'
> 
> and got
> Unsuccessful execution caused by a system error that precludes 
> successful execution of subsequent statement s.
> UPDATE operation is not allowed for system table RDB$PROCEDURES.

Try adding one more condition to your WHERE clause:

   (...) and RDB$PROCEDURE_SOURCE is not null


Dmitry




[firebird-support] CTE, tricky request

2019-06-13 Thread 'Check_Mail' check_m...@satron.de [firebird-support]
Hello,

 

I would like to generate a list with appointments. 

 

In a table tkal_main I set the day (field "t") of the meeting, every month I
would like to get an entry. The description of the appointment is "bez".

 

I helps me with a separate table (tmonate, id 1 = January and so on). 

 

With cte.(

Select other termins

Union all

select cast(a.t || '.' || b.id || '.' || extract(year from current_date) as
timestamp) as ts, a.bez from tkal_main a, tmonate b)

select ts, bez from kal where ts >= current_date and ts < current_date +
:vorschau order by ts into :datum, bez do

 

Vorschau is an integer with days in the future I would show, from tomorrow
to tomorrow + x (vorschau) days

 

Now I get a List of appointments, but if I would get a month of the next
year, the "year from current_date" is the problem.

 

Example:

Day 10 of every Month, today is the 13.06.2019, Vorschau = 365 days I would
get:

 

10.07.2019

10.08.2019

...

10.06.2020

 

At the time I get only til this December. And I have non indexed reads for
table tmonate, because there is no relation. How can I make it better? With
a List instead of the table tmonate? 

 

Thank you.

 

Best regards

 

Olaf



AW: [firebird-support] CTE, tricky request

2019-06-13 Thread 'Check_Mail' check_m...@satron.de [firebird-support]
...perhaps a solution?

 

  union all

  select cast(a.t || b.str as timestamp) as ts, a.bez from tkal_main a,
sub_datum(:vorschau) as b where a.serie = 2

 

create procedure SUB_DATUM (

days integer)

returns (

str varchar(8))

as

declare variable c_date timestamp;

declare variable t_date timestamp;

declare variable temp_date timestamp;

begin

c_date = current_date;

t_date = current_date + days;

temp_date = c_date;

  while (temp_date < t_date) do

  begin

str = '.' || lpad(extract(month from temp_date),2,'0') || '.' ||
extract(year from temp_date);

suspend;

temp_date = temp_date + 30;

  end

end

 

it works..

 

 

Von: firebird-support@yahoogroups.com  
Gesendet: Donnerstag, 13. Juni 2019 16:36
An: firebird-support@yahoogroups.com
Betreff: [firebird-support] CTE, tricky request

 

  

Hello,

 

I would like to generate a list with appointments. 

 

In a table tkal_main I set the day (field "t") of the meeting, every month I
would like to get an entry. The description of the appointment is "bez".

 

I helps me with a separate table (tmonate, id 1 = January and so on). 

 

With cte.(

Select other termins

Union all

select cast(a.t || '.' || b.id || '.' || extract(year from current_date) as
timestamp) as ts, a.bez from tkal_main a, tmonate b)

select ts, bez from kal where ts >= current_date and ts < current_date +
:vorschau order by ts into :datum, bez do

 

Vorschau is an integer with days in the future I would show, from tomorrow
to tomorrow + x (vorschau) days

 

Now I get a List of appointments, but if I would get a month of the next
year, the "year from current_date" is the problem.

 

Example:

Day 10 of every Month, today is the 13.06.2019, Vorschau = 365 days I would
get:

 

10.07.2019

10.08.2019

...

10.06.2020

 

At the time I get only til this December. And I have non indexed reads for
table tmonate, because there is no relation. How can I make it better? With
a List instead of the table tmonate? 

 

Thank you.

 

Best regards

 

Olaf





Re: [firebird-support] Re: Unsuccessful execution on delete FB 3 SP source code

2019-06-13 Thread 'Mr. John' mr_joh...@yahoo.com [firebird-support]
 no error now
thanks


On Thursday, June 13, 2019, 4:41:12 PM GMT+3, Dmitry Yemanov 
dim...@users.sourceforge.net [firebird-support] 
 wrote:  
 
     
13.06.2019 13:43, 'Mr. John' mr_joh...@yahoo.com wrote:

> Using FB 3.0.4/Windows 10x64 ,I'm trying to delete SP source code as 
> worked in 2.5:
>       UPDATE RDB$PROCEDURES SET RDB$PROCEDURE_SOURCE = NULL WHERE 
> RDB$SYSTEM_FLAG IS NULL  OR RDB$SYSTEM_FLAG=0;
> 
> bun now on FB 3 tried:
> 
> update RDB$PROCEDURES set rdb$procedure_source = NULL where 
> rdb$procedure_name
> STARTING WITH 'MYPR_'
> 
> and got
> Unsuccessful execution caused by a system error that precludes 
> successful execution of subsequent statement s.
> UPDATE operation is not allowed for system table RDB$PROCEDURES.

Try adding one more condition to your WHERE clause:

(...) and RDB$PROCEDURE_SOURCE is not null

Dmitry