Viewing 15 posts - 211 through 225 (of 395 total)
In both of them you're mixing character & numeric data joined by +.
You need to CAST/CONVERT it all to character.
What data type are [BU], [SUBSIDUARY] & [OBJECT]?
CASE
WHEN [ORDER_TYPE] =...
September 28, 2012 at 9:36 am
You can make it longer by concatenating strings:
declare @nblah nvarchar(max)
set @nblah = convert(nvarchar(max), '')
set @nblah = cast(replicate('0', 8000) as nvarchar(max)) + cast(replicate('0', 1000) as nvarchar(max))
select len(@nblah), datalength(@nblah)
September 28, 2012 at 9:31 am
You need to add FoneID & FloorID to MoozeTroofe.
Allow NULL values, & only populate them as required - i.e. when there is a join.
Join to Fone & Floor using LEFT...
September 28, 2012 at 7:38 am
emile.milne (9/28/2012)
With a MASSIVE impact advantage missing index (second row).
Why do you think there would be a massive impact?
September 28, 2012 at 6:21 am
You could check out the data & see if it's possible to get duplicate rows.
Someone might have added it because its needed, or maybe 'just in case'...
September 28, 2012 at 6:03 am
By the way, if you change the query to left outer join on E, you will get NULLs in the E columns where there is no matching data.
You can handle...
September 28, 2012 at 5:51 am
DISTINCT removes duplicate rows from the result set. Only remove it if there ARE no duplicate rows!:-)
September 28, 2012 at 5:47 am
Here's how to make the LEFT OUTER JOIN on E.
You should not put join conditions in the where clause - it's very old fashioned, & it's easier to read if...
September 28, 2012 at 5:15 am
Jason-299789 (9/28/2012)
laurie-789651 (9/28/2012)
-------------------------------------------------------------------------
DECLARE @A Int, @b-2 Int, @C Int;
SELECT @A = 9,
@b-2 = 3,
@C =...
September 28, 2012 at 4:37 am
If you do the CAST on the first value to be processed, that should fix it:
-------------------------------------------------------------------------
DECLARE @A Int, @b-2 Int, @C Int;
SELECT @A = 9,
@b-2 = 3,
@C = 2;
SELECT Cast(SUM(@A*@B)...
September 28, 2012 at 4:12 am
Grant Fritchey (9/28/2012)
anthony.green (9/28/2012)
Grant Fritchey (9/27/2012)
THREADIZENS!Who is going to make it to any of the SQL in the City events coming up in the next week+?
I missed the London one's...
September 28, 2012 at 4:03 am
Can you tell us the exact specification of the 3 fields/columns? - e.g. A is Decimal(30,5) etc...
Give us some examples too.... Thanx
September 28, 2012 at 4:01 am
Error trapping is for errors. It may appear similar at a code level but under the hood it uses many more recources to process (according to posts on SSC).
It's...
September 28, 2012 at 3:30 am
Koen Verbeeck (9/28/2012)
Grant Fritchey (9/27/2012)
THREADIZENS!Who is going to make it to any of the SQL in the City events coming up in the next week+?
If you do one in Brussels...
September 28, 2012 at 3:24 am
ChrisM@Work (9/28/2012)
Koen Verbeeck (9/28/2012)
Grant Fritchey (9/27/2012)
THREADIZENS!Who is going to make it to any of the SQL in the City events coming up in the next week+?
If you do one in...
September 28, 2012 at 3:21 am
Viewing 15 posts - 211 through 225 (of 395 total)