-support] CTE difficult question
Hi,
from your description i really do not know what is working for you and what is
not working.
And your expectation.
but to understand recursive CTE look at simple sample. Recursive CTE work
throught tree.
### metadata
Hi,
from your description i really do not know what is working for you and what is
not working.
And your expectation.
but to understand recursive CTE look at simple sample. Recursive CTE work
throught tree.
### metadata ###
CREATE TABLE TEST_T
A - D - Y, material: Y
Later I can build a sum from all materials, for example Z
Thank you.
Von: firebird-support@yahoogroups.com
Gesendet: Dienstag, 12. November 2019 14:23
An: firebird-support@yahoogroups.com
Betreff: AW: [firebird-support] CTE difficult question
Ist it pos
Ist it possible somehow?
I would get each Part and the complete Path for it. If the Part is a
material, I would get it and the complete list with all parts from the first
til the material itself.
Thanks.
Hello,
I have the following situation:
There are some parts wit
Hello,
I have the following situation:
There are some parts with parts inside
Part A has Part B inside
Part A has Part C inside
Part B has BA inside
Part B has BB inside
Part BA has BAA inside
Part BA has also BAB inside
Part BB has BBA inside
Part C has CA inside
A
On 2019-08-12 11:53, 'Check_Mail' check_m...@satron.de
[firebird-support] wrote:
> Hello,
>
> I have created a CTE in a stored prodedure which gives me all terms of
> the next days, for example:
>
> 01.10.2019 Meeting with..
>
> 01.10.2019 Exkursion
>
> 02.10.2019 Termin
>
> 04.10.2019
ve the actually date
Thanks, it should work and it is okay.
Best regards
Olaf
Von: firebird-support@yahoogroups.com
Gesendet: Montag, 12. August 2019 15:04
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] CTE Spaces between every day
Maybe you cou
port@yahoogroups.com
>
> *Gesendet:* Montag, 12. August 2019 12:17
> *An:* firebird-support@yahoogroups.com; 'Check_Mail' check_m...@satron.de
> [firebird-support]
> *Betreff:* Re: [firebird-support] CTE Spaces between every day
>
>
>
>
>
> Hi,
>
record and the new one. I thought,
there is a simplier way.
Thank you.
Von: firebird-support@yahoogroups.com
Gesendet: Montag, 12. August 2019 12:17
An: firebird-support@yahoogroups.com; 'Check_Mail' check_m...@satron.de
[firebird-support]
Betreff: Re: [firebird-support] CTE Spac
Hi,
simply add loop inside
do
begin
suspend;
--put here some loop
while something do
begin
--modify output variables here
suspend;
end
end;
regards,
Karol Bieniaszewski
Hello,
I have created a CTE in a stored prodedure which gives me all terms of the
next days, for example:
01.10.2019 Meeting with..
01.10.2019 Exkursion
02.10.2019 Termin
04.10.2019 Termin XX
Now I would set between every day a blank record, a kind of space.
01.10.2019 Me
ear 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
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).
Wit
Thanks a lot Mark !
>Your problem has nothing to do with CTEs, you are combining implicit
> (SQL-89) joins and explicit (SQL-92) joins, and referencing the
>implicitly joined table from the explicitly joined tables. The rules for
>these have changed in Firebird 3 to be compliant with the SQL
>
Your problem has nothing to do with CTEs, you are combining implicit
(SQL-89) joins and explicit (SQL-92) joins, and referencing the
implicitly joined table from the explicitly joined tables. The rules for
these have changed in Firebird 3 to be compliant with the SQL
specification and to avoid
Good afternoon.
Ive been assigned to debug a query that was working on 2.5 but stopped
workin on 3.0.
As of now I have little information on the context of where this query is
used, but Im assuming it might be something simple.
Apparently whats causing the error is using this FROM sintax
mytable.id and mytable.id +1 and
mytable.id is not null
...
regards,
Karol Bieniaszewski
From: Germán Balbi bal...@yahoo.com [firebird-support]
Sent: Monday, October 2, 2017 7:37 PM
To: Firebird-support
Subject: [firebird-support] CTE Recursive left join problem
Hello everyone
I'm hav
Hello everyoneI'm having a problem, and I do not understand why.I have a
structure similar to:
with recursive
aux as (
select 0 as n
from rdb$database union all select aux.n + 1
from aux
where aux.n <= 20
)
select aux.n, mytable.id
from aux
LEFT JOIN mytable on aux.n between
ups.com]
Gesendet: Dienstag, 2. Mai 2017 08:36
An: firebird-support@yahoogroups.com
<mailto:firebird-support@yahoogroups.com>
Betreff: AW: [firebird-support] CTE Question
Hi SET,
I would like to specify this:
Table A:
CREATE TABLE T_L_PRKOM_GRP (
ID_GRP INTEGER NOT NULL,
ID_KOM INTEG
Sorry, 3 categories = 3 layer
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Gesendet: Dienstag, 2. Mai 2017 08:36
An: firebird-support@yahoogroups.com
Betreff: AW: [firebird-support] CTE Question
Hi SET,
I would like to specify this:
Table A:
CREATE
-
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Gesendet: Freitag, 28. April 2017 22:17
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] CTE Question
Hi Olaf!
First, SQL doesn't like unknown columns, you need to know at least the
max
Hi Olaf!
First, SQL doesn't like unknown columns, you need to know at least the
maximum possible number of properties to support. Having said that, you
could try something like:
select B1.Property, B2.Property, B3.Property, B4.Property
from TableA A1
join TableB B1 on A1.ID = B1.ID_TableA
left
Hello,
in advance, many thanks!
I would like to combine all properties like this:
Property1 Property2 Property3
Property4..
IP54 Yellow With lamp 30W
IP20 Blue Without lamp
Hello everybody,
actually I have a stored procedure where I get the needet material for each
product, some of them I get many times. Now I would like to create A CTE and
gets the amount of each material.
In my case I call a stored procedure and those calls itself.
Here the example:
I've just this minute come across this again, with INSERT this time
rather than UPDATE.
For my current problem the following code does not give an error:
INSERT INTO ...
WITH CTE_X AS ( ... )
SELECT ... FROM CTE_X
WHERE ...
--
Tim Ward
Hello @ll,
thanks a lot! So many solutions J
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Im Auftrag von Svein Erling Tysvær
Gesendet: Mittwoch, 26. Februar 2014 13:00
An: firebird-support@yahoogroups.com
Betreff: RE: [firebird-support] CTE
>He
>Hello,
>
>I get an error message during executing the following statement:
>
>with mat as (
>select a.teilenr, c.vkpreis, a.matteilenr, c.bezeichnung from tmaterial a
>left join tteile c on a.teilenr = c.teilenr
>where a.kundennr = 24823 )
>update tteile set tteile.minvk = mat.vkpreis * 0.90 whe
On Wed, 26 Feb 2014 11:43:24 +0100, "checkmail"
wrote:
> Hello,
>
> I get an error message during executing the following statement:
>
> with mat as (
>
> select a.teilenr, c.vkpreis, a.matteilenr, c.bezeichnung from tmaterial
a
> left join tteile c on a.teilenr = c.teilenr
>
> where a.kunden
Yeah, I wanted to do this the other day (but found a different way to
structure the query so never got round to posting the question here).
The Firebird book contains what I found to be incomplete and
contradictory information on this point.
On 26/02/2014 10:43, checkmail wrote:
Hello,
I g
Hello,
I get an error message during executing the following statement:
with mat as (
select a.teilenr, c.vkpreis, a.matteilenr, c.bezeichnung from tmaterial a
left join tteile c on a.teilenr = c.teilenr
where a.kundennr = 24823 )
update tteile set tteile.minvk = mat.vkpreis * 0.90 wher
Hi,
I do not understand why
set planonly;
with recursive
CTE_CNT1 as (select 0 as I
from RDB$DATABASE
union all select I + 1
from CTE_CNT1
where I < 9),
CTE_CNT2 as (select I, 0 as J
from CTE_CNT1
union all select J * 10 + c1.I, c2.J + 1
from CTE_CNT1 c1
join
>My real problem/question is that I don't know the value of :FromMainTable
>until the main select attempts:
>
>LEFT JOIN MyCTE CTE ON MT.Afield = CTE.FromMainTable
>
>The simplest way to put my question would then be (though oversimplifying,
>probably leading to answers that doesn't work in the r
>Hello Set,
Hello Martijn!
>> WITH MyCTE AS
>> (SELECT CAST(:FromMainTable AS VarChar(5)) FromMainTable, Field1
>
>Wouldn't this be the value of Field2 then?
Sure, but that's not the problem (just a desparate workaround I attempted).
>> UNION
>> SELECT CAST(:FromMainTable AS VarChar(5)), Field1
Hello Set,
> Hi, I'm trying to use a CTE a bit differently from what I usually do, but
> am failing.
>
> WITH MyCTE AS
> (SELECT CAST(:FromMainTable AS VarChar(5)) FromMainTable, Field1
Wouldn't this be the value of Field2 then?
> FROM MySmallLookupTable
> WHERE Field2 = :FromMainTable
> UNION
Hi, I'm trying to use a CTE a bit differently from what I usually do, but am
failing.
WITH MyCTE AS
(SELECT CAST(:FromMainTable AS VarChar(5)) FromMainTable, Field1
FROM MySmallLookupTable
WHERE Field2 = :FromMainTable
UNION
SELECT CAST(:FromMainTable AS VarChar(5)), Field1
FROM MySmallLookupTabl
35 matches
Mail list logo