我正在尝试更新多行的列。以下是我的查询
for (var name in regions) {
// Select the region DOM element
var regionDOM = document.querySelector('[data-name="' + name + '"]');
// Get the `data-template` attribute
var tpl = regionDOM.getAttribute('data-template');
// Add the region HTML and template to the payload
payload.append(name, regions[name]);
}
// Set the template value for the payload to that of the last region
// found.
payload.append('template', tpl);
我想要做的是,我想只为那些没有任何有效计划的成员帐户添加免费信用(= NULL)。成员列表位于Bitmap bitmap = Bitmap.createBitmap(original.getWidth(),
original.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint();
paint.setColorFilter(new ColorMatrixColorFilter(
matrix));
canvas.drawBitmap(original, 0, 0, paint);
return bitmap;
表值参数中,UPDATE [Members]
SET [Credits]=[Credits]+@FreeCredits
WHERE [ID] IN (SELECT T1.[MemberID]
FROM @Members T1
RIGHT JOIN [Members] T2 ON T1.MemberID!=T2.ID
WHERE T2.ActivePlan IS NULL)
是表。
查询未按预期工作。它会向所有成员添加信用,即使是@Members
不等于[Members]
的成员也是如此。请告诉我如何使用一个更新查询来实现此目的。
答案 0 :(得分:0)
您不应该使用正确的加入。只做内连接。试试这样,
OnFileActivated
答案 1 :(得分:0)
string aadInstance = "https://login.microsoftonline.com/{0}";
string tenant = "<your-tenant>.onmicrosoft.com";
string clientId = "<your-clientId>";
string appKey = "<your-application-key>"; // Or Client Secret
string resourceId = "https://graph.microsoft.com/";
string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant);
var authContext = new AuthenticationContext(authority);
var clientCredential = new ClientCredential(clientId, appKey);
var result = await authContext.AcquireTokenAsync(resourceId, clientCredential);
string response;
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri("https://graph.microsoft.com");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", result.AccessToken);
client.DefaultRequestHeaders
.Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var resultApi = await client.GetAsync("/v1.0/users");
response = await resultApi.Content.ReadAsStringAsync();
}
请查看是否有任何问题。谢谢:))