TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Aseem Bhardwaj
1.6k
114
20.3k
how to use mysql query in sql server
Sep 12 2016 8:14 AM
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 DECIMA
L(5,
0
))
as
sno ,
00000000000000.00 AS BALANCE ,
SPACE
(
5
)
AS
DC ,
ifnul
l(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
Reply
Answers (
2
)
how to make an existing table field auto-increment in MsSQL
SQL Reporting system.