Viewing 15 posts - 1,381 through 1,395 (of 1,492 total)
Add a single quote to the value. This will left justify the value in the cell
'010
June 5, 2014 at 1:38 pm
Sean, I got to the your second t-sql and decided something was missing, as you need to associate a person with a course. 🙂
June 5, 2014 at 12:24 pm
We would need to know the schema of the tables involved.
June 5, 2014 at 12:08 pm
Thanks ChrisM@Work
Worked well on my sample data and I am now trying to get it to work on actual data.
I have replace the CROSS APPLY (SELECT TOP(a.PerAgent) n FROM (VALUES...
June 5, 2014 at 10:12 am
Also I find if I start a simple code to test what I am doing I will find the problem in the big picture. I will take my code...
June 4, 2014 at 1:43 pm
Thanks Sean, I had thought I was correct, however, since I am always learning new things I thought I missed something.
June 4, 2014 at 11:06 am
dquirion78 (6/4/2014)
I'm using Sql server 2012
On my stored procedure I declare table variable but I have an error "must declare @temptable in my cte" How I can use...
June 4, 2014 at 10:43 am
How about:
select e.empid, coalesce(c1.email, c2.email, 'No email')
from employee e
left join contact c1 on e.empid = c1.empid AND c1.orderby = 1
left join contact c2 on e.empid = c2.empid AND c2.orderby =...
June 4, 2014 at 8:33 am
Could you use something like COALESCE(email1, email2, 'No Email')
June 4, 2014 at 5:49 am
Why single job?
Look up WaitFor which might do what you want.
May 30, 2014 at 4:59 am
Make sure where SQL thinks c:\users\xxx is as it could be looking at the SQL server not the system where you are running the code.
May 27, 2014 at 7:58 am
bigcj (5/27/2014)
Tables:
F_Discount
Item_IDDiscount_Period_StartDiscount_Period_EndDiscount_Percentage
1001 2011-01-01...
May 27, 2014 at 7:53 am
There is actually only a small number of records so performance is hard to establish. And I have not done the execution plans.
However, reading only one query is a...
May 21, 2014 at 8:46 am
Here is what I ended up withUPDATE H SET
Phone1 = NULLIF(Phone1, D.Phone),
Phone2 = NULLIF(Phone2, D.Phone),
Phone3 = NULLIF(Phone3, D.Phone),
Phone4 = NULLIF(Phone4, D.Phone),
Phone5 = NULLIF(Phone5, D.Phone),
Phone6...
May 21, 2014 at 8:34 am
Viewing 15 posts - 1,381 through 1,395 (of 1,492 total)