Query
39 TopicsKQL help Exchange Online
Hello, I need help in buildinga KQL Query as I'm fairly new to this. I have a set of 2 keyword list like Set 1 = "A","B","C" Set 2 = "1","2","3" I want a KQL Query that matches any combinations those 2 sets match. I have tried ("A" OR "B" OR "C") AND ("1" OR "2" OR "3") but that does not seem to work. Many Greetings Erik353Views0likes1CommentUsing KQL functions to speed up analysis in Azure Sentinel
Security Operations can often be a very repetitive role. As a security analyst, you will often find yourself conducting the same actions and tasks as you work through an investigation. KQL functions in Azure Sentinel provide a way in which analysts can build up a collection of investigation tools to call upon quickly and simply.35KViews3likes4CommentsAccess Query Expressions not working: Replace, InStr
I am trying to run a relatively simple query and receive a compile error. The two fields involved are both text fields. SELECT Spouse, Replace(Spouse, Last, "") AS Result FROM SimplifiedTable; What this query should do is look at a text Spouse field, and, if the last name is present in it, replace it with blanks. Ideally, I would add an RTrim to the thing to just get the first name of the spouse. I have tried the same query with brackets around the fields, with tableName.fieldname, etcetera. No joy: Compile error. in query expression 'Replace(Spouse, Last, ""'. (It also errors if I try using single quotes -- is there an escape I should be using?) Additionally, I enlisted the assistance of AI and tried to do the same thing using InStr -- Here's a sample of other approaches attempted: SELECT Spouse, IIf(Spouse Like "*" & [Last] & "*", Left(Spouse, InStr(Spouse, [Last]) - 1), Spouse) AS Result FROM SimplifiedTable; SELECT Spouse, IIf(Spouse Like "*" & [Last] & "*", Left(Spouse, Len(Spouse) - Len([Last]) + 1), Spouse) AS Result FROM SimplifiedTable; Each of these queries received the same error message (the quoted text the only differentiator). If I run a select query on just the fields, or concatenate them, no problem. Thanks!789Views0likes4CommentsAccess 365 Query
I am using Access 365 on Windows 10 PC. My database is in Access 2016 format. I haven't used Access in some time and am perplexed by my difficulty in successfully designing a query. I have a list of members of a legislature. One of the fields is office type; the choices are Legislative Office, Constituency Office or Ministry Office. I have tried multiple options in my Simple Query to obtain a list of Legislative offices. No matter what I've tried, I get blank results with a syntax error message. Among my attempts where "Legislative", "Legislative Office" and "not C" None have been successful. Screenshots attached show table format, query design view and syntax error. Please point me in the right direction. Thanks in advanceSolved1.1KViews0likes4Comments401 (Unauthorized) When calling Sharepoint Query
Hello everyone, I am currently getting this error 401 when I try to call my Sharepoint Endpoint. It occurred after I added the following below into the header. What is the issue here? GET http://www.test.com/Shared%20Documents/query%20result%20BEFORE.xml 401 (Unauthorized) Previously, I was facing this error: Access to XMLHttpRequest at **** from origin 'http://127.0.0.1:1234' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I added the Access-Control-Allow-Origin with a value of "*" in the HTTP Response Headers and now I am getting the 401 error. Please do help! Thank you!11KViews0likes3CommentsSharepoint CORS Policy issue persist even after ISS Configurations
I am currently trying to fetch my Sharepoint API via my code. However I am running into the issue below. I have already enabled the ISS Configurations as shown in the link below. However, the issue still persist. https://techcommunity.microsoft.com/t5/iis-support-blog/access-to-xmlhttprequest-from-origin-has-been-blocked-by-cors/ba-p/3800362 Error: index.html:1 Access to XMLHttpRequest at 'http://testing- sharepoint/Shared%20Documents/query%20result%20BEFORE.xml' from origin 'http://127.0.0.1:2233' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. My code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() { function apiCallTest(searchValue) { const adminAccount = 'testUser'; const adminAccountPassword = 'testPassword'; const auth = btoa(`${adminAccount}:${adminAccountPassword}`); const testQuery = 'BEFORE'; const apiUrl= "http://testing-sharepoint/Shared%20Documents/query%20result%20BEFORE.xml" const headers = { 'Authorization': `Basic ${auth}`, // 'Accept': 'application/json;odata=nometadata', // 'Content-Type':'application/json', // 'Access-Control-Allow-Credentials':'TRUE', // 'Access-Control-Allow-Headers':'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers,Authorization', // 'Access-Control-Allow-Origin':'*', // 'Access-Control-Allow-Methods':'GET,POST,PUT,OPTIONS' }; $.ajax({ url: apiUrl, headers: headers, method: 'GET', dataType: 'xml', success: function(data) { // Process the search results as needed console.log('Search Results:', data) }, error: function(xhr, textStatus, errorThrown) { console.log("Cannot connect") console.error('Error:', xhr, textStatus, errorThrown); } }); } function checkConnection(url) { if (navigator.onLine) { console.log(`You are online. Checking connection to ${url}...`); // You can attempt further actions here if needed } else { console.log('You are offline. Check your network connection.'); } } checkConnection("https://testing-sharepoint/_api/site"); apiCallTest(); }); </script> </head> <body style="background: black; color: aliceblue; font-size: 2rem;"> </body> </html>1.4KViews0likes0CommentsQuery based pie charts in Azure DevOps - how do I display a percentage rather than a count?
Hi, I created several charts to track the progress of bugs and test cases. I will use the following two as examples: 1. Open Bugs by State: please reference attached - this chart shows the count of open bugs in each state. 2. Test Case Results by State: please reference attached - this chart shows all the test cases created, pivoted by state. Is there a way to display percentages for each pie slice, rather than the count? For example, in the Open Bugs by State, rather than showing Open = 18, can I display "72%" (18/25)? Right now when I configure the chart, I see the "Aggregation" option, but this only allows me to choose "Count". Do I need to update my queries somehow to get a %? Thank you for the assistance!4.5KViews0likes1CommentViva Insights - Advanced Insights forum
Hi community members! Please use this board for discussions on the below topics: Queries: This forum can be used for questions about queries - how to set up custom queries, when/why to run certain queries, and how to access/share query results. PowerBI Templates: Questions about PowerBI Templates can be asked on this forum as well. Questions such as how to set up templates, how to read results, steps that can be taken from the results, etc. Metrics: You can also use this forum to post questions about confusing metrics, clarity on definitions or general metric questions. If you are a Viva Insights customer currently undergoing transition from the old to the new advanced insights platform, please join the support group here Advance Insights Platform Transition Support - Microsoft Community Hub Please remember to review the general guidelines before posting. Note that this community is to share experiences and general questions only, please open a support ticket for specific questions on your organization's support issues.806Views1like0CommentsSQL queries have become extremely slow compared to nearly identical queries on the same tables
Hi all. I've been drafting a SQL query from within MS SSMS, as a .SQL file, and then running it from within SSMS, on the same system that is running the 2019 developer edition server. The query file contains around 100 or so queries, virtually all UPDATE queries, which populate rows in a SUMMARYTABLE with results taken from the WORKTABLE. I've noticed that recently, the last 10% or so of these queries have become exceptionally slow - around 500 times slower than comparable queries. Here is an example of one of the fast ones, and one of the slow ones. The first takes less than a second: UPDATE database1.dbo.SUMMARYTABLE SET database1.dbo.SUMMARYTABLE.SalesTierCount = (select count(*) from database1.dbo.WORKTABLE as T1 WHERE T1.Manager = database1.dbo.SUMMARYTABLE.Manager and T1.SalesTier =1 and T1.Zdate < database1.dbo.SUMMARYTABLE.Zdate) the second one takes about seven minutes: UPDATE database1.dbo.SUMMARYTABLE SET database1.dbo.SUMMARYTABLE.LifetimeCount = (select count(*) from database1.dbo.WORKTABLE as T1 WHERE T1.retailer = database1.dbo.SUMMARYTABLE.retailer and T1.SalesTier =1 and T1.Zdate < database1.dbo.SUMMARYTABLE.Zdate) Does anyone have any suggestions for rectifying this extremely slow issue? 2 of the 3 WHERE/AND clauses are identical. The third clause differs, however both queries query the same type of data for that clause - both are varchar(50), in both tables. This is a link to the execution plan for both queries: Execution plan The final part of both plans shows an INDEX SCAN (non-clustered). The first, fast query, has the "Number of rows read" of around 200,000, the second, around 436 million. The total time to run the entire .SQL query has blown out from a minute or so, to nearly 4 hours! Any suggestions greatly appreciated.1.2KViews0likes2Comments