Query
42 TopicsSort in Query not Displaying
I have no clue how to word this. Basically, in a form I have a field called Members. This field is a drop down menu that lists all of the Members for a meeting via check boxes. I can then tick the checkboxes for the people who attended the meeting, click 'ok', and then when when I run the report, their names will appear. I don't need this information saved; just to display on the report so I can print it. Here's my problem. Not all of the members can vote, so I want the members who can vote listed first, and the rest of the members listed next. I've put in my custom sort formula in the Members query. When I open my Members dropdown box, they are listed exactly the way I want. However, as soon as I tick on the names and then click 'ok,' it's displayed in order of the primary key. When I run the report, the names are still sorted by the primary key. I've gone to every query and table I can find to create my custom sort, but it keeps defaulting to sorting by the primary key. It's driving me INSANE. Any idea why it's doing this? I've dug through google and haven't had luck finding an answer that works. Thanks in advance!165Views0likes16CommentsQuery error 3141
Yesterday I started my Microsoft 365 free trial. I created a database and made a query, when i tried to save the query i got error 3141"The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect" but the spelling was correct. So i tried a new database and got the same error again when saving a query. This error happens with multiple different types of queries across multiple databases and when i download a database with a query already in it and copy the code from the already made query into a new query it still gives the error 3141 even though it works in an already made query. I assume this has something to do with my Microsoft Access. this is the query i made: SELECT * FROM ttblTraits;84Views0likes2CommentsI would like help writing a query to determine when people should follow up on a late shipment
Basically, I have a table that is a log for when issues of different magazines are received. Here are the fields: Title of the magazine Frequency (Monthly, bimonthly, annual, etc) Issue date (the date printed on the magazine) Received Date (The date the item was received) Expected Next Issue Date (Calculated field that figures out when the next issue should come in based on the Received Date and the Frequency) I want a query that, for each title, returns the record for the last issue that was received, but ONLY if it is after the "Expected Next Issue Date" for that record. For example, Time is Biweekly. So If they receive it January 1, and it is now January 15 and the next issue was not received, I want the query to return the record for the issue that was received on January 1, but not any of the issues that were returned before that (so not any issues that were received in December of the previous year). Right now I have a query that does that, but it requires the user to check off old issues as they receive things, which is not ideal. Any ideas on how to write a query that will do what I want?110Views0likes3CommentsKQL 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 Erik393Views0likes1CommentUsing 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!873Views0likes4CommentsAccess 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.2KViews0likes4Comments401 (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!12KViews0likes3CommentsSharepoint 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.5KViews0likes0Comments