I have a column named cea_no from my table. But I want only specific string from it. I already tried several methods but it it wont work for me. Do you have any idea how could I achieve this? Here is my query The result I only want the R017722B part. Removing the “CEA: , the second set of strings
Tag: database
Data model guidance, database choice for aggregations on changing filter criteria
Problem: We are looking for some guidance on what database to use and how to model our data to efficiently query for aggregated statistics as well as statistics related to a specific entity. We have different underlying data but this example should showcase the fundamental problem: Let’s say you have data of Facebook friend requests and interactions over time. You
How to restore postgres 12 generated sql file into postgres 9.6 database
I am trying to restore the database. The database sql file is about 4.5 GB so I couldn’t edit it on editor. I dump the database using following command in postgres 12; But I need the same database in postgres 9.6. For this purpose, I write the following code to restore it It shows the error like this (Error in
Error with the ID generated when i insert new data in my database Java Derby
i am building an app with a function to insert new Users in the database with Java Derby. Everything is going well, but when i close the app, i run it again and i try to insert a new User (called …
AnnotationException: A Foreign key refering has the wrong number of column. should be 0
What is the reason this error in Hibernate? org.hibernate.AnnotationException: A Foreign key refering com.Otomasyon.entity.Ogrenciler from com.Otomasyon.entity.AlinanDersler has the wrong number of …
SQL query to get data of MCQ question and the answer from two table
MCQ Question and correct answer table name = Table1 Options for every MCQ question and options code table Name = Table2 Table1 Table2 SQL query to get data in the form of – Questions, All 3 options and correct option Answer I am assuming you are using MSSQL as database Use JOINS FIDDLE DEMO Or Output
Generate series of random size data in MySQL
I need to populate table with random size of data for each dependency record. First table is table of products (named products): And the second table is table that contains displays of that product (named product_displays). Each display is another row: Like you can see date will always be the same value, but the number of rows that I need
TRIGGER that checks if that delete removes all the table values
Basicly I just don’t wanna allow that DELETE FROM X delete ALL rows. For example: DELETE FROM X WHERE ID = 3 OR ID = 4; –> Allowed because don’t try to remove all table. DELETE FROM X; –> Not …
I have a services table,service has a price, in new order should i save total amount of order or calculate every time services table
do i need to save order amount in orders table or i can calculate everytime from services table against each order ID?
Creating Postgres View getting ERROR: column “id” specified more than once
SCENARIO: I have this select statement that JOINs a bunch of tables together: I’d like to create a Postgres View. So wrote it out like this: I keep getting this error: ERROR: column “id” specified more than once QUESTIONS: How do I fix this error? I would like to create a view called “all_events”. Are Postgres View sort of like