Skip to content

Tag: sql

Query to get correponding new col

Need to get team against team exculing the last x5 SQl query to get above output from a single column Answer You can get the combinations using a cross join. ie: Note: Normally you would use the ID, in your sample it didn’t exist. DBFiddle demo EDIT: Sample with Id usage (Id is comparable like an Int):

A string does not contain a number

Looking for addresses in a table that does not contain a number So “Smith Street” or “James Road” etc I tried using: address_street not like ‘%[0-9]%’ but this did not work, as the results returned everything that is not literally that string. Answer For this kind of invest…

How to import values from csv to SqlServer using c#

I have come across this problem.I am trying to import data into a database from a csv file.Normally the insert part works,but now I keep getting an error: Arithmetic overflow error converting int to data type numeric . The statement has been terminated.It is probably because I have id as the first property,bu…

TSQL – Fill in missing values as 0 for dates without a value

Apologies in advance for the pictures. I did these up as tables in Stack and they displayed fine in Preview but would not display properly once published. I have a sample dataset like below with many more KPIs. Picture Of Tables The dataset currently returned is just a join of these 2 tables and returns date …

sqlite3 query to perform a operation twice [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 months ago. Improve this question I am working with sqlite3 and I’ve created a view named collabs having columns id_1, …

PIVOT function returning NULL values and ISNULL not removing

I have a query using PIVOT function that has NULL values that wish to replace with 0 in the cell. I have tried to add the ISNULL into the sub query against O7CRAM but that did not remove the NULL values The issue I have now is the ISNULL and where to place it to remove the NULL values. Current