Skip to content

Tag: sql-server

How to find which field is giving data type error in QUERY

I have the query report for user but have some error message display: Error converting data type nvarchar to bigint only one message. How to find which field is giving data type error in query? Anyone can give advice? Many thanks! Answer As you have not provided data, it looks like you have NVARCHAR datatype,…

How to get custom separators in SQL Server query

I have a table in SQL Server that looks like this If this table was in Oracle and I wanted to get all the properties separated by different separators then I would write something like this I would get output like this Notice all the separators are different. How can I write a similar select statement for SQL…

Multiple SUM’s in a SELECT but on one view

I’ve written a select statement to assist with timesheet approval. It show’s the summation of hours entered against a user based on different roles booked, i.e. Standard Office Hours, Overtime, Holiday & Offshore. I want a single row per [Name] but I get a row for every SUM where the user has …

SQL Server check for prior record only

I have these columns: type(char), date , price. I would like to check if the same type’s price has not changed in the previous record. I tried this for start: I only want to check for the date prior not for every date that is smaller. This table stores price changes. product_type change_date price &#821…

query range on column [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 1 year ago. Improve this question I need help on query where I can do the range query based on Name Column from names. e.g., as…