[firebird-support] Export data to SQLite

2014-04-01 Thread venussoftop
Hi all I wanted my user of the software to use formatted / filtered data on their mobile. MyData is a fine app I had in mind to allow them to view data on the Android mobiles with SQLite being native to Android I was wondering if I could export FireBird data to SQLite format for upload to the m

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-17 Thread venussoftop
Hi Walter If it not a bother can we revisit this issue of Malformed String of ACTUALIZAR_TABLA_PIVOT. I start and end the CREATE PROCEDURE... a follows: SET TERM ^ ; CREATE PROCEDURE ACTUALIZAR_TABLA_PIVOT( . lcInto1; EXECUTE STATEMENT lcActualizar; END

[firebird-support] One SP that can return any kind of value?

2014-01-06 Thread venussoftop
Hi all I have a few SPs (see two examples below), I have a field that defines which field's value is to be returned but as the SP needs a RETURN specified to a type (that what I believe), I wrote separate SPs for each return type, but is it possible to have one SP and unknown RETURN value? Ple

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-06 Thread venussoftop
Yes I had the SET TERM as I was creating the SP SET TERM ^ ; CREATE PROCEDURE ACTUALIZAR_TABLA_PIVOT( tcTablaPivot VARCHAR( 28), lcInto1; EXECUTE STATEMENT lcActualizar; END END END^ SET TERM ; ^ Yet I ran into the error. What stumps me is that i

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-06 Thread venussoftop
Yes, FlameRobin which I use needs the SET TERM^^ ; and SET TERM ; ^^ to make your statement work. That too has the same result now as the SP route you had suggested. I do see that we have come a full circle and have the need to provide fixed column names. But all is not lost, I think I ca

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-03 Thread venussoftop
Hi Walter Okay I upgraded to FB 2.5.2.26540. I have successfully created the SPs Parser and Crear_Tabla_Pivot but when I try to create the SP called ACTUALIZAR_TABLA_PIVOT (I tried the one from your web page as well as the one you sent me as a download) I get the error: Executing statement.

[firebird-support] RE: Full Cross Tab but unknown column headers

2014-01-03 Thread venussoftop
Hi Set I just upgraded to FB 2.5.2.26540 and tried the EXECUTE BLOCK again but had the same issues: Starting transaction... Preparing statement: EXECUTE BLOCK returns (Mystatement varchar(1)) AS DECLARE VARIABLE S VARCHAR(256) Error: *** IBPP::SQLException *** Context: Statement::Prepare( EXE

[firebird-support] Full Cross Tab but unknown column headers

2013-12-25 Thread venussoftop
Hi all Merry Christmas everyone! I have had to revisit this issue. I have a simplified table Color, Amount Red, 123 Green, 234 Blue, 345 Previously, I have been advised of CTEs and CASE before wherein I was able to get the result but for it I had to assume that such and such Colors names exis

[firebird-support] One query either of the two WHERE clause

2013-11-24 Thread venussoftop
Hi all I have a query in which I need to use either of two WHERE clauses depending on the parameters passed or no parameter passed to the query (via Remote View in VFP) The present query is this: SELECT tCartridge.IID, tCartridge.IPID, tCartridge.IRECTYPE, tCartridge.CBK

[firebird-support] Re: Can this CTE be optimized further, it takes 16secs but cummu. effect is 20-25min

2013-08-09 Thread venussoftop
Thanks a lot SET for the help and the explanation. I will keep a look out for the plans and look for such NATURALs Kind regards Bhavbhuti --- In firebird-support@yahoogroups.com, Svein Erling Tysvær wrote: > > >Amazing!!! Look at the new plan (speed) below! > > > >Due to this the amalgamate

[firebird-support] Re: Can this CTE be optimized further, it takes 16secs but cummu. effect is 20-25min

2013-08-09 Thread venussoftop
Amazing!!! Look at the new plan (speed) below! Due to this the amalgamated report also works in a second or two, thanks a million S.E.T. So is it good advise to look for the NATURAL in plan and set indexes of the related table.field? Or there is more thoughts to it than just this? I still

[firebird-support] Can this CTE be optimized further, it takes 16secs but cummu. effect is 20-25min

2013-08-08 Thread venussoftop
Hi all I have this CTE (see below using FlameRobin) which works wonderfully (thanks S.E.T.!). This is just one of the set of CTEs that are run on various tables, each taking about 16 secs on a few years old Core Two Duo. The cumulative effect is that the final dataset that is gathered takes a

[firebird-support] Using % works for LIKE and not for IN ()

2013-02-16 Thread venussoftop
Hi all When using LIKE I can use the 'String%' to look for partial matches. Not so when I want to use IN ('String%', 'VariousString%') instead I have to use 2 LIKEs Is there something I missed for using IN ()? That would allow me to use partial matches? The IN keeps the query simpler and sho

[firebird-support] Converting BLOB sub_type 0 to 1

2012-12-25 Thread venussoftop
Hi all Merry Christmas and wishing you a fantastic new year! I have an old database that has a few BLOB sub_type 0 fields for text data and I know BLOBs can't be converted between sub_types So apart from defining new columns of sub_type 1 and UPDATEing data from old to the new column, deleting

[firebird-support] Application users and FireBird users

2012-12-03 Thread venussoftop
Hi all Presently I do not create users in FireBird and rely on the sysdba login to auto update data structures and user data-entry from the application. I know this is not good but had to get things forward. I need a couple of types of users in FireBird. One, are the data-entry users. They

[firebird-support] Re: Tool that helps creating audit tables

2012-09-30 Thread venussoftop
--- In firebird-support@yahoogroups.com, Milan Babuskov wrote: > > Venus Software Operations wrote: > > I could not find anything beyond 0.9.3.2235 for Windows setup. Can you > > point me in the right direction as this version does not have Generate > > Code > Audit Log Trigger For Table when

[firebird-support] Re: UN and PW not defined ... error message on Windows 7 (not XP)

2012-08-07 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On 4-8-2012 16:06, venussoftop wrote: > > Hi all > > > > I have an app that uses FireBird is being used regularly on Windows XP > > pretty nicely. > > > > Now when I install the same

[firebird-support] Re: UN and PW not defined ... error message on Windows 7 (not XP)

2012-08-06 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On 4-8-2012 16:06, venussoftop wrote: > > Hi all > > > > I have an app that uses FireBird is being used regularly on Windows XP > > pretty nicely. > > > > Now when I install the same app

[firebird-support] UN and PW not defined ... error message on Windows 7 (not XP)

2012-08-04 Thread venussoftop
Hi all I have an app that uses FireBird is being used regularly on Windows XP pretty nicely. Now when I install the same app on Windows 7 I am still able to enter data as I normally would using connect string The problem arises when I try to print the reports via Report Manager (from sourcefo

[firebird-support] Re: Is it possible to know if people are using any FDB (from command line?)

2012-04-25 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > Why not use MON$ATTACHMENTS to check which databases are open, by which > clients/computers? > > Mark > Sorry not being able to reply earlier Mark. So this mean I will have to attach with each database and then check MON$ATTACH

[firebird-support] Re: Is it possible to know if people are using any FDB (from command line?)

2012-04-19 Thread venussoftop
--- In firebird-support@yahoogroups.com, Milan Babuskov wrote: > > venussoftop wrote: > > I was wondering if there was a way to find out if people are using any of > > the FireBird Databases on a given computer. > > Define "using". Do you mean "us

[firebird-support] Is it possible to know if people are using any FDB (from command line?)

2012-04-18 Thread venussoftop
Hi all I was wondering if there was a way to find out if people are using any of the FireBird Databases on a given computer. If this can be done from a command file, rather than interactively, that is all the more better. Please advise Thanks and regards Bhavbhuti

[firebird-support] Re: Latest entries on either Date or Batch No. field

2012-04-13 Thread venussoftop
--- In firebird-support@yahoogroups.com, Ann Harrison wrote: > > On Fri, Apr 13, 2012 at 12:43 PM, venussoftop wrote: > > > > > > > --- In firebird-support@yahoogroups.com, Svein Erling Tysvær > > wrote: > > > First, I would generally recommend you t

[firebird-support] Re: Latest entries on either Date or Batch No. field

2012-04-13 Thread venussoftop
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær wrote: > First, I would generally recommend you to forget that it is at all possible > to use IN (). Myself, I occasionally use IN (constant), but hardly > ever IN () - using EXISTS can normally replace it, is sometimes > faster an

[firebird-support] Latest entries on either Date or Batch No. field

2012-04-12 Thread venussoftop
Hi all I have Parent-Child tables that contain Price List and are updated with the same items in them but with either a later date or a later batch no. filled in, so typical child records would be as follows iID, iItemID, bRate, dDt, iBatchNo 1, 123, 50.00, empty, 156 2, 123, 55.00, empty, 160

[SPAM 4] [firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Kjell Rilbe wrote: > > venussoftop skriver: > > > > Now I can I be able to do a IN against an integer iID? If not is there > > any way to convert the comma separated string to comma separated > > integer value? > &

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær wrote: > > > POSITION(sep || soughtval || sep in sep || searchedvaluelist || sep) > 0 > > > > Adding sep before and after each string makes sure you don't get false > > hits, like '12' > > in '341256,234,567' where '12' appears insi

[firebird-support] Re: IN using a string from another table field

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Norman Dunbar wrote: > Convert your id to a string with leading and trailing commas. > Retrieve the rows required (where tSaleInvoiceCvrLtr.iID = 993). > For each row, wrap the list of ids in a leading and trailing comma. > Check if your string ",id," is

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, "Arno Brinkman" wrote: > > Hi, > > What about: > > SELECT > tSaleinvoice.* > FROM > tSaleInvoice > WHERE > EXISTS(SELECT * FROM tSaleInvoiceCvrLtr WHERE tSaleInvoice.iID = > tSaleInvoiceCvrLtr.cSaleInvIDs and tSaleInvoiceCvrLtr.iID = :vp_iID) or

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > No there isn't. You could write a stored procedure that splits the string > and returns the values as individual rows. Better would be to not store it > like that at all as Arno indicated. > Thanks Mark.

[firebird-support] Re: IN using a string from another table field

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > No you can't. Now you have an IN list with a single value, and Firebird > attempts to convert that string value to INTEGER for comparison with iID, > this fails. You can only use IN list with explicit values list, not a > 'list' in

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > Here I do assume that cSaleInvIDs contains a single value, not a string of > comma-separated values. > Mark, actually cSaleInvIDs is a comma separated list of integers as a string I believe the same as what LIST() would return.

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On Thu, 12 Apr 2012 07:55:32 -0000, "venussoftop" > wrote: > > > Okay okay I used the LIST() function, the error is gone but I do not get > > any results returned > > SELECT tSaleinvoice

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On Thu, 12 Apr 2012 07:52:34 -0000, "venussoftop" > wrote: > > Thanks Mark. I worked on it as per your suggestion and I have the > > following now (I have replaced all variables with li

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, "venussoftop" wrote: > > > > --- In firebird-support@yahoogroups.com, "venussoftop" wrote: > > > > > > > > --- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > > >

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, "venussoftop" wrote: > > > > --- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > > > On Thu, 12 Apr 2012 07:25:26 -, "venussoftop" > > wrote: > > > Hi all > > >

[firebird-support] Re: Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On Thu, 12 Apr 2012 07:25:26 -0000, "venussoftop" > wrote: > > Hi all > > > > Can I use a CASE WHEN in the WHERE for a statement as below? The idea > was > > to either pull out re

[firebird-support] Is such a CASE WHEN usage allowed?

2012-04-12 Thread venussoftop
Hi all Can I use a CASE WHEN in the WHERE for a statement as below? The idea was to either pull out records from the tSaleInvoice based on a list of PKs in a separate table.field (see my other IN post) if the value is not present then on the same records date and iBuyerID. SELECT tSalein

[firebird-support] IN using a string from another table field

2012-04-12 Thread venussoftop
Hi all I have tried the following query SELECT tSaleInvoice.* FROM tSaleInvoice WHERE tSaleInvoice.iID IN (SELECT tSaleInvoiceCvrLtr.cSaleInvIDs FROM tSaleInvoiceCvrLtr WHERE tSaleInvoiceCvrLtr.iID = 993) The idea is to pull out records from tSaleInvoice on it's PK i

[firebird-support] Re: Is NOT IN or SMALLINT = 1 efficient?

2012-02-25 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > One more question Mark. Will > > WHERE EXISTS (SELECT 1 FROM tableb b WHERE b.iPKID<> a.iTableBLinkID) > > > > be more efficient as the<> records will be far less over the time or does > > that interfere with using indices? >

[firebird-support] Re: Is NOT IN or SMALLINT = 1 efficient?

2012-02-21 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On Mon, 20 Feb 2012 09:51:19 -0000, "venussoftop" > wrote: > > Hi all > > > > I have tables that can allow me to filter data like this: > > SELECT a.* > >FROM tablea a &g

[firebird-support] Re: Is NOT IN or SMALLINT = 1 efficient?

2012-02-21 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On Mon, 20 Feb 2012 09:51:19 -0000, "venussoftop" > wrote: > > Hi all > > > > I have tables that can allow me to filter data like this: > > SELECT a.* > >FROM tablea a &g

[firebird-support] Re: Is NOT IN or SMALLINT = 0 efficient?

2012-02-20 Thread venussoftop
Sorry I messed up the first query, here is the corrected version SELECT a.* FROM tablea a WHERE a.iPKID NOT IN (SELECT b.iTableALinkID FROM tableb b) ... --- In firebird-support@yahoogroups.com, "venussoftop" wrote: > > Hi all > > I have tables that can allow me to

[firebird-support] Is NOT IN or SMALLINT = 1 efficient?

2012-02-20 Thread venussoftop
Hi all I have tables that can allow me to filter data like this: SELECT a.* FROM tablea a WHERE a.iTableBLinkID NOT IN (SELECT b.iPKID FROM tableb b) ... these tables will grow over the years with more and more records cancelling each other out, so there really will be only few tens of reco

[firebird-support] Is BLOB a binary field?

2011-12-10 Thread venussoftop
Hi all I need to create a fields that will hold about 200KB or more of data. This field is expected to be a Binary field as per their online document here http://reportman.sourceforge.net/doc/externalsec.html (see "A field where the report will be stored (must be of binary type)") I tried to

[firebird-support] FIFO Valuation SP code help

2011-11-14 Thread venussoftop
Hi all I have a Stored Procedure as below. I know it is my handling of the calculated field bQtyOut which is wrong and that is where the error in the returned data set is. Can someone kindly point out to me where I am going wrong here? This is the line executed SELECT * FROM FIFOVALUATIONTRAN

[firebird-support] Re: Getting only as many records for given qty.

2011-11-07 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On 5-11-2011 12:00, venussoftop wrote: > >>> I know a qty. for a particular item purchased. This item though has been > >>> purchased over a long period only the last few purchase bills are now

[firebird-support] Re: Getting only as many records for given qty.

2011-11-05 Thread venussoftop
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote: > > On 5-11-2011 8:53, venussoftop wrote: > > Hi all > > > > I know a qty. for a particular item purchased. This item though has been > > purchased over a long period only the last few purchase bills

[firebird-support] Getting only as many records for given qty.

2011-11-05 Thread venussoftop
Hi all I know a qty. for a particular item purchased. This item though has been purchased over a long period only the last few purchase bills are now of concern (FIFO method). I have the following tables tPurchaseBill iID PK iNo Bill No. etc. sPurchaseBillItems iID PK iPID FK to tPurchaseBil

[firebird-support] Re: Can no longer open database using connecstring but can from FlameRobin

2011-09-23 Thread venussoftop
CT_USED;" > > Best Regards > = > || ISMAEL || > ===== > - Original Message - > From: venussoftop > To: firebird-support@yahoogroups.com > Sent: Friday, September 23, 2011 9:49 AM > Subject: [firebird-support] Can no long

[firebird-support] Re: Can no longer open database using connecstring but can from FlameRobin

2011-09-23 Thread venussoftop
t; wrote: > > "DRIVER=Firebird/InterBase(r) driver; UID=SYSDBA; PWD=masterke; > DBNAME=LocalHost:C:\VSO3\Utilities\FBUpdater\VSO3.fdb; > CHARACTERSET=CHARACTERSET_USED; DIALECT=DIALECT_USED;" > > Best Regards > = > || ISMAEL || > ===== > -

[firebird-support] Can no longer open database using connecstring but can from FlameRobin

2011-09-23 Thread venussoftop
Hi all Not sure what the problem is but all of a sudden in one application the FDB will not get connected when using a connectstring as below Driver={Firebird/InterBase(r) driver};Uid=SYSDBA;Pwd=masterkey;DbName=C:\VSO3\Utilities\FBUpdater\VSO3.fdb; This connectstring use to worked before now d

[firebird-support] Re: How to find from system tables if SP parameters has a DEFAULT NULL or not

2011-08-27 Thread venussoftop
Thanks a lot, found it rdb_default_value and rdb_default_source --- In firebird-support@yahoogroups.com, "venussoftop" wrote: > > Hi all > > I have a SP which has the following parameters > CREATE PROCEDURE RECEIPTNARRATIONACCOUNTS ( > TITRID ID, > TIS

[firebird-support] How to find from system tables if SP parameters has a DEFAULT NULL or not

2011-08-27 Thread venussoftop
Hi all I have a SP which has the following parameters CREATE PROCEDURE RECEIPTNARRATIONACCOUNTS ( TITRID ID, TISRFID ID, TCPROMPT Varchar(4096) DEFAULT NULL, TCSEP Varchar(250) DEFAULT NULL ) RETURNS ( I can find out the parameters (for all SPs) using the following query SELEC

[firebird-support] Re: SP Parameter DEFAULT and Domains

2011-08-09 Thread venussoftop
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer wrote: > I'm using Firebird 2.5 with Database Workbench V4.1.2. Perhaps it is a > minor niggle in FlameRobin? Thanks Thomas and Milan Hope to have an update of FlameRobin soon Kind regards Bhav

[firebird-support] Re: SP Parameter DEFAULT and Domains

2011-08-08 Thread venussoftop
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer wrote: > I see no reason that DEFAULT NULL is part of the parameter list for the > domain, if the underlaying domain has already DEFAULT NULL defined. > > For example: > > CREATE DOMAIN D_INT AS > INTEGER > DEFAULT NULL > ; > CRE

[firebird-support] SP Parameter DEFAULT and Domains

2011-08-08 Thread venussoftop
Hi all I am trying to make DEFAULT NULL stick for a couple of SP parameters. I generally use DOMAIN but when I did it through DOMAIN (and FlameRobin) the DEFAULT would not make it to the final DDL. When I used FireBird types the DEFAULT remained. The DEFAULT NULL in below got ignored in the

[firebird-support] Re: EXECUTE STATEMENT first try issues

2011-08-08 Thread venussoftop
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer wrote: > Use the INTO part outside of the dynamic SQL string. > > E.g. > > EXECUTE STATEMENT lcSQL INTO :tcName; Thanks a lot Thomas. I took it bit further as below, looks more flexible. Suggestions welcome. Thanks again Kind r

[firebird-support] EXECUTE STATEMENT first try issues

2011-08-07 Thread venussoftop
Hi all I recently wanted to make a flexible SP that will allow me to change the way the return string is generated. I have pasted my work below but when executing it seems to be getting error on the word INTO as follows: Executing... Error: *** IBPP::SQLException *** Context: Statement::Execute