SQL Subquery and alias for datagrid use

N

.Net Sports

I'm going to be using an sql column's content in one datagrid column,
and use another datagrid column for another portion of that sql column

select tbldeal.ID, tblDeal.Sale_Type_ID(select tblDeal.Sale_Type_ID < 3
as News) from tblDeal where thedate = '7/6/2005'

is giving me an error: Incorrect syntax near the keyword 'select'.
I need to display all the salestypeIDs that are under 3 in my datagrid
column named "News".
????
..netSports
 
T

tomh

SELECT tbldeal.ID, tblDeal.Seal_Type_ID AS News
FROM tblDeal
WHERE thedate = '7/6/2005' AND Sale_Type_ID < 3

Not sure if I read your post right, is that what you're looking for?

Tom
 
G

Guest

your sql is incorrect.
Please change to:
select tbldeal.ID, tblDeal.Sale_Type_ID as News from tblDeal where thedate =
'7/6/2005' and tblDeal.Sale_Type_ID < 3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top