Viewing 15 posts - 7,216 through 7,230 (of 8,731 total)
This should help you to post the information needed.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 14, 2014 at 8:16 am
That's because your column Code is larger than your column Csimplecode.
If you provide DDL of your table, I could give you the exact code, but you basically need to...
January 13, 2014 at 5:24 pm
You might need to do an update on all fields.
Something like this:
UPDATE MyTable
SET column1 = LTRIM(column1),
column2 = LTRIM(column2),
column3 = LTRIM(column3),
--...
...
January 13, 2014 at 5:05 pm
I'm thinking that you might want to include "business hours" on weekends. The easiest way to do it would be using DATEPART. However, you might encounter with the problem of...
January 13, 2014 at 2:45 pm
Your code doesn't seem to exclude weekends, it only excludes hours. Since hours can happen in any given day, you're excluding those hours on weekends as well.
January 13, 2014 at 2:38 pm
Technically, it's a single query and there's no IF..ELSE. 😀
January 13, 2014 at 2:07 pm
That's an ugly db design.
Here's a possible solution.
DECLARE @idEmployee int = 3
SELECT TOP 1 MyAddress
FROM(
select 1 Priority, MyAddress
from #Address a
WHERE EXISTS( SELECT 1 FROM #Emp e
WHERE a.idCompany =...
January 13, 2014 at 1:49 pm
I can't find the reference (so I might be wrong), but I'm sure you can't assign values from a function when declaring parameter defaults.
EDIT: Reference seems to be only for...
January 13, 2014 at 1:32 pm
Sean Lange (1/13/2014)
I will ignore your comment about suggesting that always using NOLOCK is a good idea when integrity of the results is not important. :w00t:
I'm sure he meant that...
January 13, 2014 at 12:57 pm
What about giving us the complete scenario? You say this is a result of a FULL JOIN, but you might not need it if it's a self join.
Please post sample...
January 13, 2014 at 9:51 am
If you haven't changed the query, then the data might have changed. Verify that as you might be in trouble.
January 13, 2014 at 9:14 am
I'm glad I could help even if it wasn't a complete solution for you, but at least you got an idea that worked for you. And it's even better that...
January 13, 2014 at 8:57 am
Is there any reason to use a JOIN when CROSS TABS will work fine?
SELECT Item,
MAX( CASE WHEN Category = 'Small' THEN Value END) ,
MAX( CASE WHEN Category = 'Large' THEN...
January 13, 2014 at 8:48 am
Do you have continuous dates? Or you might have gaps?
January 10, 2014 at 4:04 pm
Here's a possible solution, but I don't know if it's the best.
WITH cteLots AS(
SELECT *,
ROW_NUMBER() OVER( ORDER BY lot_nbr) rn,
ROW_NUMBER() OVER( PARTITION BY lot_OwnerID ORDER BY lot_nbr, lot_nbrDec)...
January 10, 2014 at 2:55 pm
Viewing 15 posts - 7,216 through 7,230 (of 8,731 total)