I was given a large .csv file (around 6.5 Gb) with 25k rows and 20k columns. Let’s call first column ID1 and then each additional column is a value for each of these ID1s in different conditions. Let’s call these ID2s. This is the first time I work with such large files. I wanted to process the .c…
Tag: sql
How can i filter a datetime column in informix with a date
I’d like to filter a datetime column in informix 12.10. I got the following “test” table name insert_date create_date … 2022-04-06 11:03:22.000 …. … 2022-03-02 12:03:22.000 …. … 2021-02-04 11:15:22.000 …. … 2021-01-05 11:03:22.000 …. My approac…
How to add a column to table results, with the number of repeats of a certain value on a row?
For example, we have a table: and I want to have a following output: Is there any way to do this? Answer Windowing functions are for that very purpose: We can’t tell if your particular database product supports window functions (you didn’t tell us)
Managing security for an SSIS package accessing another SQL server – best practice
Lets suppose I have to create and deploy an SSIS package to sql server (name it SQL1) load some data from another sql server (SQL2). On SQL I want to create a job as well to execute this package. Lets suppose other untrusted persons also can create SSIS packages and jobs on this server, who are not allowed to…
Rails: better approach in handling dynamic column export feature
Given a dynamic export feature where users could select a column they would want to include in an export, some columns are an N+1, and some require multiple joining of tables. Ex: Tables: Columns to export in UI: Customer Name, Full Address, Pets Sample result: There are 2 ways that I could think of to achiev…
Unable to make raw SQL calls from Entity Framework Core
I am working on a project where I am moving specific rows from a table between multiple different environments. The table has an Identity column and when I try to move it I get an error that Identity_Insert is off. Looking at several of the questions on here one of the solutions has been to call Context.Datab…
Aggregation with column selecting element based on list of priorities
I would like to aggregate a list of elements where one column is the urgency. I would like to get a row for each item and take the highest “Urgency” observed for that item based on a list (or mapping). Item Urgency A Normal A Low A High B Normal B Low C High Expected output: Item Urgency A High
Group-by and coalesce cannot be combined, gives an error?
I am creating an SSRS report and while making the data queries to it I got into this error. I do need the data set (Month to Date and Year to Date values) in one row connected with a group by command. This is the crystal report I’m referring to and converting to SSRS. The error I get is something
How to see hidden or escape characters inside a varchar column?
Using MySQL 5.6. I have a varchar column that stores addresses as text. When they come through to my application into a text area box, they are spaced appropriately, like I tried inserting a new address directly into the database but it doesn’t work correctly inside the GUI, it all came in as one line w…
How to not lose unicode characters in Stored Procedure parameter
Problem Statement: We are having a legacy application with backend as SQL Server. Till now, we did not face any issues in passing non-unicode values. Now, we are getting unicode characters from user interface. The unicode character is getting passed as given below, in UI. These data are being inserted into ta…