Re: [firebird-support] Re: Checking if scripts ran correctly

2011-12-08 Thread Alexey Kovyazin
Hello Eduardo,


> > If you need detailed comparison and then create scripts to align 
> master and target structures, take a look at DB VCL suite from 
> clevercomponents.com
>
> And you are having a sale right now! I may need to see if Santa Claus 
> can help me on that price. Else, it will take a lot of drunks to roll :-))
>
> Guess I can write something that makes a back up of the various sites 
> and emails the file back so I can do the compare here if I get your tool.
>

Actually DBVCL is not IBSurgeon's tool, but we used it and its quality 
is good.

Regards,
Alexey Kovyazin
IBSurgeon



[Non-text portions of this message have been removed]



Re: [firebird-support] Is this a bug in firebird .net provider?

2011-12-08 Thread Mark Rotteveel
On Thu, 08 Dec 2011 13:53:43 -, "firebirdsql" 
wrote:
> I have a table with a timestamp column in Firebird 2.5. The format for
> timestamps in Firebird is dd-MM- hh:mm:ss:f (microseconds).
> 
> However, when the .net data provider is returning the column data, it
> doesn't send the microseconds.
> 
> example:
> using(FbDataReader reader = command.ExecuteReader())
> {
> throw new Exception(reader["timestamp_column"].ToString()); //Return
> the column data as a string to see what was sent back
> }
> 
> How can I get the microseconds (basically the exact data in the column)?

This question is probably better suited for the Firebird .NET provider
mailinglist. Are you sure that the datatype used in .NET actually has
millisecond (not microsecond) precision?

Mark


[firebird-support] Re: Checking if scripts ran correctly

2011-12-08 Thread Eduardo A
Well, Alexey,

> Hope all your databases run Ok now :)

They are OK now, thanks for asking. :-)  But next spring promises to be very 
interesting.

> Use isql -x to extract metadata and then compare their size and/or 
> contents with some text compare tool.


> If you need detailed comparison and then create scripts to align master and 
> target structures, take a look at DB VCL suite from clevercomponents.com

And you are having a sale right now!  I may need to see if Santa Claus can help 
me on that price.  Else, it will take a lot of drunks to roll :-))

Guess I can write something that makes a back up of the various sites and 
emails the file back so I can do the compare here if I get your tool.

Happy Holidays!

-Eduardo




Re: [firebird-support] Re: Is this a bug in firebird .net provider?

2011-12-08 Thread Mark Rotteveel
On Thu, 08 Dec 2011 14:27:27 -, "firebirdsql" 
wrote:
> --- In firebird-support@yahoogroups.com, Mark Rotteveel 
wrote:
>>
>> On Thu, 08 Dec 2011 13:53:43 -, "firebirdsql" 
>> wrote:
>> > I have a table with a timestamp column in Firebird 2.5. The format
for
>> > timestamps in Firebird is dd-MM- hh:mm:ss:f (microseconds).
>> > 
>> > However, when the .net data provider is returning the column data, it
>> > doesn't send the microseconds.
>> > 
>> > example:
>> > using(FbDataReader reader = command.ExecuteReader())
>> > {
>> > throw new Exception(reader["timestamp_column"].ToString());
>> > //Return
>> > the column data as a string to see what was sent back
>> > }
>> > 
>> > How can I get the microseconds (basically the exact data in the
>> > column)?
>> 
>> This question is probably better suited for the Firebird .NET provider
>> mailinglist. Are you sure that the datatype used in .NET actually has
>> millisecond (not microsecond) precision?
>> 
>> Mark
>
> throw new Exception(reader["timestamp_column"].ToString()) should just
> throw whatever raw data the Firebird .net provider got from the db. So
it
> looks like the bug is in the Firebird .net provider.

I don't know enough about the innerworkings of the .NET provider, but I am
not sure your assumption is valid that this should return the 'raw data'.
But again: post it to the Firebird .NET provider list.


