When I give condition as Datecolumn >= '05/14/2015' It executes faster and gives me data around 10000 records within a second. However if I changed condition as Datecolumn >= '05/15/2015' or any later date it takes lot of time to execute and applica
I have a XML column in SQL Server. Example data below <row id="AC.1.TR.AUD.12800............" xml:space="preserve"> <c1>AC</c1> <c2>1</c2> <c3>TR</c3> <c4>AUD</c4> <c5>12800&l
I'm trying to execute a DTS from sqlserver 2008 R2 (Windows Server 2008 Standard) from stored procedure xp_cmdshell. But getting below error: Microsoft (R) SQL Server Execute Package Utility Version 10.50.4000.0 for 64-bit Copyright (C) Microsoft Cor
I am very new to SSIS and I am building a package which will import files. I have a Execute SQL Task which will execute a SQL statement which will return files that needs to be imported, but the files will need to go into different tables depending o
I'm writing up a report using SQL Server Reporting Service via Visual Studio 2008. I have a stored procedure on a SQL Server database that returns a list in which I need the entry with value "F" in colulmn [Column] to be always on top, as such:
I need to allow multi select on a column where the values are all CSV. I had been using a LIKE statement and a single select parameter but I need the parameter to allow multiselect. An idea I had was to create columns for each of the parameter values
I'm trying to create a matrix with historical data for some parameters I have in a table. The matter is, when I try to pivot it, won't work. Using the following code SELECT concept, [1] '1993', <...>, [23] '2015' FROM (SELECT concept, YEAR(begin_dat
I identified a couple of Update statements on a Large Partitioned table as Deadlock victims from extended events. How should I proceed with Fixing this? This table doesn't have an Index. We are using UniqueIdentifier (RefGuid) in where clause of both
I make Chart Report using SSRS I have problem is my long series label not show whole text For Example if label is "Personal Computer" it's show "Personal C......" see image below and this is whole Chart area it's have more space betwee
Simply this is my Question. I'm using SQL Server 2014 Standard Edition A) SQL Server Browser Enable B) TCP/IP, Named Pipes, Shared Memory Enable C) Default Port 1433 D) Server Properties -> Connection -> Allowed remote connections to this server E)
I want to update date time column in my SQL server.Consider the date time column contains following values, 2015-02-13 00:00:00.000 2015-02-18 00:00:00.001 2015-02-21 00:05:00.002 2015-02-13 00:03:00.003 2015-02-19 01:00:00.004 2015-01-13 00:00:00.00
I know how to check if the values exist in both table, but how can I add a column indicate it find something SELECT NAME, ID FROM TABLE_A TA WHERE EXISTS (SELECT 1 FROM TABLE_B TB WHERE TA.ID = TB.ID) Result NAME ID 1 123 2 234 3 345 What I want NAME
I tried many query to achieve the expected result , I couldn't find any solution. Actual:- ID | EmpDailyFee | EmpMonthlyFee | CompDailyFee | CompMnthlyFee 1 NULL 12 NULL NULL 1 50 NULL NULL NULL 1 60 NULL NULL NULL 2 50 NULL NULL NULL 3 NULL 30 NULL
I am trying to match IP addresses. The input IP address can be "5.1.82.1". So, I am matching like first part of input IP address with all the IP address in database that start with 5. My query is like following SELECT top 1 PARSENAME(ipaddress,
I need to put some chemical data into a table. But I realized that unicode hasn´t got subscript/superscript code for all characters in alphabet. For example I´m trying to type "org" ("C_org" - organic carbon) as subscript into column b
I have two tables TwitterStatus and twitterstatusDetails, I have data respectively in following manner. Here as given in twitterstatus table 4th record with the ts_StatusID "587573444633427968" is parent of twitterstatus_Details table 3rd record
I'm trying to get data for the rolling 13 weeks, but not sure how to do it correctly. I have tried this: DATEDIFF(week,Completed_date,GETDATE()) < 13 But I get 14 weeks instead of 13 and I think this might get me incorrect results as it goes 91 days
How can I write: SELECT TOP 1 x FROM y ORDER BY NEWID() using querydsl-sql? (See http://stackoverflow.com/a/4980733/14731 for an explanation of what the query does) --------------Solutions------------- I ended up doing the following: import com.mysem
Really long story short, I have two datetime fields in a table that I am loading into variables @DateFrom and @DateTo, and I need to "explain" what sort of range they cover in text for presentation on the screen. Although the fields are datetime
I have the following error when creating a new database in SQL Server 2012: because it is on a volume with sector size 2097152. SQL Server supports a maximum sector size of 4096 bytes. Move the file to a volume with a compatible sector size. CREATE D