Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is wrong with this

Status
Not open for further replies.

Machlink

Technical User
Apr 3, 2004
25
CA
SELECT ACCT_NO,
(SELECT SUM(tran_record.amount)
FROM tran_record
WHERE tran_record.acct_no = T1.acct_no) AS balance,
(SELECT SUM(tran_record.amount)
FROM tran_record
WHERE tran_record.acct_no = T1.acct_no
((SELECT bill_master.alt_bill_group
FROM bill_master B1
WHERE B1.bill_code = tran_record.bill_code) AS bill_group) AS TV_amt
FROM dbo.ACCT_MASTER T1
WHERE (ACCT_NO = '431101590001')
 
Iam getting error in where clause near As

can someone fix for me this statement
 
Code:
SELECT ACCT_NO,
       (SELECT SUM(tran_record.amount)
        FROM   tran_record
        WHERE  tran_record.acct_no = T1.acct_no) AS balance,
       (SELECT SUM(tran_record.amount)
        FROM   tran_record
        WHERE  tran_record.acct_no = T1.acct_no
       (SELECT bill_master.alt_bill_group
        FROM   bill_master B1
        WHERE  B1.bill_code = tran_record.bill_code) AS bill_group) AS TV_amt
FROM  dbo.ACCT_MASTER T1
WHERE ACCT_NO = '431101590001'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top