Results 1 to 3 of 3

Thread: Help with MYSQL please

  1. #1
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default Help with MYSQL please

    hi there

    I am trying to import data from oracle to mysql.

    the only stuble blok for me to get this data into sugar is the account number table.

    This is what the table data looks like in oracle.
    "ATLANTIC -209101813025 UNP 34"
    This is what i need
    "1813025"

    I have no idea how to left or right string etc.
    please help

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Help with MYSQL please

    The string functions for 5.0 can all be found here: http://dev.mysql.com/doc/refman/5.0/...functions.html

    Not sure what the standard format is that you're coming from but if it's always 15 characters in and the number will always be 7 chars long it would be SUBSTRING(account_number,16,7)

  3. #3
    Meyer is offline Sugar Community Member
    Join Date
    Oct 2006
    Location
    south africa
    Posts
    646

    Default Re: Help with MYSQL please

    i used

    select Date,SERVICE_FEE,SUBSTRING(AMOUNT,2,11),SUBSTRING( REFERENCE,6,11),SUBSTRING(Reason,14,15)
    from bank_file

    cheers

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Connectiing MySQL GUITools (win) to view SugarCRM schema on MYSQL-UBUNTU
    By paulval in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2008-03-06, 08:10 PM
  2. Replies: 0
    Last Post: 2008-02-06, 11:09 PM
  3. Replies: 2
    Last Post: 2007-07-30, 02:58 AM
  4. Replies: 2
    Last Post: 2007-07-01, 09:55 PM
  5. Replies: 0
    Last Post: 2005-10-22, 09:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •