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

How to Bulk Insert data from csv which contains double quotes to sql server 2014

Input CSV file:"Id","Name","Sal""1","vikas,j","10000.5""2","James","5000.2""3","VJ","4000.3"[code language="sql"]create table dbo.demo( Id char(1), N

View Article


Query with specific Output

--My Query to get Space left in a data file.CREATE TABLE ##ALL_DB_Files (dbname SYSNAME,fileid smallint,groupid smallint,[size] INT NOT NULL,[maxsize] INT NOT NULL,growth INT NOT NULL,status INT,perf...

View Article


expression when sum have minus number then show 0

I have textbox with expression=Sum(Fields!servicetotal.Value, "Service") - Sum(Fields!servicefee.Value, "Service")Got the correct result.If the result number is negative, then I need to show (display) 0.

View Article

Partition switch with unaligned partition

When I switch a partition off a partitioned table with unaligned indexes, I first drop the unaligned indexes, then switch the partition, and lastly recreate the unaligned index.  That has worked...

View Article

Date Field Calculation Logic

Can somebody please help with this issue.../*Here’s the problem:  Let's say we had a table of all US Presidents, with the date they took office and the date they died.  Let's say I want to get the...

View Article


Linked Server Insert to Oracle - DateTime

Hi there!  I have a linked server in my SSMS to an Oracle database.  I am porting data over from SQL Server to Oracle via the linked server but of course timestamps throw errors because of the...

View Article

Cross compare from within the same table.

I have a list of items with a substitute and a Y/N box to determine that they are old items. (Code to follow.) A10 has a sub of B10 and B10 is old. B10 is subbed back to A10, but A10 is marked N as...

View Article

SSIS: Changing target table without remapping all table columns

In developing an SSIS package that processes data and writes the output to a table with a 100+ columns, is there a way to change the target table name without having to remap all the columns?  For...

View Article


Updating a table from a temporary table

Hi everyoneI have a table which needs to be updated by another temporary table, and I'm having problems doing this.The table is called MAILINGPREFERENCE and the particular column that needs updating is...

View Article


Alternate Way Of Writing the Query

Hello Friends,We have been looking to optimize a query which at times run erratic and keeps changing its execution plan. While this query is static and does not have any parameters passed which could...

View Article

Stored Procedure

Hi,I have a stored procedure that runs for approx 5 mins , its developed by our developers. I need some suggestions that could improve the performance of this SP and probably reduce its time to run,...

View Article

Statistics on memory optimized tables

I am creating the following statistics on a memory-optimized table:[code language="sql"]

View Article

Issue with a column name, I think

Someone made typos when creating our tables.Manufaturing is the name of the column in the tables. that is fine.but there is a Period in the [INVOICE DATE.] column. I have pulled that field before, and...

View Article


View Query Taking more time

I have created a view using below tables. This view takes a lot of time for returning output. I am using this view with other table by left join. Is there any way to increase the performance of below...

View Article

Count mismatch in validation

My colleagues was working on count validation between source and target tables. There were many joins conditions and  in where condition [code language="sql"] where (claim_date<>'01-01-2006' an

View Article


New command/functions in 2014

Hi AllI found this for 2012 that shows the new commandshttps://www.itprotoday.com/sql-server-2012-t-sql-glance-new-and-enhanced-functionsI can'

View Article

Error: The view contains a convert that is imprecise or non-deterministic....

I'd like to be able to index a view having a WHERE clause on date. Index DDL[code language="sql"]USE [DistributionCenterFeed]GOCREATE UNIQUE CLUSTERED INDEX vidx_DE

View Article


How do I insert into a table that only has a single (identity) column?

I have a table with only 1 column "fldID". That column is a primary key (to ensure uniqueness), identity column with a seed of 9000. How do I insert a new record into this table so that I can return...

View Article

Let SQL do the work ?

Long time reader, 1st time poster here. I'm trying to build a stored procedure that creates a table that looks like an excel table. I have 1 table that contains Operator Names and 35 other tables that...

View Article

Update trigger

I have insert trigger for inserting records from T_PDF table into T_WV_RESULT Table. The below trigger is fired when new records are inserted into the T_PDF table. Now need update trigger for

View Article
Browsing all 3145 articles
Browse latest View live