Re: TSQL equivalent of strtran function

2019-05-03 Thread Rafael Copquin
It is numeric and I have to transform it to a char (fixed length) type and
do need to show the decimal point.
I use cast to change it to char(15) and then the replace function, which
did the job of removing the decimal point

select replace(cast sales as char(15),'.','') as sales from ..

thanks
Rafael


El vie., 3 may. 2019 a las 10:33, Stephen Russell ()
escribió:

> What is the data type for that column?  Char, VarChar, NVarchar?  Or is it
> numeric and you are pulling the data in a select and you do not want the
> decimal point to show?
>
> On Thu, May 2, 2019 at 5:41 PM Rafael Copquin 
> wrote:
>
> > Please tell what function in TSQL can I use in the same way as STRTRAN in
> > VFP
> >
> > I ned to remove the point from a character expression such as
> >
> > 12345.67 to leave as 1234567 in TSQL
> >
> > TIA
> > Rafael Copquin
> >
> >
> > --- StripMime Report -- processed MIME parts ---
> > multipart/alternative
> >   text/plain (text body -- kept)
> >   text/html
> > ---
> >
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/cahm-jj2khnorkxesardmjyzxewt8modfo1lp1sofk5vvsez...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Re: TSQL equivalent of strtran function

2019-05-03 Thread Stephen Russell
What is the data type for that column?  Char, VarChar, NVarchar?  Or is it
numeric and you are pulling the data in a select and you do not want the
decimal point to show?

On Thu, May 2, 2019 at 5:41 PM Rafael Copquin 
wrote:

> Please tell what function in TSQL can I use in the same way as STRTRAN in
> VFP
>
> I ned to remove the point from a character expression such as
>
> 12345.67 to leave as 1234567 in TSQL
>
> TIA
> Rafael Copquin
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/cajidmyk1j_vi-yrjyf1yxyxa3h8ac+8urxtszvvr1jtn_fm...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: TSQL equivalent of strtran function

2019-05-03 Thread Alan Bourke
select replace('12345.67', '.', '');  

-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

On Thu, 2 May 2019, at 11:41 PM, Rafael Copquin wrote:
> Please tell what function in TSQL can I use in the same way as STRTRAN in
> VFP
> 
> I ned to remove the point from a character expression such as
> 
> 12345.67 to leave as 1234567 in TSQL
> 
> TIA
> Rafael Copquin
> 
> 
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
> 
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/268311a4-1c2c-4486-a6bf-4c593ba3a...@www.fastmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: [SUSPECTED SPAM] Re: TSQL equivalent of strtran function

2019-05-03 Thread Paul Newton
Gianni, Rafael

I would definitely recommend the VFPSQL - TSQL - Mapping article.  I have found 
it very useful in the past.

Paul Newton

-Original Message-
From: ProfoxTech  On Behalf Of Gianni Turri
Sent: 02 May 2019 23:53
To: profoxt...@leafe.com
Subject: [SUSPECTED SPAM] Re: TSQL equivalent of strtran function

Sent by an external sender
--

Hi Rafael,

should be this:

REPLACE (Transact-SQL)
https://docs.microsoft.com/en-us/sql/t-sql/functions/replace-transact-sql?view=sql-server-2017

VFPSQL - TSQL - Mapping
http://fox.wikis.com/wc.dll?Wiki~VFPSQL-TSQL-Mapping

Gianni

On Thu, 2 May 2019 19:40:40 -0300, Rafael Copquin  
wrote:

Please tell what function in TSQL can I use in the same way as STRTRAN in VFP

I ned to remove the point from a character expression such as

12345.67 to leave as 1234567 in TSQL

TIA
Rafael Copquin

[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/byapr02mb587838f1f1bf1ab60bdcc606a1...@byapr02mb5878.namprd02.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: TSQL equivalent of strtran function

2019-05-02 Thread Gianni Turri
Hi Rafael,

should be this:

REPLACE (Transact-SQL)
https://docs.microsoft.com/en-us/sql/t-sql/functions/replace-transact-sql?view=sql-server-2017

VFPSQL - TSQL - Mapping
http://fox.wikis.com/wc.dll?Wiki~VFPSQL-TSQL-Mapping

Gianni

On Thu, 2 May 2019 19:40:40 -0300, Rafael Copquin  
wrote:

Please tell what function in TSQL can I use in the same way as STRTRAN in VFP

I ned to remove the point from a character expression such as

12345.67 to leave as 1234567 in TSQL

TIA
Rafael Copquin

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/20tmcep1lm0lm6hh7nqk2bri2oed5ch...@4ax.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.