Question: Hi I am working with google maps for the first time...
I am getting lattitude and longitude but I want them to be converted to northing and easting using javascript and I can't find any approch for it...

Answer: 
Try this...

```
SELECT (COALESCE(CONVERT(decimal(12,2), Lineas.PARAM1), 0.00)) * (COALESCE(CONVERT(decimal(12,2), Lineas.PARAM2), 0.00))  AS 'MULTIPARAM'

```

the issue is here..

```
SELECT COALESCE('1', 0.00)

```

if still you get error "Error converting data type varchar to numeric", then your data has some characters else than 0-9.
You're going to kick yourself.

Error message in English;

```
Msg 8115, Level 16, State 8, Line 12
Arithmetic overflow error converting varchar to data type numeric.

```

Sample Data;

```
IF OBJECT_ID('tempdb..#TestData') IS NOT NULL DROP TABLE #TestData
GO
CREATE TABLE #TestData (ID int, Field1 varchar(10), Field2 varchar(10))
INSERT INTO #TestData
VALUES
(1,1,1)
,(2,1,2)
,(3,1,3)
,(4,1,4)
,(5,2,1)
,(6,2,2)
,(7,2,3)

```

Query (remove the decimal places from your coalesce);

```
SELECT 
ID
,Field1
,Field2
,(CONVERT(decimal(12,2), COALESCE(a.Field1, 0))) * (CONVERT(decimal(12,2), COALESCE(a.Field2, 0)))  AS 'MULTIPARAM'
FROM #TestData a

```

Result;

```
ID  Field1  Field2  MULTIPARAM
1   1       1       1.0000
2   1       2       2.0000
3   1       3       3.0000
4   1       4       4.0000
5   2       1       2.0000
6   2       2       4.0000
7   2       3       6.0000

```

If you want the result to two decimals then use this;

```
SELECT 
ID
,Field1
,Field2
,CONVERT(decimal(12,2),(CONVERT(decimal(12,2), COALESCE(a.Field1, 0))) * (CONVERT(decimal(12,2), COALESCE(a.Field2, 0))))  AS 'MULTIPARAM'
FROM #TestData a

```

Which gives these results;

```
ID  Field1  Field2  MULTIPARAM
1   1       1       1.00
2   1       2       2.00
3   1       3       3.00
4   1       4       4.00
5   2       1       2.00
6   2       2       4.00
7   2       3       6.00

```

If you have decimals in the varchar field, then give this a go;

```
CONVERT(decimal(12,2),COALESCE(CAST(a.Field1 AS decimal(12,2)), 0) * COALESCE(CAST(a.Field2 AS decimal(12,0)), 0))  AS 'MULTIPARAM'

```