SQL Subquery and alias for datagrid use

  • Thread starter Thread starter .Net Sports
  • Start date Start date
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
 
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
 
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
 
Back
Top