I have MS Access query and try to convert to SQL Server query.
Please someone can help me.
UPDATE AppReferrals
SET AppReferrals.DeviceID = CLng(Val(Left(IIf([AppReferrals].[DeviceID] Like '0',[AppReferrals].[ActionID],[AppReferrals].[DeviceID]),9)));
Good I think I'm very old
I worked with Visual basic in my first job 20 years ago
basically what you are doing is taking a value "first 9 digit" (DeviceID) and this is null the alternative (ActionID) and converting it to an Long value
using the following functions
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.