hey i need to know whether the below code is correct

string query = @"Select p.ID,p.Phase 
                             From Proposal as p, Negotiation as n,contract as c
                             Where c.CID=con.CID and c.NID=n.NID and n.ID=p.ID and n.Phase=p.Phase 
                                    (Select con.CID 
                                     From Contract as con
                                     Where CStatus='Active')";

there is an error coming saying "Incorrect syntax near the keyword 'Select'.
Incorrect syntax near ')'."

how can i get the answer for this

thanxxxx

What do you want to do with the sub-select ? Before it is missing an AND or OR and a column to compare it to.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.