I am wondering if there is a way to break a sql query into multiple queries and than go thgough them to fill a datagrid. Right now my query works fine in my SQL studio but takes over 2 minutes. It totaly bombs the asp page. So I thought if there is a way to break the query down into smaller parts to fill datagrid it would not bomb and provide some better performance. So the question is how can I take a sql query and break it down into smaller parts to loop through and fill a datagrid with the information. If you have examples that would be great. Thanks for help
SELECT at.UPC as UIC,
ut.Addr_City as City,
at.Auth_Para_Dsg as PARA,
at.Auth_Line_Dsg as LINE,
at.GRADE, substring(at.POSC, 1,4) as DMOS,
--Get the Gender
case at.AUTH_PERS_IDENT when 'E' then 'M' when 'W' then 'M' whe ...
Go to the complete details ...