[firebird-support] Re: Is this a bug in firebird .net provider?

2011-12-08 Thread firebirdsql


--- In firebird-support@yahoogroups.com, Mark Rotteveel  wrote:
>
> On Thu, 08 Dec 2011 13:53:43 -, "firebirdsql" 
> wrote:
> > I have a table with a timestamp column in Firebird 2.5. The format for
> > timestamps in Firebird is dd-MM- hh:mm:ss:f (microseconds).
> > 
> > However, when the .net data provider is returning the column data, it
> > doesn't send the microseconds.
> > 
> > example:
> > using(FbDataReader reader = command.ExecuteReader())
> > {
> > throw new Exception(reader["timestamp_column"].ToString()); //Return
> > the column data as a string to see what was sent back
> > }
> > 
> > How can I get the microseconds (basically the exact data in the column)?
> 
> This question is probably better suited for the Firebird .NET provider
> mailinglist. Are you sure that the datatype used in .NET actually has
> millisecond (not microsecond) precision?
> 
> Mark
>




throw new Exception(reader["timestamp_column"].ToString()) should just throw 
whatever raw data the Firebird .net provider got from the db. So it looks like 
the bug is in the Firebird .net provider.




[firebird-support] Is this a bug in firebird .net provider?

2011-12-08 Thread firebirdsql
I have a table with a timestamp column in Firebird 2.5. The format for 
timestamps in Firebird is dd-MM- hh:mm:ss:f (microseconds).

However, when the .net data provider is returning the column data, it doesn't 
send the microseconds.

example:
using(FbDataReader reader = command.ExecuteReader())
{
throw new Exception(reader["timestamp_column"].ToString()); //Return the 
column data as a string to see what was sent back
}

How can I get the microseconds (basically the exact data in the column)?
  



Re: R: R: [firebird-support] 1 a n relationship with GROUP BY conditioned on master

2011-12-08 Thread Mark Rotteveel
On Wed, 7 Dec 2011 17:34:41 +0100, "P-Soft  - Codebue Fabio"
 wrote:
> Mark,
> it doesnt work. I try to be more specific
> 
> A is invoice header
> B is invoice rows
> 
> SO I need to 
> - aggregate rows on the same B.cms_code (something like pn type) 
> - summing B.pn_value
> - filering on A.invoice_Date
> 
> With your code something strange happens I have value more greater
> than invoice total.

My query is not grouping on invoice, so it is expected as there are
probably several invoices that share the same cms_code. If you want totals
per invoice, you also need to group on the primary key of the invoice.

It is much easier to work with an actual table structure and same example
values, because then you can infer what you actually need :)

Mark


Re: [firebird-support] Order of rows returned by stored procedures

2011-12-08 Thread Helen Borrie
At 08:30 PM 8/12/2011, Josef KokeĀš wrote:

>*Returned* is obvious. But if I *read* these returned rows and output 
>them again, is it a documented behavior that the output will reflect the 
>ordering from the stored procedure?

It's a documented behaviour that a SSP outputs rows in the order that your code 
sends them via a SUSPEND.


>> It is much more efficient to have your SSP work with an ordered set, as
>> the FOR SELECT inside the SP can use indexes. Ordering the set of
>> virtual output is a sloow process and of course there are no indexes
>> to call on.
>
>Of course. But that's not the issue here. The issue is, if my procedure 
>returns a growing sequence, can I depend on it always being growing or 
>should I make sure by an explicit order outside of the procedure?

"A growing sequence".  What's that?  If your code steps through an ordered set 
in a FOR SELECT loop, it can't do anything else but spit out the "next row" 
each time. It's entirely up to the ORDER BY clause that's producing that set: 
it will come out in that order, exactly one row at a time. REALLY. One row out 
to the buffer for each SUSPEND. Execution inside the SP won't continue until 
the caller fetches that ONE ROW out of the buffer.

./hb