Viewing 15 posts - 1,006 through 1,020 (of 7,191 total)
You'll need to use a splitter function to break your strings down into their individual elements, something like this (not tested because I don't actually have the splitter...
December 27, 2017 at 5:44 am
What is the result of the second query? My guess is that the first one takes so long because it has to return all the data to the client. The...
December 27, 2017 at 5:31 am
December 27, 2017 at 4:21 am
I don't remember "number" being a data type in SQL Server 2000. Is that really what you're using? If it is, please post correct table DDL.
December 22, 2017 at 3:33 am
Let's start by removing the spurious first CTE from your code:WITH rpt_emp as
(SELECT e.EMPLOYEE_NUMBER, e.CLIENT_NUMBER emp_cl_number, -->Part 1 for employees
COUNT(e.CLIENT_NUMBER) OVER() emp_cl, --> Part...
December 22, 2017 at 3:26 am
SELECT v.Address, c.City
FROM Vendors v
LEFT JOIN Cities c ON v.Address = '%' + c.City + '%'
Edit:- added c.City to SELECT list.
John
December 21, 2017 at 8:41 am
December 20, 2017 at 9:57 am
Yes. The UNION operator eliminates duplicates and hence needs to perform a sort operation. If you know there are no duplicates (which I think there aren't, in this case) you...
December 20, 2017 at 9:31 am
If you want to update 10,000 rows at a time, you can use an UPDATE TOP (10000) ... ORDER BY ID statement in your loop. You'll probably need an OUTPUT...
December 20, 2017 at 7:35 am
Use a string splitter to split each date into its individual elements, and keep those that have four characters and can be converted to a number between, say,...
December 20, 2017 at 4:04 am
Have you checked what that error message means? Sounds like some kind of network issue to me, but don't take my word for that.
John
December 20, 2017 at 3:55 am
December 20, 2017 at 2:22 am
I would advise you not to grant access to public. That means that anyone who can get on the server can run the stored procedure. Grant access only to the...
December 19, 2017 at 4:15 am
Then it's your SQL Server Agent service account that needs to have permission to run the stored procedure.
John
December 19, 2017 at 2:58 am
GA_SQL - Monday, December 18, 2017 10:03 AMThe EXECUTE permission was denied on the object 'sp_send_dbmail'
And do you get that error whether...
December 19, 2017 at 1:12 am
Viewing 15 posts - 1,006 through 1,020 (of 7,191 total)