I have found a piece of code that enables me to list or populate listbox based on access database When trying that I encountered an error Type data mismatch in criteria expression at this line rst.Open strSQL, cnn, adOpenKeyset, adLockOptimistic, adCmdText Answer Your table got a field related to a secondary …
Tag: sql
Create a table for following condition
condition for the problem to be solved: The code i tried to do is I couldn’t solve the first condition and so i am getting right parenthesis missing for final condition Answer I would translate your requirement as follows: Changes to your original code: you want NUMERIC rather than NUMBER ArCode must be…
How can I find datas smaller than “this sunday” in mysql
I have a mysql table and a date colomb that show when I add datas… I wanna select datas smallar than this sunday from table.. HOw can I do that_? here is my code… I couldnt figure it out “sevk_tarihi < DAY(3)”… Answer I am sorry, I misunderstood the question This gives you pas…
How to achieve partition by kind of functionality using variables in MySQL 5.7
I’m using an old version of MySQL. I cannot upgrade it due to some strong reasons. I’ve a table PatientAppointment with only 2 columns. Here is the table: I want 5 things: Create a new column in runtime monthOfCheckup from dateOfCheckup Convert duration into integer field as minutes Accumulating t…
Conditionally calling sql scripts in sql plus
I have two scripts which needs to be executed depending on whether a table exists or not in my database. So I created a 3rd script as below which checks the condition and calls the respective script. [Because my installer cannot reach db and it can only call one script while installation] END; I get the below…
how to match two columns in a join by a third “mapping” table
I’m trying to do a VLOOKUP like join in sql. I have 3 table: dest_table: target_table: map_table: Wanted output: Answer Yes, you can do this using joins.
Reverse to STRING_AGG
Here is a sample data on which we are further processing. My question is, is there any exact reverse of the STRING_AGG function for SQL Server? Like I am merging using STRING_AGG with the following code I need to reverse the process but I had to use CURSOR so I am searching for an alternative solution. Below …
Different user login problem because of the syntax error [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question In my program, I want different users to have different class_id in order to let them go int…
MySQL show proportion
I am trying to show a proportion of customers that signed up because he/she was being referred by other customers and customers with no referral. So far I only able to show it as numerical but I wanted to show it in percentage. Null is when the customer signs up without being referred. The original data as fo…
Convert 15min to 10min timeseries in SQL Server
I have a timeseries in a 15min format with four different variables. I need to convert this into 10min timeseries format. Due to some constraints, I need to do this in SQL which I agree is probably …