The followingquery is same as running in mysql project
i wanna run it on sql.......... how can is run it... give me the similar solution for this as mysql:-----
SELECT gledger.*,
CAST(
if(
LEFT(gledger.gl_voucher,
2)
IN(
'SB',
'PB'),
1,
if(
LEFT(gledger.gl_voucher,
2)
IN("B ","C ","J ","DN","CN"),
2,
if(
LEFT(gledger.gl_voucher,
2) in("O "),
0,
3))) as decimal(
2,
0)) as lorder,
CAST(''
AS DECIMAL(5,
0))
as sno ,
00000000000000.00 AS BALANCE ,
SPACE(
5)
AS DC ,
ifnull(master.MA_ACNAME,'')
as ma_acname,
master.PK_ID
FROM gledger
LEFT JOIN master ON
gledger.GL_ACID1 = master.PK_ID
WHERE gledger.GL_ACID =
25 and gledger.gl_date
between 'date'
and 'end'
ORDER BY gledger.gl_date