0
votes
0answers
11 views

How to select shipments that have one activity but doesn't have another one

Simplified version of a table Table ActivityHistory: ActivityHistoryid(PK) | ShipmentID | ActivityCode | Datetime 1 | 1 | CodeA | 2 | 1 ...
0
votes
2answers
10 views

generated excel from SSIS but getting quote in every column?

I have generated and excel from SSIS package successfully. But every column is having extra ' (quote) mark why is it so? My source sql table is like below Name price address ashu 123 ...
0
votes
0answers
13 views

Computed column that uses row_number() or dense_rank() over a partition

This question is related to a previous question, Grouping by or iterating through partitions in SQL I need to support SQL Server 2005, 2008, 2008 R2, and cannot depend on the Enterprise or full ...
0
votes
2answers
21 views

Sum Filtered Value

I have these rows: value1 | value2 | value3 ------------------------- 1231234|23423423|B 2342345|12309123|X 3242344|53453453|X 3453454|45345344|I 2531534|53434534|X 6657555|42342234|I ...
0
votes
0answers
8 views

Could not find the type 'tSQLt.Private'

I have installed tSQLt with CLR permissions Off. I am not sure how it got installed. I see some stored procedure of class tSQLt. Now I am trying to re-install it by cleaning tSQLt, but could not able ...
-3
votes
2answers
54 views

Data Scrubbing in SQL Server

The requirement is to scrub the data. I have loaded data from a flat file into a SQL Server table in some columns there are some values like -111, -11, -11 i.e starting with negative values and there ...
0
votes
3answers
44 views

SQL to Parse a Key-Value String

I have a comma delimited string like this: key1=value1,key2=value2,key3=value3,key1=value1.1,key2=value2.1,key3=value3.1 and I'd like to parse it into a table that looks like this: Key1 Key2 ...
0
votes
2answers
29 views

SELECT by certain bytes of a binary

Is there a way to perform something like the following SELECT? SELECT * FROM TheTable WHERE 3rd_to_5th_bytes_of_column_A = 0x010101; And if there's a serious performance issue - please let me ...
0
votes
1answer
25 views

Can I set a column's default to be a character string from another column on the same row within the same table?

Here is the base table layout: create table employees (employeeid int not null IDENTITY, firstname varchar(50), middlename varchar(50), lastname varchar(50), assumedfirstname default(firstname), ...
1
vote
2answers
23 views

How to use PHP to return the last inserted ID on an MSSQL table with Triggers installed

I am attempting to run a query on an MSSQL database and return the insert ID using PHP. Previously, I had been using the following code for this, which worked fine: $q = "INSERT INTO Pricing ...
-3
votes
3answers
52 views

Remove all after space in SQL Server data column

I have a data column in SQL Server that always starts with a number and sometimes has a space after the number with additional details. This is a text column. I need a query that will remove ...
-1
votes
2answers
56 views

SQl left outer join to fill null

I have joined two tables in SQL (see below) using a left outer join. Is it possible to fill the null cells with other data? sqlfiddle (from fiddle) CREATE TABLE Data1 (cost_type ...
2
votes
4answers
84 views

SELECT a single field by ordered value

Consider the following two tables: student_id score date ------------------------- 1 10 05-01-2013 2 100 05-15-2013 2 60 05-01-2012 2 95 ...
0
votes
1answer
16 views

Connect SAS to a Microsoft SQL Server database

I'd like to connect SAS to a Microsoft SQL Server database but I didn't succeed. I already have a database connection using a NT authentication. For instance, when I want to connect R (the ...
1
vote
3answers
54 views

Qry runs too long and index didn't work

I created an index to help a really long 28 minute qry run faster and it doesn't seem to have helped to much. This is the Index I created USE [NLTR201212_test] GO CREATE NONCLUSTERED INDEX [Billys ...

1 2 3 4 5 1723
15 30 50 per page