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
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
On Thu, 12 Apr 2012 07:25:26 -, "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 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
>
On Thu, 12 Apr 2012 07:15:22 -, "venussoftop"
wrote:
> Hi all
>
> I have tried the following query
> SELECT tSaleInvoice.*
>FROM tSaleInvoice
>WHERE tSaleInvoice.iID IN
> (SELECT tSaleInvoiceCvrLtr.cSaleInvIDs
> FROM tSaleInvoiceCvrLtr
> WHERE tSaleInvoiceCvrLt
I am running with 2 Firebirds, FB 2.0 in the 3050 port and FB2.5 in the 3051
port.
When I create a ODBC connection, in the database path of the ODBC 2.0 driver I
use:
MYSERVER/3050:D:\DataBases\MyDatabase.fdb
It works fine and it connects to FB 2.0
When I use MYSERVER/3051:D:\DataBases\MyDatab
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote:
>
> On Thu, 12 Apr 2012 07:25:26 -, "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 records from the tSaleInvoice based on a list of
--- 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
> > >
> > > Can I use a CASE WHEN in the WHERE for a statement as below? Th
Morning,
On 12/04/12 08:15, venussoftop wrote:
> Hi all
>
> I have tried the following query
> SELECT tSaleInvoice.*
> FROM tSaleInvoice
> WHERE tSaleInvoice.iID IN
>(SELECT tSaleInvoiceCvrLtr.cSaleInvIDs
> FROM tSaleInvoiceCvrLtr
> WHERE tSaleInvoiceCvrLtr.iID
--- In firebird-support@yahoogroups.com, "venussoftop" wrote:
>
>
>
> --- 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:
> >
On Thu, 12 Apr 2012 07:52:34 -, "venussoftop"
wrote:
> Thanks Mark. I worked on it as per your suggestion and I have the
> following now (I have replaced all variables with literals)
> SELECT tSaleinvoice.*
>FROM tSaleInvoice
>WHERE tSaleInvoice.iID IN (CASE WHEN COALESCE('24315,24371
On Thu, 12 Apr 2012 07:55:32 -, "venussoftop"
wrote:
> Okay okay I used the LIST() function, the error is gone but I do not get
> any results returned
> SELECT tSaleinvoice.*
>FROM tSaleInvoice
>WHERE tSaleInvoice.iID IN (CASE WHEN COALESCE('24315,24371', '') = ''
>THEN ((SELECT c
Hi,
What about:
SELECT
tSaleinvoice.*
FROM
tSaleInvoice
WHERE
EXISTS(SELECT * FROM tSaleInvoiceCvrLtr WHERE tSaleInvoice.iID =
tSaleInvoiceCvrLtr.cSaleInvIDs and tSaleInvoiceCvrLtr.iID = :vp_iID) or
(iBuyerID = :iBuyerID AND tSaleInvoice.tDt = :tDt)
Regards,
Arno Brinkman
Hello guys,
I developed application from Visual Basic 6 and created a database from
firebird 1.5, I have installed embedded server 1.5,but i don't know how to
create a connection string to connect to my database.
I was able to make it using the DSN connection.
but i dont want to use DSN connecti
I've same problem with you,but got the solution, use DSN connection and use the
embed.dll as the "CLIENT" in configuring the ODBC connection.
--- In firebird-support@yahoogroups.com, "rickgeorge88"
wrote:
>
> Hello,
>
> I have tried various ways of connecting (Google) to an embedded firebird
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote:
>
> On Thu, 12 Apr 2012 07:52:34 -, "venussoftop"
> wrote:
> > Thanks Mark. I worked on it as per your suggestion and I have the
> > following now (I have replaced all variables with literals)
> > SELECT tSaleinvoice.*
> >F
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote:
>
> On Thu, 12 Apr 2012 07:55:32 -, "venussoftop"
> wrote:
>
> > Okay okay I used the LIST() function, the error is gone but I do not get
> > any results returned
> > SELECT tSaleinvoice.*
> >FROM tSaleInvoice
> >WHERE
On Thu, 12 Apr 2012 09:16:06 -, "venussoftop"
wrote:
> Thanks Mark and sorry about the logical error, here is the correction
> SELECT tSaleinvoice.*
>FROM tSaleInvoice
>WHERE tSaleInvoice.iID IN (CASE WHEN COALESCE('24315,24371', '') = ''
> THEN ((SELECT LIST(tSI.iID) FROM tSaleI
On Thu, 12 Apr 2012 09:28:48 -, "venussoftop"
wrote:
> Thanks Mark I see the point now. Is there a function to convert the
> string as returned by LIST() or in my field, because both are strings,
one
> automatically created and another manually created
> '24315,24371'
> to
> 24315,24371
No t
--- 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.
venussoftop skriver:
>
> Thanks Mark and sorry about the logical error, here is the correction
> SELECT tSaleinvoice.*
> FROM tSaleInvoice
> WHERE tSaleInvoice.iID IN (CASE WHEN COALESCE('24315,24371', '') = ''
> THEN ((SELECT LIST(tSI.iID) FROM tSaleInvoice tSI WHERE tSI.iBuyerID =
> 1583 AND CAS
--- 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
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?
>
With a stored proc, yes, as suggested by Mark, but as I wrote far down
in my other post, you can do this:
POSITI
--- 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.
--- 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
> 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 inside '341256', but ',12,' doesn't.
Good idea, Kjell, but then why not use CONTAINING
Svein Erling Tysvær skriver:
>
> > 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 inside '341256', but ',12,'
> doesn't.
>
> Good i
--- 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
--- 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
--- 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?
> >
>
> With a stored proc, yes, as sugge
Hi!
I feel a bit overwhelmed by user rights in a database in respect to
stored procedures.
I have a database owned by user OWNER. I want to give limited access to
user ATTACKER, so that he can read and write the database through a
stored procedure MODIFY_DATABASE. So I grant:
GRANT EXECUTE ON
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
Fb/2.5 restoring Fb/1.5 database with (one single command line):
==
gbak -se service_mgr
-fix_fss_metadata ISO8859_1
-fix_fss_data ISO8859_1
-rep -v -z
-user SYSDBA -password masterkey
E:\...\...\sl1b3_20120412.fbk15 SL1
===
unordained schrieb am 11.04.2012 um 15:18 (-0500):
> I once worked on medical software (with Firebird!) and we had to
> deal with ICD-9 and CPT-4 codes. The coding mechanism is somewhat
> hierarchical: code 201 might mean something, and 201.1 might be
> more specific, and 201.12 might be even *mor
Hello, Aage!
Friday, April 13, 2012, 1:44:34 AM, you wrote:
AJ> Fb/2.5 restoring Fb/1.5 database with (one single command line):
AJ> ==
AJ> gbak -se service_mgr
AJ>-fix_fss_metadata ISO8859_1
AJ>-fix_fss_data ISO8859_1
AJ>-rep -v -z
AJ>
34 matches
Mail list logo