How to Update or Replace records all DBFs in one folder based on fields across tables with SQL via ODBC in VB.NET?. If there is another best solution. I mean the fields in all database tables in one folder named “ITM” So I want to change or update e.g. “TEST R 1000″ to TEST RC 1000 LTP” If there are
Tag: sql
BigQuery Temp Table Column has no Name
I’m trying to create a temp table in BigQuery, something like: This results in error “CREATE TABLE columns must be named, but column 2 has no name”. I understand that it can’t extract a column name from MAX(t.event_date). Is there a way I can specify a column name? Answer Is there a way I can specify a column name? Use
Prisma PostgreSQL queryRaw error code 42P01 table does not exist
I am trying to run a query that searches items in the Item table by how similar their title and description are to a value, the query is the following: However when the code is run I receive the following error: I have run also the following query: Which correctly shows that the Item table exists! Where is the error?
SQL – split numeric into 2 columns?
I am trying to split some numeric keys in my table into separate columns (to help save space in SSAS, lower cardinality) My data looks like the below.. I want to split these into 2 columns… with 4 digits in each column. (where applicable, as anything 1>9999 won’t have anything populated in the 2nd column) So an example output of
Get first row that is null in Oracle DB table
I have the following table rownum ID date owner 1 1 09/01/2022 null 2 1 09/02/2022 null 3 1 09/03/2022 Joe 4 1 09/04/2022 null 5 1 09/05/2022 Jack 6 2 09/01/2022 null 7 2 09/02/2022 John 8 2 09/02/2022 John 9 2 09/02/2022 John For every ID, I want to select the first occurrence of null that eventually results
Laravel 9 – implode() and whereIn
Hello i’m using query builder in my laravel app. I’m trying to use the implode() method from query builder. So for example i expect a string composed from : ‘ 2,3,4… ‘ I have to use this string in next query where i use the raw query IN (‘value’, ‘value’) I’m trying to wrap those IDs in to single quotes
Generating the same random number per column values
I have a table which in which I would like to generate random numbers in a specific format (e.g. TEST-10256). For which I have been using the below: However I now want to update a table with these random numbers based on two columns, so the desired outcome would be this: I am not sure how to keep the same
Can I get two count results in a query?
I am using MariaDB. I want to have two count results in a query. The first query is: Next is: What I want to get is: How can I combine them? Answer The usual way is to make a Case..When statement that is one or zero for the desired condition and then SUM it, not COUNT it.
Just out of interest, why cant you include paramters to an SP inside a WITH statement?
I’m working on some VB.NET and need to kick off a SQL SP and if I put the following: Visual Studio will suggest that it can be simplified by using a WITH so it would now look like this: However, any parameters being passed to the SP have to remain outside the {} and it will not allow .Parameters.AddWithValue etc.
Postgres: column “all_comments.id” must appear in the GROUP BY clause or be used in an aggregate function
I am using with recursive to count the number of all descendants. That would be the following SQL query, but if I specify only root_id for group by, I get I get the following error. column “all_comments.id” must appear in the GROUP BY clause or be used in an aggregate function I don’t understand why this error occurs with all_comments.id.