Re: [firebird-support] MySql, MariaDb ; Add column

2019-02-20 Thread atuncce...@duzen.com.tr [firebird-support]
Thanks a lot Karol

Re: [firebird-support] GPRE

2019-02-20 Thread Frank Schlottmann-Gödde fr...@schlottmann-goedde.de [firebird-support]
As attachements don't work, a short one:
Source is here:
https://github.com/FirebirdSQL/firebird/blob/master/src/burp/OdsDetection.epp

results in:

/*** Preprocessed module -- do not edit ***/
/*** Preprocessed module -- do not edit ***/
/*** Preprocessed module -- do not edit ***/
/*** Preprocessed module -- do not edit ***/
/*** Preprocessed module -- do not edit ***/
/* gpre version LI-T4.0.0.1436-dev Firebird 4.0 Beta 1 
**/
/*
  * PROGRAM:JRD Backup and Restore Program
  * MODULE: OdsDetection.cpp
  * DESCRIPTION:Detecting the backup (source) or restore (target) ODS
  *
  * The contents of this file are subject to the Interbase Public
  * License Version 1.0 (the "License"); you may not use this file
  * except in compliance with the License. You may obtain a copy
  * of the License at http://www.Inprise.com/IPL.html
  *
  * Software distributed under the License is distributed on an
  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  * or implied. See the License for the specific language governing
  * rights and limitations under the License.
  *
  * The Original Code was created by Inprise Corporation
  * and its predecessors. Portions created by Inprise Corporation are
  * Copyright (C) Inprise Corporation.
  *
  * All Rights Reserved.
  * Contributor(s): __.
  *
  */

#include "firebird.h"
#include "../burp/burp.h"
#include "../burp/burp_proto.h"
#include "../burp/OdsDetection.h"


namespace
{
// table used to determine capabilities, checking for specific
// fields in system relations
struct rel_field_t
{
const char* relation;
const char* field;
int ods_version;
};

const rel_field_t relations[] =
{
{"RDB$PROCEDURES",  0,  DB_VERSION_DDL8},   // IB4
{"RDB$ROLES",   0,  DB_VERSION_DDL9},   // IB5
{"RDB$PACKAGES",0,  DB_VERSION_DDL12},  // FB3
{0, 0, 0}
};

const rel_field_t rel_fields[] =
{
{"RDB$FIELDS",  
"RDB$FIELD_PRECISION",  DB_VERSION_DDL10},  // FB1, 
FB1.5
{"RDB$ROLES",   
"RDB$DESCRIPTION",  DB_VERSION_DDL11},  // FB2
{"RDB$RELATIONS",   
"RDB$RELATION_TYPE",DB_VERSION_DDL11_1},// FB2.1
{"RDB$PROCEDURE_PARAMETERS","RDB$FIELD_NAME",   
DB_VERSION_DDL11_2}, 
// FB2.5
{"RDB$PROCEDURES",  
"RDB$ENGINE_NAME",  DB_VERSION_DDL12},  // FB3.0
{0, 0, 0}
};

void general_on_error();
}


/*DATABASE DB = STATIC FILENAME "yachts.lnk";*/
/ GDS Preprocessor Definitions /
#ifndef JRD_IBASE_H
#include 
#endif
#include 
#define CAST_CONST_MSG(A) (reinterpret_cast(A))
#define CAST_MSG(A) (reinterpret_cast(A))

static const ISC_QUAD
fbBlobNull = {0, 0};/* initializer for blobs */
static Firebird::IAttachment*
DB = 0; /* database handle */

static Firebird::ITransaction*
fbTrans = 0;/* default transaction handle */
static Firebird::IMaster* fbMaster = 
Firebird::fb_get_master_interface();/* master interface */
static Firebird::IProvider* fbProvider = fbMaster->getDispatcher(); 
/* 
provider interface */
static Firebird::CheckStatusWrapper fbStatusObj(fbMaster->getStatus()); 
/* status vector */
static Firebird::CheckStatusWrapper fbStatus2Obj(fbMaster->getStatus()); 
/* status vector */
static Firebird::CheckStatusWrapper* fbStatus =/* status 
vector */
static Firebird::CheckStatusWrapper* fbStatus2 =  /* 
status vector */
static int fbIStatus;   /* last completion code */
static const unsigned
fb_0l = 164;
static const unsigned char
fb_0 [] = {
   blr_version4,
   blr_begin,
 blr_message, 1, 1,0,
blr_short, 0,
 blr_message, 0, 2,0,
blr_cstring, 241,3,
blr_cstring, 241,3,
 blr_receive, 0,
blr_begin,
   blr_for,
  blr_rse, 1,
 blr_relation, 19, 
'R','D','B','$','R','E','L','A','T','I','O','N','_','F','I','E','L','D','S', 
0,
 blr_first,
blr_literal, blr_long, 0, 1,0,0,0,
 blr_boolean,
blr_and,
   blr_eql,
  blr_field, 0, 17, 
'R','D','B','$','R','E','L','A','T','I','O','N','_','N','A','M','E',
  blr_parameter, 0, 0,0,
   blr_and,

Re: [firebird-support] Formatting currency

2019-02-20 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
This is due to your regional settings. If I tried 'select cast(1112223.444
as decimal(18,2)) from rdb$database' I would get 1 112 223,44 since I'm
doing things the Norwegian way, if I'd lived in England, I'd expect to get
1,112,223.44 and if I'd lived in India I'd probably get 11,12,223.44 (at
least that what it looks like when I try to choose English (India) as the
region format on my computer). I assume you live in Germany, I don't think
you have to go any further than to Austria to find that there's a space and
no dot for every three digits and in Switzerland I expect you would have
gotten 1'112'223.44 (that surprised me).

Generally, store numbers as numbers and text as varchar and then think
about the presentation when you are displaying things, not when storing
them.

HTH,
Set

Den ons. 20. feb. 2019 kl. 12:02 skrev Dimitry Sibiryakov s...@ibphoenix.com
[firebird-support] :

> 20.02.2019 11:57, 'Check_Mail' check_m...@satron.de [firebird-support]
> wrote:
> > if I select this and store it in a varchar-variable, I get 1112223.44,
> with the point, not
> > comma.
>
>Storing numbers in varchar fields is a big mistake.
>
>
> --
>WBR, SD.
>
>
> 
>
> 
>
> ++
>
> Visit http://www.firebirdsql.org and click the Documentation item
> on the main (top) menu.  Try FAQ and other links from the left-side menu
> there.
>
> Also search the knowledgebases at
> http://www.ibphoenix.com/resources/documents/
>
> ++
> 
>
> Yahoo Groups Links
>
>
>
>


Re: [firebird-support] Formatting currency

2019-02-20 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
20.02.2019 11:57, 'Check_Mail' check_m...@satron.de [firebird-support] wrote:
> if I select this and store it in a varchar-variable, I get 1112223.44, with 
> the point, not 
> comma.

   Storing numbers in varchar fields is a big mistake.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Formatting currency

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

 

how can I format a value to Euro with decimal pointers like 123.456,44 Euro
?

 

If I do this: select cast(1112223.444 as decimal(18,2)) from rdb$database -
I get 1.112.223,44, but if I select this and store it in a varchar-variable,
I get 1112223.44, with the point, not comma. 

 

Thank you.

 

Regards

 

Olaf