HELP URGENT

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Thu, 27 Sep 2007 11:41 am

Friends need to know how to get the most value from a field in a table.

Example: I need to know which is the biggest name in the customer table.


And another I need to know how to do to rescue numbers in varchar fields.



Thanks!!!
fabiopdb
Location: rio de janeiro

Poston Thu, 27 Sep 2007 12:08 pm

And ai fabiopdb, beleza?

to get the biggest name u can use this select below, he will return the largest nro of characters in the name field.

Code: Select all
SELECT MAX(LENGTH(nome))
   FROM tab_clientes
in this second question q would be rescuing? you need to obtain an nro that exists within a text? or just convert the nro that is in a text field to a number type??
If you only convert you can use TO_NUMBER..


Code: Select all
SELECT TO_NUMBER('100.00') FROM DUAL;


[]'s
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP


  • See also
    Replies
    Views
    Last Post


Return to SQL

Who is online

Users browsing this forum: No registered users and 3 guests