Skip to content

Tag: sql

Populate listbox from access file

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 …

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…

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…

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…