>>Hi,
>>
>>I have two cursors of the same structure. Some records of one cursor are in the other cursor. How do you make one cursor out of these two that has only unique records?
>>
>>Also, if I could ask another question in the same thread, what is the max length of characters can be used when naming a cursor (in SQL Select)?
>>
>>Thank you in advance for any help.
>
>Use UNION to get them combined. UNION eliminates the duplicates.
>
>I'm not sure what is the maximum length, but I would not try more than 30 chars for a cursor name.
>
>select * from myFirstCursor
>UNION
>select * from mySecondCursor
>into cursor curCombinedResults
BTW, by CURSOR in SQL Server do you mean DECLARE CURSOR command ?
If it's not broken, fix it until it is.
My Blog