I want to add a column which tells me the iteration count of how many times we’ve been in a state, ordered by date. We see we’re in state 1 for the first time, state 2 for the first time, then BACK to state 1 (iteration is now 2), the Iteration stays the same until we change state. I’d like
If I delete a record from a table it is deleted at many other places
I am working on a database built by the previous team. I have to delete certain records from a table (Example shown below). While doing this process, some records from the other tables with the same id is getting deleted. Could someone help how to overcome this problem? Answer In SQL Server, there is statemen…
Is there a way to parse csv string with escapings via HQL/SQL?
I have a problem parsing csv-formatted data that is stored in a Hive table column that is loaded into PostgreSQL DB afterwards. What I need to do is to retrieve some fields from there, however, if a comma is enquoted, it should be treated as a part of data to retrieve; on top of that, quotes can be escaped th…
How can I pass a parameter in an sql query without making it explicit in the query itself?
I’m testing my ignite cache, inserting a simple User in the cache and then through a query I get the User entered previously returned I have a problem writing the query. I noticed that writing like …
The Microsoft Access Database Engine Does not Recognize ‘[tbl_AssignmentDetails].[Position Name]’ as a valid field name or expression
I have created the below crosstab query off a find duplicates query. When I run it, I get the error message: “The Microsoft Access database engine does not recognize ‘[tbl_AssignmentDetails].[Position Name]’ as a valid field name or expression.” Any clues? Answer .. FROM [tbl_Assignmen…
Pass date string as variable in spark sql
I am unable to pass a date string in spark sql When I run this However I get error when I want to pass the date string as variable I am not sure, how to pass that variable. Answer you can just add single quotes to the query and it should work for you
ERROR: syntax error at or near “.” LINE 4: ON like.takerId = frame.likeId;
i have a table whose name is like. But whenever i have to select data from like, i was getting this error, i figured it out public.like..but when i try to join two tables i get this error i also use public prefix but it throws even if it is saying column like.takerid does not exist , then why it
VBA & SQL how to select specific values based on range in excel?
I am newbie in connection of vba (excel) and oracle database. I have tried to look for some information but I could not find anything that would work for me. I want to write a query that will return me only rows in which there is a specific values. My query looks like this: SQLStr = SQLStr = “SELECT NGK…
Could a SELECT inside of a transaction lock the table?
I would like to know if it’s possible that a select is blocking a table if it’s inside a transaction. It’s something like this: It’s a dummy example, but if there’s a lot of records in that table, and an API is receiving a lot of requests and calling this stored procedure, could …
Trying to join two tables together to have the unit_price vary based on the day
I have some code drafted but I’m not sure how to finish it, or if it needs more work. It looks like this. Everything looks good, but how do I get the price to be based on the given effective date? The given effective date is 01/01/2021. I was thinking something maybe like this for the where: I’m n…