I am trying to get values matching the value from the second column. For example, I want to know who is the sender for Bill Gates by only using IDs. I have two tables, I want to select based on “user_receiver” column the matching values in the column “user_sender” For example, I want t…
SQL Server service can not execute in centos
I want to install SQL Server on centOs. I initial this service by command When I get status of service, I get this error: Failed to start Microsoft SQL Server Database Engine /var/opt/mssql/log/ I checked this location to see errors from SQL Server, but this location is empty. Can you help me? Answer Larnu, T…
Join count query into one
I have two very simple count queries that I would like to join into one. To clarify the situation I will add the tables I got: Book isbn author 1111 GB 2222 DC 3333 RL Author code Name GB George B. KL Kyle L. DC Donald C. RL Roland L. Coauthor name isbn KL 1111 GB 2222 GB 3333 And
get all the tables within a date range
I have many weekly backup tables of the same structure and columns but with different names containing some user-specific information like this. Now I want to find the tables within a date range for example: If I choose the date range of 2021-11-20 to 2021-11-13 then the tables fetched would be user_details, …
MS Access Pivoting Query Result Rows into Columns
I’m new to working with MS-Access reports. I have a query that returns the results of employees timesheets, grouped by both month and paycode. I’d like to make a report showing the the following Employee OT Shifts Jan Regular Shifts Jan OT Shifts Feb Regular Shifts Feb 1234 1 1 2 1 5678 5 2 1 0 Ho…
BigQuery – How to select the first campaign each user clicked on?
Let’s imagine that I have a website that sells electronics. In order to attract customers, I invested some money in online ad campaigns. The following table has three columns: user_id (id that identifies each user), event_date (the date when the user clicked on the ad) and mkt campaign (the name of the …
execute powershell from SSMS
I am trying to execute as certain xp_cmdshell code: but this is the error that I get: when I try an execute the same thing in powershell I get the expected response(see image) Powershell The expected output from the xp_cmdshell should be a json Answer The error message implies that your command line is being …
SQL Join with partial string match
I have a table ‘TableA’ like: Another table ‘TableB’ like: I am using INNER JOIN between two tables like: I want to add another condition for join, which looks for value of ‘Group’ in ‘Subgroup’ and only joins if the ‘Group’ Value matches after ̵…
How to select records with a combination of values exist between two tables
I cannot figure this one out, I want to check these two tables, where ALL LadReady are ‘Shi’ for a given LadSeries. This query is almost there… but 410 should not be in the results because there is clearly one record where LadReady is ‘Yes’ instead of ‘Shi’. Query: Ta…
Query monitoring changes in the field
I need to program a query where I can see the changes that certain fields have undergone in a certain date period. Example: From the CAM_CONCEN table bring those records where the ACCOUNT_NUMBER undergoes a modification in the CONCTACT field in a period of 6 months before the date. I would be grateful if you …