Viewing 15 posts - 31 through 45 (of 120 total)
I wrote this query to show me which record are duplicates, but can't figure out how to delete the records, but leave one:
select SERVICEOPTIONSKEY, ACCOUNTKEY, count(serviceoptionskey) AS [COUNT] from...
August 23, 2010 at 3:59 pm
Thank you! This worked perfectly!
SELECT SUBSTRING(ACCOUNTNUMBER, 1, 3)+'-'+SUBSTRING(ACCOUNTNUMBER, 4, 5)+'-'+SUBSTRING(ACCOUNTNUMBER, 9, 2)
FROM BILLING.ACCOUNT
July 21, 2010 at 9:04 am
So far, I'm able to select the first three and then add an dash like this:
SELECT LEFT(ACCOUNTNUMBER, 3)+'-'
from BILLING.ACCOUNT
But I'm not sure where to go from here. Should I...
July 21, 2010 at 8:47 am
Nevermind, I got it:
select * from tablename
WHERE charindex(stsub, address) = 0
July 7, 2010 at 3:34 pm
That worked perfect and give me all the records have has stsub as a part of address. Now, on the flip side of that, if I wanted to know...
July 7, 2010 at 3:28 pm
Thanks! That worked perfectly. I knew that I was missing something!
Gotta remember that IN statement!
Jordon
June 9, 2010 at 10:09 am
Found the solution here:
http://www.sqlservercentral.com/Forums/Topic801367-146-1.aspx
May 26, 2010 at 8:25 am
Just as an update to this. I've tried running it as SA and a couple other accounts, with the same results. This make sense, since the sde account...
May 26, 2010 at 8:13 am
Just so that I'm clear, I never had an issue with this job running under 2005.
Thanks again!
Jordon
May 26, 2010 at 7:24 am
Ok, so this worked perfectly:
declare @fullName varchar(30)
SELECT @fullName = Name1
FROM UBMAST
select LEFT(@fullName, CHARINDEX(',', @fullName) - 1) as NameLast,
STUFF(@fullName, 1, CHARINDEX(',', @fullName), '')...
May 20, 2010 at 8:14 am
This worked perfectly
with BizDates (Bdate)
as (
select [Date]
from calendar A
left outer join HolidayTable B on A.[Date] = B.Hday
where B.Hday is NULL
)
--(alternatively you could eliminate the holidays from this table when you...
March 15, 2010 at 2:59 pm
Viewing 15 posts - 31 through 45 (of 120 total)