My JSON data looks like this: given a text “foo” I want to return all the tuples that have this substring. But I cannot figure out how to write the query for the same. I followed this related answer but cannot figure out how to do LIKE. This is what I have working right now: Instead of passing the…
Tag: sql
Entity Framework Core “The entity type ‘XXX’ requires a primary key to be defined.”
So I’m currently trying to create a code first migration with Entity Framework Core for a table that displays which lectures the application user has completed. My model looks like this: public class …
Getting column names from a JPA Native Query
I have an administrative console in my web application that allows an admin to perform a custom SQL SELECT query on our database. Underneath, the application is using Hibernate, but these queries are …
no local server type “database engine” were found (V 2016)
I don’t know many things about SQL server, today I install the SQL Server Management Studio 2016 and want to create a local Database. after search in the internet find this link from microsoft. in step 4 of this tutorial found this error when want to regester local servers no local server type “da…
create fiscal week number
How can I put the below logic into a format SQL Server will use to create a fiscal week number ? Answer The CASE Statement should work:
How to setup properties on CSV import in OrientDB?
I have a CSV file like: And I am importing it into OrientDB like: I would like to set the import so that it created properties so that FN becomes first_name, MI becomes middle_name and so on, as well as set some values to lowercase. For ex: Carolina to become carolina I could probably make this changes from t…
ERROR 1046:No database selected
I would like to create a SQL database but this error occurs I do not know why. Can somebody help me? My SQL statement: Can somebody help me? Answer Firstly you need to tell MySQL which database you would like to use to create a table: If your database does not exist yet, you have to create one: then tell
How to extract date time from sql and bind it to datetimePicker
I have saved dates from datetimepicker to sql in my windows form app with the format (dd-MM-yyyy). To edit date, I want to first fetch saved date and show in the datetimepicker control. Like if 28-03-…
number formatting 9’999.00
I’d like to format a number in a SQL select like this How can I do this? It works for 9,999,999 with the following command Answer You are almost there. Just replace group separator (.) with a single quote (‘) and you are good to go. result:
Oracle SQL Unions error “query block has incorrect number of results columns”
I’m trying to write a query that pulls data from a lot of tables, and has about 20 unions. It’s pulling the same information repeatedly, but with more layers each time, to show a sort of tree. I want to compare the final two columns. I’m using a case to do this, and if I add a case to this