Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Browsing all 3145 articles
Browse latest View live

Convert table data to (Embadded/Nested)JSON format in SQL server 2014

Hi,How to convert table/tables data to (Embedded/Nested) JSON format in SQL Server 2014? Task is to import data into mongodb which requires data in JSON format.Thanks in advance.Regards,Vijay

View Article


How to prevent having XMLNS added to each and every record?

I need to generate and XML file, but the request is it has to be without having xmlns added to each and every line, as it increases the size of the xml.Is it possible to escape it, please? I think in...

View Article


SQL gourping by multiple columns help

Hello,I have the following table:ID bigint,Name varchar(50),Address varchar(250),RecDate smalldatetime,PurPrice decimal(7,2),PaidBy varchar(50)I am trying to come up with a select statement that will...

View Article

Converting XML file to SQL table

I need to read and convert a xml file into sql tableAnd I think I´m almost there although I get the content of the columns as NULLSCan anyone help?thanksSo far this is what I have:[code="sql"]USE...

View Article

Select continual date ranges from a list that overlaps

Hi There, need some help.I have list of prices and the dates they are valid from and to. For Example:Date From Date To Price20/06/2013 26/08/2013 199.9927/08/2013 21/01/2014 199.993/10/2013 31/10/2013...

View Article


open a SSIS package in design view fro SSIS catalog

A question for SSIS package in SSIS catalog.Is there a way on server to open a package in data tool?I know it is not good practice to open it directly on server, but sometimes I need to do a quick...

View Article

How to drop temp table created by somebody else?

I want to drop a temp table created by somebody else how would I go about doing this? I see the temp tables, but I don't know how you can drop it. I'm trying to shrink tempdb and if somebody else has a...

View Article

Browsing network for SQL instances

This isn't really causing me a problem, but I am a bit intrigued ....In SSMS, when connecting to a database instance, you can scroll the bottom of the list of Server Names (which is a list populated by...

View Article


can this be done in another way

below query returns expected result set. but i am thinking if i have different student status it many take lead in row number based on sorting order.fulltime will always take lead for a student even...

View Article


Is there a way to extract only credit card numbers from text

i have below sample data, i try to extract valid credit card data. But i was not able to do so ,since data is not in good format. Can any one help? below sample data have a transaction code which is...

View Article

CREATE FUNCTION with a WHILE LOOP

I am learning and new to CREATE FUNCTIONS - how to I add a WHILE LOOP in a function:CREATE FUNCTION fn_list_the_number(@count INT)RETURNS TABLEASRETURN(WHILE (@count <= 10) BEGIN PRINT CAST(@count...

View Article

Check if File exist - Script Task

I am trying to write a logic within SSIS 2014 using script task (script lang:Microsoft Visual C# 2012) where it looks if text file exist or not and returns a value (1,0) in varibale :...

View Article

Unable to execute JOB (SSIS package)

Hi,I'm trying to run a JOB which should execute an SSIS package. Unfortunately, I landed up on multiple errors stating "Dimension Processing: Error: Either the user. NT SERVICE \SQLSERVERAGENT. does...

View Article


Import data in parquet format

I have a situation where I need to import data from a Hadoop file that is in parquet format. Preferably, I'd like to do this from within a stored procedure that can truncate the staging table, import...

View Article

Import data from xml in MS SQL Server 2014

HiThe following is the code which does not give any results. Will highly appreciate if I get some help. Thanks in advance. //HariExpecting result as follows:897;;825 1 3897;;825 2 50 DECLARE @idoc...

View Article


Issue using sp_send_dbmail for CSV export

Hello, I am using sp_send_dbmail to create a CSV export. However, for some reason, the header line is "Splitting" into multiple lines upon export. I am trying to figure out what is causing this to...

View Article

Query optimization

Hello,I want to optimise the following query that is running so slowly. Please help or gimme an advice.MERGE dbo.LocalizedCategories AS T USING ( SELECT L.LanguageID,SC.CategoryID,BC.Value FROM (SELECT...

View Article


Zero down time database migration into production

Hello All,We are working into database migration project. There is requirement to migration sub-set of database into production without any down time .Also we have to migrate data and merge into...

View Article

Deny DML on a table

Hi allI have a table "test" in my "testdb" database. There is a user "user1" The user has access to all tables in the database. For this particular table "test", I executed "DENY insert on test to...

View Article

Stored Procedure to transfer all DB objects including data from one schema to...

hi,Stored Procedure to transfer all DB objects including data from one schema to another schemathis is the code i tried ALTER PROC sp_schema_to_schema@sourceSchema nvarchar(100),@targetSchema...

View Article
Browsing all 3145 articles
Browse latest View live