Viewing 15 posts - 2,866 through 2,880 (of 7,187 total)
Nicole
You say it's for ETL processing - are you using SSIS? If so, you might consider weeding out the invalid values in your data flow. There are ways...
January 5, 2016 at 3:21 am
One way to get round it is to dynamically set the properties of the connection manager, instead of the data source.
John
January 4, 2016 at 8:28 am
Try this. It relies on there being a unique key in your table, which I've represented by the column OrderbyThisCol.
CREATE TABLE Names (
OrderbyThisCol int NOT NULL PRIMARY KEY
,Name varchar(10)...
January 4, 2016 at 5:37 am
Satheesh
What error message do you get when the connection fails? Is there anything in the errorlog? What protocol are you using both locally and remotely to connect with...
December 24, 2015 at 4:58 am
I prefer CTEs to subqueries because you can get all the definitions out of the way at the front, and then the main query looks more neat and compact.
John
December 24, 2015 at 2:41 am
It's partly about preference, and partly about using the right tool for the right job. If a CTE is unnecessary, don't use it. If you prefer subqueries, don't...
December 24, 2015 at 2:01 am
I suppose you could create the table on the fly if you don't want a permanent one. This is a common technique. It would be a bit fiddly,...
December 23, 2015 at 10:16 am
Here's one way of doing it. It may or may not be the most efficient. Create a table of dates with one row for each date between the...
December 23, 2015 at 9:30 am
The trigger fires once per update, not once per row updated. It will have an adverse effect on performance if you use a loop instead of a set-based update....
December 23, 2015 at 9:21 am
murtzd (12/22/2015)
I can't get that piece of code to work.
Error messages? Unexpected results?
What is the % sign in the join?
Please see here. It's so that we only consider...
December 22, 2015 at 6:02 am
Shazme
It's not always a problem if the database collation doesn't match that of the server. You usually get issues if your code creates temp tables and joins to...
December 22, 2015 at 5:50 am
-- I've tweaked your table definition so as to use proper dates instead of months numbers
-- Notice the constraints to keep any dodgy dates out of the table
CREATE TABLE dbo.AssetPayments(
FileMonth...
December 22, 2015 at 3:53 am
So if the ExpectedDate changes, for example, from 2015-12-01 to 2016-01-11 then you could find yourselves renumbering the visits for two years - do I understand that correctly? What...
December 22, 2015 at 2:58 am
Sean's code is right. The reason your code didn't work was you missed out the parentheses:
SET @parameter = (select distinct column_name from table_name)
You won't get a syntax error for...
December 21, 2015 at 8:22 am
Sounds like a homework question. Here's a hint - order by NEWID().
John
December 21, 2015 at 3:12 am
Viewing 15 posts - 2,866 through 2,880 (of 7,187 total)