Browse Source

Anpassung decval fuer Dezimaltrenner , und Auslagerung in .sql #352679

master
Imo John 5 days ago
parent
commit
ed015fada1
  1. 93
      superx/WEB-INF/conf/edustore/db/install/conf/kern.xml
  2. 14
      superx/WEB-INF/conf/edustore/db/install/prozeduren/proc_decval_ids.sql
  3. 11
      superx/WEB-INF/conf/edustore/db/install/prozeduren/proc_decval_pg.sql

93
superx/WEB-INF/conf/edustore/db/install/conf/kern.xml

@ -7159,82 +7159,6 @@ CREATE or replace FUNCTION val(smallint) RETURNS integer STABLE @@ -7159,82 +7159,6 @@ CREATE or replace FUNCTION val(smallint) RETURNS integer STABLE
</returns>
</function>
<function version="3.0">
<name>decval</name>
<description>Liefert einen String als decimal (analog Basic-Funktion
val). </description>
<parameters>
<param>
<name>wert</name>
<type>varchar(255)</type>
<description>Eine String-Repräsentation einer Dezimalzahl
</description>
</param>
</parameters>
<src>
<body><![CDATA[
CREATE or replace FUNCTION decval(varchar(255)) RETURNS numeric(16,2) STABLE
AS 'select $1::numeric where trim($1) !='''' ' LANGUAGE sql;
]]></body>
<author>D.Quathamer</author>
<lastupdated>9.1.2004</lastupdated>
<dbsystem>POSTGRES</dbsystem>
<type>function</type>
</src>
<src>
<body><![CDATA[
create procedure decval(p_str varchar(255))
returning decimal(16,2);
return p_str::decimal(16,2);
end procedure;
]]></body>
<author>D.Quathamer</author>
<lastupdated>9.1.2004</lastupdated>
<dbsystem>INFORMIX</dbsystem>
<type>procedure</type>
</src>
<returns>
<param>
<name>wert</name>
<type>numeric</type>
<description />
</param>
<comment>Die Zahl</comment>
</returns>
</function>
<function version="3.0">
<name>decval</name>
<description>Liefert einen String als decimal (analog Basic-Funktion
val). </description>
<parameters>
<param>
<name>wert</name>
<type>text</type>
<description>Eine String-Repräsentation einer Dezimalzahl
</description>
</param>
</parameters>
<src>
<body><![CDATA[
CREATE or replace FUNCTION decval(text) RETURNS numeric(16,2) STABLE
AS 'select $1::numeric where trim($1) !='''' ' LANGUAGE sql;
]]></body>
<author>D.Quathamer</author>
<lastupdated>9.1.2004</lastupdated>
<dbsystem>POSTGRES</dbsystem>
<type>function</type>
</src>
<returns>
<param>
<name>wert</name>
<type>numeric</type>
<description />
</param>
<comment>Die Zahl</comment>
</returns>
</function>
<function version="3.0">
<name>decval</name>
@ -7249,23 +7173,14 @@ CREATE or replace FUNCTION decval(text) RETURNS numeric(16,2) STABLE @@ -7249,23 +7173,14 @@ CREATE or replace FUNCTION decval(text) RETURNS numeric(16,2) STABLE
</param>
</parameters>
<src>
<body><![CDATA[
CREATE or replace FUNCTION decval(char(255)) RETURNS numeric(16,2) STABLE
AS 'select $1::numeric where trim($1) !='''' ' LANGUAGE sql;
]]></body>
<file>$SUPERX_DIR/db/install/prozeduren/proc_decval_pg.sql</file>
<author>D.Quathamer</author>
<lastupdated>9.1.2004</lastupdated>
<dbsystem>POSTGRES</dbsystem>
<type>function</type>
</src>
<src>
<body><![CDATA[
create procedure decval(p_str char(255))
returning decimal(16,2);
return p_str::decimal(16,2);
end procedure;
]]></body>
<file>$SUPERX_DIR/db/install/prozeduren/proc_decval_ids.sql</file>
<author>D.Quathamer</author>
<lastupdated>9.1.2004</lastupdated>
<dbsystem>INFORMIX</dbsystem>
@ -9976,7 +9891,7 @@ where dimension_bp_id=(select D.tid from dimension_bp D where D.apnr='bluep_absc @@ -9976,7 +9891,7 @@ where dimension_bp_id=(select D.tid from dimension_bp D where D.apnr='bluep_absc
<dbsystem>INFORMIX</dbsystem>
</src>
</maske>
<maske tid="71840" name="Datenblatt archivieren" thema="">
<maske tid="71840" name="Datenblatt archivieren" thema="Datenmanagement">
<src>
<path>$SUPERX_DIR/db/install/masken</path>
<author>D. Quathamer</author>
@ -9990,7 +9905,7 @@ where dimension_bp_id=(select D.tid from dimension_bp D where D.apnr='bluep_absc @@ -9990,7 +9905,7 @@ where dimension_bp_id=(select D.tid from dimension_bp D where D.apnr='bluep_absc
<dbsystem>INFORMIX</dbsystem>
</src>
</maske>
<maske tid="71860" name="Übersicht Datenblatt-Archiv" thema="">
<maske tid="71860" name="Übersicht Datenblatt-Archiv" thema="Datenmanagement">
<src>
<path>$SUPERX_DIR/db/install/masken</path>
<author>I. John</author>

14
superx/WEB-INF/conf/edustore/db/install/prozeduren/proc_decval_ids.sql

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
-- Function: decval
-- Wandelt String Datentypen zu numeric um
create procedure decval(p_str varchar(255))
returning decimal(16,2);
return p_str::decimal(16,2);
end procedure;
create procedure decval(p_str char(255))
returning decimal(16,2);
return p_str::decimal(16,2);
end procedure;

11
superx/WEB-INF/conf/edustore/db/install/prozeduren/proc_decval_pg.sql

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
-- Function: decval
-- Wandelt String Datentypen zu numeric um
CREATE or replace FUNCTION decval(varchar(255)) RETURNS numeric(16,2) STABLE
AS 'select replace($1,'','',''.'')::numeric where trim($1) !='''' ' LANGUAGE sql;
CREATE or replace FUNCTION decval(text) RETURNS numeric(16,2) STABLE
AS 'select replace($1,'','',''.'')::numeric where trim($1) !='''' ' LANGUAGE sql;
CREATE or replace FUNCTION decval(char(255)) RETURNS numeric(16,2) STABLE
AS 'select replace($1,'','',''.'')::numeric where trim($1) !='''' ' LANGUAGE sql;
Loading…
Cancel
Save