Viewing 15 posts - 31 through 45 (of 4,085 total)
I'll guess since you didn't post a way for anyone to post tested code.
Use LEAD to access subsequent data in the current row. Then compare AgentExpDate to the LEAD...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Do it in the other order. Use UPDATE to update the records using the OUTPUT clause to output your required fields.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Did you try:
Select 'Restored' as source, AppUser.UserId, usergroup.Name, AppUser.UserName
from AppUser
INNER JOIN RestoredDatabase.dbo.AppUser_UserGroup
ON AppUser.UserId = AppUser_UserGroup.UserId
INNER JOIN RestoredDatabase.dbo.UserGroup
...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
This "check" field, is this something that you create as a field in a table? Because I've never seen that done.
What is the reasoning behind not using BIT flags? ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Viewing 15 posts - 31 through 45 (of 4,085 total)