I am working on a nested JSON data which I need to load into SQL SERVER 2012. The nested JSON contains two roots i.e. one column and another rows. I need to put value from row into the column. Please …
Tag: sql-server
set Monday is first day of week
I’m using Microsoft sql server and in the sql server by default first day of week is Sunday but I need to set it Monday is the first day of week.
Rounding time untill in SQL
I have a table with timestamp that I want to round off at 15 min. interval. I can round off using the below Query but it rounds off both 11:58 and 12:02 to 12:00 which is not what I want. I would like …
Return matched-pair and the non-matched pair for each ID only once
Any help would be appreciated. I have two sample tables here. Table A: ID |Name 123|REG 123|ERT 124|REG 124|ACR Table B ID |Name 123|REG 123|WWW 124|REG 124|ADR Here is the simple join output …
Having an issue with a stored procedure SQL-Server
I’ve got a stored procedure that i’m having some issues with. I’m trying to lookup against my table GOTWVotes and if VotedBy hasn’t voted before write the vote to the table(this is working) however …
How can I not send Null to database while using Update
If i need to just update one column do i have to give other column previous value or i can just give give the column i need to change and not null values to update in database .. here is procedure …
How to use result of first query in second query where condition?
I have to select two tables data, One is PackageData and another is PackageDataDetails. Here is PackageData is Parent table and PackageDataDetails is child table. See below code: SELECT PD.Id, …
Error Handling for numbers of delimiters when extracting substrings
Situation: I have a column where each cell can have up to 5 delimiters. However, it’s possible that there are none. Objective: How do i handle errors such as : Invalid length parameter passed to …
Problem with delete syntax in SQL – Error Only one expression can be specified in the select list when the subquery is not introduced with EXISTS
I have this SQL query: SELECT NumeroReloj, Badgenumber, Name, lastname, DEFAULTDEPTID FROM [PBS].[dbo].[CAT_Empleados] RIGHT JOIN [AccessControl].[dbo].[USERINFO] ON [PBS].[dbo].[CAT_Empleados].[…
Use multiple IF condition to set variable
I receive parameters to stored procedure: @BDOnly BIT , @CDOnly BIT , @PPOOnly BIT , @FBOMOnly …