Viewing 15 posts - 421 through 435 (of 3,957 total)
CELKO (2/2/2015)
This is a garbage pile; it has not key and no way to have a key.
I thought they called that a heap?
February 2, 2015 at 6:01 pm
One other thing. If you do have lots of rows (more than in the sample data), you might want to experiment with breaking Nevyn's solution into a divide-and-conquer approach,...
February 2, 2015 at 5:59 pm
sqldriver (2/2/2015)
dwain.c (2/2/2015)
sqldriver (2/1/2015)
Hello,Given the below table, how would you go about finding bars that carry the same brands of scotch?
So I've got to ask, why do you need...
February 2, 2015 at 5:54 pm
And here I was thinking the standard way to do an Upsert in SQL 2005 was like this:
IF EXISTS
(
SELECT 1
FROM tblCustomer
...
February 2, 2015 at 5:47 pm
Post deleted because I realized Jeff suggested the same thing (a COMPUTED PERSISTED column).
February 2, 2015 at 5:37 pm
Lowell (2/2/2015)
...maybe switch to using a sql_variant.
What a brilliant idea!
WITH SampleData (ID, Pay) AS
(
SELECT 1, CAST(1.000 AS NUMERIC(19,3))
UNION ALL SELECT 2,2.250
...
February 2, 2015 at 5:34 pm
sqldriver (2/1/2015)
Hello,Given the below table, how would you go about finding bars that carry the same brands of scotch?
So I've got to ask, why do you need it in...
February 2, 2015 at 5:22 pm
I see at least 2 issues here:
KGJ-Dev (1/30/2015)
Below is the sample data to play with.
declare @users table (IDUser int primary key identity(100,1),name varchar(20),CompanyId int, ClientID int);
declare @Cards table (IdCard int...
February 1, 2015 at 5:46 pm
An effective method is a CROSS APPLY VALUES UNPIVOT (described in my signature links):
WITH Students (id, studname) AS
(
SELECT 1, 'x'
UNION ALL SELECT...
February 1, 2015 at 5:27 pm
There are various ways to do this depending on what version of SQL you're in.
Creating a Date Range from Multiple Rows Based on a Single Date[/url]
The article shows them and...
February 1, 2015 at 5:16 pm
So what results do you want to get out of that sample data?
January 29, 2015 at 8:02 pm
dwain.c (1/29/2015)
First of all, in the batch above you need to have a GO directive between END and EXEC.
You can ignore this part of what I said. I realize...
January 29, 2015 at 7:14 pm
Try changing this:
si.TrackingNumber like '%' + @SearchText +'%'
to this:
si.TrackingNumber IS NOT NULL AND si.TrackingNumber like '%' + @SearchText +'%'
And if that helps, read this article to see why:
January 29, 2015 at 6:02 pm
Or maybe it would be best to just skip all of that insufferable reading and do it like this.
WITH SampleData (ID, Amount, Months) AS
(
SELECT 1, 143.23,...
January 29, 2015 at 5:52 pm
You might want to read this article:
Financial Rounding of Allocations [/url]
The problem solved there differs slightly in that you're trying to allocate an amount across rows with different values, but...
January 29, 2015 at 5:35 pm
Viewing 15 posts - 421 through 435 (of 3,957 total)