Make these 2 sql statements into one with the same functionality
- by Phil
I have sql statement one;
select linkscat.id, linkscat.category
from linkscat, contentlinks, links
where contentlinks.linksid = links.id
and contentlinks.contentid = @contentid
and links.linkscatid = linkscat.id
order by linkscat.category
and sql statement 2 takes a parameter called @linkscat which is 'id' from the statement above;
select * from links where linkscatid= @linkscat
I'm running into all types of trouble trying to use many sqldatareaders, nested repeaters etc, but it would be great if all the work could be done in the one statement? Is this possible and if so please can you help by posting the final statement?
Thanks greatly, any help much appreciated!