Extraction of numbers of MySQL via DatabaseLink

Hi all

After getting my link of database work, now I have the following problem...

I'm trying to extract some of the columns of the MySQL Server

SELECT Article, ArticleNo, Price_B, Price_N

OF tblArticle"@MYSQL_DB «»

Article and ArticleNo are the TANK columns and averything is fine, but Price_B and price are DECIMAL columns (9.2).

and I get a number without decimal places.

Article ArticleNo Price_B Price_N

A 24,67 A123 51,43

results in

Article ArticleNo Price_B Price_N

A 51 24 A123

How can I recover the MySQL decimal columns correctly?

I tried tronque() and ROUND(), TO_CHAR(), but nothing has worked...

Thank you

Chrissy

What is MySQL, store numbers decimal with a number or a comma as decimal separator?

Try setting HS_LANGUAGE = american_america.we8iso8859p1 in your gateway configuration file. Then open a new SQL * Plus window and select in the table. The decimal places are now displayed?

Otherwise, close the SQL * Plus session and change the HS_LANGUAGE to german_germany.we8iso8859P1. Then again open a new SQL * Plus window and check.

One of the parameters territory should work according to the decimal separator used in your MySQL database.

-Klaus

Tags: Database

Similar Questions

  • Inserting in a Table MYSQL Via Air/PHP unauthorized =?

    I have a problem inserting data in my mysql database tables through my air application. All the code is pretty much exactly the same as in some examples I've seen, but it will not simply do it. Is it because of some kind of restriction of security because the air application is on my computer and the server with my database mysql on elsehwhere? Or is it possible to insert data via an air application?

    Here is the example that I follow:-

    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=data_access_2.html

    jimmyoneshot wrote:

    Thanks for the replies boys. I decided I'll change in a flex app rather then it would be any problems. It just means I'll have to add a login system.

    While were on the subject you guys happen to know of examples anywhere of how someone can DELETE data in a table sql via flex/php?

    I'm looking for is essentially when a user uses my application and between info in some text entries, if this specfic info exists in a table so that the data will be deleted from the table. The way this works is that they will choose an element in a tilelist populated by the data in this table mysql and this will insert the data from the selected item in the text entries and then they click a Remove button to remove this element. Cannot find anything similar anywhere well.

    You will need to use a common identifier, for example:

    give each line of your database of ID.

    then pass this value to ID the press of button to a PHP script, that something like:

    $deleteID = $_POST["delID"];
    
    mysql_query("DELETE FROM exampleTable WHERE ID='$deleteID
    '");
    

    maybe check if a line with this ID exists primarily for verification, then go back a value that indicates whether the deletion was successful or not.

    You can delete on other values, but remember they must be unique in the database, otherwise you run the risk of clear multiple values.

    Or you could delete on a compound key, based on the data that you store in the grid.

  • Decimal numbers PHP/MySQL

    Hello

    I'm working on a real estate site. Most monthly apartment rental rates are round numbers like $950, however a few have odd prices like $1070,76 (where the need for decimal data type in MySQL).

    On the page where are all the apartment ads, what I want to do is to remove the decimal point and zeroes if the number is round because all zeros are distracting (and useless). For example:

    I have this code snippet:
    If ($r-> maxRent == 0) {}
    $price = ' requested rent $';
    $price. = $r-> minRent;
    $price. = "monthly";
    } else {}
    $price = ' requested rent $';
    $price. = $r-> minRent;
    $price. = '-';
    $price. = $r-> maxRent;
    $price. = "monthly";
    }
    Which shows this:
    Ask the rent 810, 00-950, 00 per month
    1070.76 rental request - $1200.00 per month
    Asking rent $1335,00 per month

    But I want things to be displayed like this:
    Rental $810-950 per month
    1070.76 rental request-$1200 per month
    Rental $1335 per month

    What I have to do it work with regular expressions (Voodoo!) or is there another way? I am currently in a situation where I have to use outdated versions instead of all (PHP 4.1.2 / MySQL 3.23) if that makes a difference in this case.

    I looked through my books and I tried Googling & forums for an answer to the search, but I'm not sure of exactly what I should look for, so I won't have a bit of luck. Any help would be greatly appreicated.

    Kind regards
    Bev

    bsoliman wrote:
    > But I want things to be displayed like this:
    > Asking rent $810-950 per month
    > Asking for rent 1070.76-$1200 per month
    > Asking for rent $1335 per month

    In fact, le.76 seems to me more confused than la.00. I'd do it
    Just use round() to give a round for all rents figure. However, if
    you want to do it your way, add this function to your script:

    function checkEven ($val) {}
    return preg_match ("/ \d+\.00 /', $val")? number_format ($val, 0):
    number_format ($val, 2);
    }

    Then change your code to do this:

    If ($r-> maxRent == 0) {}
    $price = ' requested rent $';
    $price. = checkEven ($r-> minRent);
    $price. = "monthly";
    } else {}
    $price = ' requested rent $';
    $price. = checkEven ($r-> minRent);
    $price. = '-';
    $price. = checkEven ($r-> maxRent);
    $price. = "monthly";
    }

    --
    Adobe Community Expert David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Connect to MySQL via DW after installed Leopard

    I can not connect to MySQL 5.041 by DW CS3 after the upgrade to Leopard. MySQL Admin MySQL Query Browser can connect and make queries to the database. I can just connect via Dreamweaver. I get the ' MySQL Error #: 2002 "error stating ' unable to connect to the local MySQL server through socket ' / var/mysql/mysql.sock' (2). Problem is that there is no such way.

    It may be that need an update for dreamweaver, however, I found some info on MySQL on Leopard:

    http://bugs.MySQL.com/bug.php?id=32019

    and workaround solutions I have not tested as valid:

    http://angry-fly.com/index.cfm/2007/10/26/fix-for-MySQL-on-Leopard

  • Extract channel numbers

    I have image files and I need to extract the nuumbers in the name of the image file. All my image files look like this:

    {1D5A0279-41E9} 29.05.2014 17-22-58, 59-x1566x1375x2768x2577.png

    I want to just extract the number after the first x and the second x. I tried using the match pattern and then their conversion with Fract/Exp string number, but the result is not always constant position I need. How could I go about this?

    How about using "Worksheet to Array string" like that?

  • When extracting the numbers

    Hello Experts;

    I have similar data to below

    Select ' LAT: 41N 39' | Chr (39) | ' 13' lat ' LONG: 90W 10' | Chr (39) | ' 35'. Chr (34) as double longi
    Union of all the

    Select ' LAT: 34N 22' | Chr (39) | ' 36'. Chr (39) | Chr (39) lat, ' LONG: 88W 58' | Chr (39): '. 13' | Chr (34) as double longi

    Union of all the
    Select ' LAT: 42N 52' | Chr (39): '. 279' lat ' LONG: 94W 56' | Chr (39) | ' 49.2 ft | Chr (34) as double longi
    Union of all the

    Select ' LAT: 27N 55' | Chr (39) | "47,21' | Chr (34) lat, ' LONG: 91W 59' | Chr (39): '. 11' | Chr (34) as double longi;

    Expected results

    Lat long

    41 39 13 90 10 35

    34 22 26 88 58 13

    42 52 94.279 56 49.2

    27 55 47,21 91 59.11

    Any help is appreciated. Thank you

    Hello

    Here's one way:

    SELECT REGEXP_REPLACE (lat

    , ' \D+ \D+ (\d+) \D* (\d+) [^. 0-9](\d*\.? \d+).*'

    , "\1 \2 \3".

    ) AS new_lat

    REGEXP_REPLACE (longi

    , ' \D+ \D+ (\d+) \D* (\d+) [^. 0-9](\d*\.? \d+).*'

    , "\1 \2 \3".

    ) AS new_longi

    FROM table_x

    ;

    This assumes that all strings containing at least 3 numbers.  If a string has 4 or more numbers, all except the first 3 will be ignored.

    Each number can have 1 or more digits.

    The 3rd number can contain a decimal point; If so, digits before the comma are optional.

  • Enable Support of databases MySQL via SQL Plugin on device VCO 5.1.1

    Hello

    I am trying to connect to a mysql database in a workflow using the plugin SQL 1.1.0. Whenever I run the workflow adds database I get the following error

    "java.lang.IllegalArgumentException: impossible to find the"com.mysql.jdbc.Driver' for 'MySQL' database driver! " (Name of the dynamic Script Module: addDatabase #8) »

    I found documentation on this activation in windows, but not on the device. I tried to place the jar file in

    / opt/VMO/App-Server/Server/VMO/lib/ext

    But I still get the error.

    How to install this driver?

    Thank you.

    When you have placed the mySQL driver on your device, you did it course set permissions on the file correctly? It must be owned by the vco user and group of vco. The following commands should be available from the directory/opt/vmo/app-server/server/vmo/lib/ext:

    chown vco.vco *.jar

    And:

    *.jar chmod 640

  • How to restrict user entered numbers/extracts only numbers

    qst1- I use a text input (flash component) to which the user will enter numbers only in (the integers and floating-point numbers) but not any other symbol.

    Copy the following code


    on keyDown me

    If ("1234567890 -") contains the key or the key = backSpace or key = tab keyCode = 123 or the keyCode 124 = then
    Pass
    on the other
    stopEvent
    end if

    end

    works fine when I use it with old text style of the fields to the Director. However, it does not work with the new flash component style (text).

    QST 2- and, possibly, very simple problem:

    I have an another text field that the user must enter numbers (integers or floating-point number), separated by a comma. Then after the button presses to calculate a mathematical operation on them.

    What I need is access to the numbers only (and not commas) in a list then do some math advanced on these figures.

    How can I write a piece of code for this?

    My own code


    Repeat with i = 0 to nPoints-1
    xList.append (float (xTmp.char [2 * i + 1]))
    end repeat

    (where he resumed (2 * i + 1) odd number entered (e.g. 1. 3 5. ..., because I know that users start with the first number in position 1 then separate with comma second number gets 3. position,...)

    As said it does the job only if the whole written user and the code does not work when the user enters decimal numbers.

    Any suggestion/help is appreciated?

    Best regards!

    HUMAN RESOURCES

    QST 2

    I have an another text field that the user must enter numbers (integers or floating-point number), separated by a comma. Then after the button presses to calculate a mathematical operation on them.

    What I need is access to the numbers only (and not commas) in a list then do some math advanced on these figures.

    How can I write a piece of code for this?

    Have you considered text segmentation in defining 'itemDelimiter' and then grabbing point-by-point? For example:

    aString = "1,2,3,4,5,67,3.1415"
    the itemDelimiter = ","
    put aString.item.count
    -- 7
    put aString.item[7]
    -- "3.1415"
    
  • Extraction of numbers, no strings of text entry fields?

    Hello

    I have two input boxes that I can type numbers in.  I would like a third entry check box to show the total of the first two.

    I set up a listener to button on the stage to perform a function that adds together when a key is pressed.

    It comes, he puts just the strings together - it ddoesn can't add them

    So, how can I tell Flash that box1.text and box2.text are numbers?

    Box3.text = box1.text + box2.text is not doing.

    Thanks for your time.

    Shaun

    Hi celebrities music

    You will need to get the string to a number.  Something like:

    var firstNumber:Number = Number (box3.text);

    var secondNumber:Number = Number (box2.text);

    answer: var number = firstNumber + secondNumber;

    Of course, you want to make sure that the text in the text field is actually a number and someone was not able to type in a Word.  The best way to do it is NOT to do the textfield a text entry field.  Instead make a dynamic text field and give it a MouseEvent.CLICK event listener.  When someone clicks on the dynamic text input field, bring up a keyboard that requires them to enter the number in this way.

    I have an application exactly like this one where students had to enter a number in a text field to understand the econ issues.  The workflow has something like:

    1. Click the dynamic text field
    2. Bring up the Enter key digital
    3. When the user clicks on a number on the keypad, text matching using a switch statement
    4. Add numbers to text in a string field, that way someone who, between '1', '3' '8' will get 138 and not 12.
    5. With each press of button, update the dynamic text field to show what the user enters
    6. With the user presses the Enter key, then mount this text field in number and store it in a variable of type number

    Hope that helps.  Let me know if you need help with the code for one of these steps.

  • How to send multiple lists to MYSQL via JSON

    I have 3 list that users can add to

    Each item is added to an ArrayCollection collection
    [Bindable]
    private var arrayKeyPointList:ArrayCollection = new ArrayCollection();

    [Bindable]
    private var arrayBulletPointList:ArrayCollection = new ArrayCollection();

    [Bindable]
    private var arrayQuoteList:ArrayCollection = new ArrayCollection();



    It is one of the functions that is called when a user wants to add something:
    private function addBulletPointToList (): void
    {
    If (txtNewBulletPoint.text! = "") {}
    arrayBulletPointList.addItemAt(txtNewBulletPoint.text,0);
    txtNewBulletPoint.text = "";
    }
    }

    When they have completed all 3 lists, they hit the Send button. The code below is for testing only.

    private function sendNewProduct (): void
    {
    var sendData:Array = new Array();

    sendData.push ({keypoints:arrayKeyPointList.toArray ()}, {bulletpoints:arrayBulletPointList.toArray ()}, {quotes:arrayQuoteList.toArray()});})

    var jsonSendData:String = JSON.encode (sendData)
    jsonSendData = escape (jsonSendData);

    Alert.Show (jsonSendData);
    }

    Make me properly, is there a better way? Also if I change the function add to:

    private function addBulletPointToList (): void
    {
    If (txtNewBulletPoint.text! = "") {}
    arrayBulletPointList.addItemAt({bulletpoint:txtNewBulletPoint.text},0);
    txtNewBulletPoint.text = "";
    }
    }

    I get this JSON output

    [{"keypoints": []}, {'bulletpoints': [{"bulletpoint": 'test point bullet', "mx_internal_uid": "8F1AAB73-0783-132B-EE43-F1F4F29284FA"}]}, {"quotes": []}]

    Although the mx_internal_uid aren't a problem, this means I send more data than necessary, why it does not appear and how do I get rid of him, do I need to change the function to all the arrayBulletPointList.addItemAt({bulletpoint:txtNewBulletPoint.text},0). or just leave it as arrayBulletPointList.addItemAt(txtNewBulletPoint.text,0);

    Thank you very much!

    I have no problem with how you are pushing several bays in JSON and hoping that you are actually their right on the server.

    ATTA

  • Extract/Scan for numbers of several lines of strings

    Hi all

    I want to extract (data) numbers obtained from an acquisition of series that will be shown in several online channels:

    $# pressure 20

    ! @temperature 100

    #voltage 1.2

    I want to extract 20 100 and 1.2 so that I can do more than manipulation of data. Should I use the regular expression to match? I couldn't get a good regular expression to extract the numbers.

    Thank you!


  • How to extract text with regexp_replace numbers

    Hi guys
    I have the following... ' > 14 413 (4) > 14 567 (1)... »
    and need to extract the numbers to ensure...

    14413
    14567

    I used this command
    REGEXP_REPLACE (' > 14 413 (4) > 14 567 (1) ','-([^ ()] *------)', ")

    and got this response is still not ideal...
    14413 14567 >
    someone at - it suggestions...

    Thank you...


    I use oracle 10g r2.

    Published by: claudioaragao on 02/01/2013 07:28

    Hello

    Here's one way:

    SELECT  LEVEL         AS n
    ,     str
    ,     TRANSLATE ( REGEXP_SUBSTR ( str
                              , '>[^(]*\('
                          , 1
                          , LEVEL
                          )
                , '0 >('
                , '0'
                )     AS str_num
    FROM     table_x
    CONNECT BY     str     = PRIOR str
         AND     LEVEL     <= LENGTH (str)
                    - LENGTH (REPLACE (str, '>'))
         AND     PRIOR dbms_random.value           IS NOT NULL
    ;
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    Explain, using specific examples, how you get these results from these data.
    See the FAQ forum {message identifier: = 9360002}

  • date, time and numbers of extractions

    Hi all

    Please inform me how can I extract just the full date, time with only AM/PM and numbers with or without decimal point.

    in the following query is extracted from the Date.

    Select regexp_substr ("Welcome to 08/08/2012 ',' [0-9] {1,2} [[: punct:]] ([0-9] {1,2} |)") [[: alpha:]] ({3}) [[: punct:]] [0-9] {4}') datesubstr
    of the double
    ;

    How can I correct the time as in the following
    SELECT REGEXP_SUBSTR (' Hello 12/12/2008, 10:22 nnnm mnj Sarah ',' [0-9,-------.] + [AM, PM]') result OF double;

    and how do I extract only numbers and numbers with a decimal point

    SELECT REGEXP_SUBSTR (' Hello to Sarah mnj nnnm 8898989898989 ',' [0-9,.]) ({1,}') are the result OF double;

    concerning

    Hello

    Isabelle wrote:
    Thanks a lot for you

    but
    SELECT REGEXP_SUBSTR (' Hello to 8898989898989.) Sarah nnnm mnj'
    , '([0-9]+\. [0-9]*)'     || -Start by number (s) (it may or may not have numbers after).
    '|'               || -or
    '(\. ([0-9] +)'-begins with a decimal point
    ) AS a result
    OF the double
    ;

    "If the numbers such as ' 9.11.2012 ' is not necessary to extract.
    I want to extract only when like this 9.11 or this 9,11 tike who is only average a decimal point.

    Your needs are still vague. No joke, you have to say exactly what your needs are and to give other examples. After 5 to 10 rows of sample data (CREATE TABLE and INSERT statements) and the results desired from these data. Explain why you want the results of these data.

    If you want to treat ',' as a decimal point as possible, how you stand out from the other commas? For example, the string would contain a list of integers, such as

    1,2,3,5,8
    

    ? If so, what happens if the entire string is

    1,2
    

    ? Would that be one (equal to 6/5) number or two numbers (integers 1 and 2)? Include examples in your sample data and results.
    I still don't know if a comma is necessary.

  • Extract numbers from a string

    Hello
    i'numbers in the neck of string arrecnote

    Please help me in this...

    Published by: smile on October 7, 2010 05:33

    Published by: smile on October 7, 2010 06:14

    Try this to extract the numbers from a string:

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'hello-cycle monthly settlement;  865.15 SDR
      2  
    multilat net 218.15 (USD) USAWW-USACC-2007/10' col1 from dual) 3 SELECT * FROM 4 (SELECT REGEXP_SUBSTR(col1,'[0-9]+.[0-9]+',1,lvl) col1 FROM 5 (select col1,level lvl 6 from t 7 connect by level <= LENGTH(col1) - LENGTH(REPLACE(col1,' ')) + 1)) 8* WHERE col1 IS NOT NULL SQL> / COL1 -------------------------------------------------------------------------------- 865.15 218.15 2007/10 SQL> -- or if you just want the numbers with its decimal SQL> ed Wrote file afiedt.buf 1 with t as (select 'hello-cycle monthly settlement; 865.15 SDR 2
    multilat net 218.15 124 (USD) USAWW-USACC-2007/10' col1 from dual) 3 SELECT * FROM 4 (SELECT REGEXP_SUBSTR(col1,'[0-9]+[.][0-9]+',1,lvl) col1 FROM 5 (select col1,level lvl 6 from t 7 connect by level <= LENGTH(col1) - LENGTH(REPLACE(col1,' ')) + 1)) 8* WHERE col1 IS NOT NULL SQL> / COL1 -------------------------------------------------------------------------------- 865.15 218.15 SQL>

    Published by: AP on October 7, 2010 05:43

  • Error in retrieving over 1,000 records from mysql

    I'm trying to extract data from a database of MySQL via PHP for a Flex application. When there are more than 1,000 records in the result set, the ResultEvent is returned. When I limit to 1,000 records, no problem at all. Any ideas? Code below:

    public void OldCustomerService (method:String = HTTPRequestMessage.POST_METHOD, resultFormat:String = RESULT_FORMAT_E4X, showBusyCursor:Boolean = true)
    {
    Super (null, null);
    this.requestTimeout = 0;
    This.Method = method;
    this.resultFormat = resultFormat;
    this.showBusyCursor = showBusyCursor;

    }

    public function getAllProspects (): void {}
    This.URL = ALL_PROSPECTS_URL;
    this.addEventListener (ResultEvent.RESULT, getAllProspectSuccess);
    this.addEventListener (FaultEvent.FAULT, DAOUtil.communicationError);

    var oldCustomersToken:AsyncToken = this.send ();
    }

    What is contained in the ResultEvent? You don't have a message in there?

    If you get a ResultEvent I would bet on a mistake caused by Php or MySql instead of Flex itself.

Maybe you are looking for

  • macOS on an aluminum Macbook late 2008 GM Sierra

    Does anyone has installed macOS on an aluminum Macbook late 2008 GM sierra using macOS Sierra patch tool? It is fully functional?

  • Why the Quit option has been removed?

    Title says it all. There are several versions there was an option to leave under settings. I enjoyed the opportunity to close Firefox completely which also meant that I was close open connections / listening.

  • iWorks 09

    I use a "Mac Mini 2012 late' with OS 10.11.3. I've been using 09 PAGES, version 4.3, for several years now for genealogical purposes and drafted a document containing more than 1000 pages... I continue to add more as the years go by.  This document c

  • Updates downloaded 13 October 2012 particularly KB 2724197

    Under XP Home and today IE8 installed KB2724197 (among others). The problem is ' Add/Remove' shows that it is installed, but it keeps downloading and installing over and over again WHY? He drives me crazy! Grrr!

  • W XP with 7 W replacement, computer does not have the cd player.

    I have a small Tablet PC purchased in 209without cd player.  It has 2 USB ports.  It came with W XP.  It shows signs of corruption.  I would like to install W7.  Can I still legally buy somewhere and download to install it?  I can get to the BIOS.  C