I have a problem with my SSMS. For every 5 minutes of interval Intellisense is not working. Is there something wrong with my SSMS software or something wrong with the local server. I won’t say it is …
Tag: sql
Data type mismatch when using a Select Query to feed a combo box
I am getting a ‘data type mismatch in criteria expression (error 3464) with the below routine when trying to activate drop down box ‘cboColleagues’. In short, there are two combo boxes of which the second one (‘cboColleagues’) is not visible until the user activates the first (&#…
How to migrate data from MongoDB to SQL-Server? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago. Improve this question I searched around I found that there are ways to transfer/sync data from s…
SQLite database – select the data between two dates?
I want to select my data by date – from a date until another date, so I have this query, But this query only return the data in ‘2014-10-09’, excluding the data in ‘2014-10-10’, unless I change the query to this below, This is not an ideal solution. How can I select the data incl…
How to calculate MAX(SUM()) in postgresql in particular to query below
I am trying to get MAX(SUM()) in PostgreSQL, which is not possible directly in PostgreSQL. I am trying to get the result by any method, but unable to get the desired result. My table is like this – …
How to select only the first elements satisfying a condition?
I have the following table (simplification of the real problem): Now a simple SELECT id FROM Table WHERE value=’T’; would get me all the IDs where value is T, but I just need, in the example above, the first 2 (1 and 2). What is the best way to do this? I’d prefer not to use a while loop. I
PHP – I want the user to have no possibility to upvote more than one time
I am working on a small social network with PHP and MySQL I want the users to have the possibility to upvote a post, and I already did this but the problem is that I want the user to be able to upvote only one time. Here is my PHP code: This is the form of the upvote button :
Count occurrences of distinct values
I am trying to find a MySQL query that will display the number of occurrences of an ID value within a year. Table: Expected output: I’m trying with the something along the lines of following sql query, but it gives me nothing like the expected output. It’s the 3rd column im struggling with. How ca…
How to use WHILE LOOP to add value to list with condition, SQL Server 2008
I have a loop query with scenario below: orderqty = increase value 1 each loop runningstock = decrease value 1 each loop allocateqty = case when orderqty > 0 and runningstock > 0 then 1 else 0 loop till runningstock=0 or total allocation=stockqty Query: Result: the correct one should be like this: Answe…
How to see if date is in current month SQL Server?
I have a Ticket_Date column that is in the format YYYY-MM-DD HH:MI:SS I want to check if the Ticket_date is in the current month. So far I have : Ticket_date >= ‘2015-04-01’ and Ticket_date