Assassalammualaikum .. ganti aja type datanya mas .. misal cast(ytd_sales as numeric(2,0)), setauku sih bisa.
Salam On 5/7/07, David Gunawan Sugianto <[EMAIL PROTECTED]> wrote: > > Thx responnya mas Aries. Cast dan Convert itu kan buat konversi dari > NUMERIC ke STRING. Tapi yang saya inginkan kebalikannya, dari VARCHAR ke > NUMBERIC. Thx. > > -----Original Message----- > From: [email protected] <indoprog-vb%40yahoogroups.com> [mailto: > [email protected] <indoprog-vb%40yahoogroups.com>] > On Behalf Of aries > Sent: 06 Mei 2007 7:33 > To: [email protected] <indoprog-vb%40yahoogroups.com> > Subject: Re: [indoprog-vb] Tanya Function SQL Server? > > bisa pake CAST atau CONVERT > ex. > > SELECT SUBSTRING(title, 1, 30) AS Title, ytd_sales > FROM titles > WHERE CAST(ytd_sales AS char(20)) LIKE '3%' > > SELECT SUBSTRING(title, 1, 30) AS Title, ytd_sales > FROM titles > WHERE CONVERT(char(20), ytd_sales) LIKE '3%' > > David Gunawan Sugianto <[EMAIL PROTECTED] <dave-g%40sby.centrin>. > <mailto:dave-g%40sby.centrin.net.id> net.id> wrote: > Apa function untuk konversi dari string menjadi numeric ya ? Thx. > > [Non-text portions of this message have been removed] > > --------------------------------- > Ahhh...imagining that irresistible "new car" smell? > Check outnew cars at Yahoo! Autos. > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed]
