Viewing 15 posts - 2,491 through 2,505 (of 7,191 total)
T_SQL isn't very good at string manipulation, as you've possibly noticed. The easiest way would be to use a Regular Expressions CLR - you should be able to find...
July 7, 2016 at 9:46 am
Well, yes - if you've managed to move the data, even if you didn't do it in the most efficient way, you can still use it. But you can...
July 7, 2016 at 8:28 am
You're welcome. I didn't realise you were scripting out the INSERTs as well, and I agree with Gail that you should script out just the object creation, and use...
July 7, 2016 at 8:24 am
OK, take the penultimate join predicate and replace it with this:AND CASE -- make sure the end is after the start
WHEN d.PeriodStart > CAST(CAST(d.PeriodStart AS date) as datetime) + v.n...
July 7, 2016 at 7:25 am
Since you're getting a timeout table, I would say the easiest thing would be to script fewer tables at a time.
John
July 7, 2016 at 5:55 am
This ended up a little complicated, but it works, at least for the date range you provided. I had to mangle some of the keywords to allow me to...
July 7, 2016 at 4:13 am
I'm lost. What does "based on table name" mean? Choose the table whose name comes first alphabetically? Please will you post your whole query so I can...
July 7, 2016 at 2:51 am
COALESCE isn't going to work - it's only any use if any of the inputs are likely to be NULL. Now, where a column name exists in more than...
July 7, 2016 at 2:19 am
I take it the Sql Express 2008 Machine and your laptop are different computers? Have a look at the Security tab of the linked server object and work out...
July 7, 2016 at 2:07 am
Not enough information there, I'm afraid. Please will you post a script to create the linked server, and an example of a query that doesn't work, together with any...
July 6, 2016 at 9:58 am
Yes, but that's not because of the INNERness or the OUTERness of the join - it's because you're joining on Location. Since many projects can share the same location...
July 6, 2016 at 9:47 am
No, not as far as I know. What permissions is he missing? How did you do the attach and reattach of the databases? What did you change...
July 6, 2016 at 9:18 am
OK, here's your issue. Another poster changed to a LEFT JOIN to ensure you get all the projects, and you ran with that also. That's fine, but for...
July 6, 2016 at 9:00 am
What do you mean, why doesn't it work? Error message or wrong results? Do you have any projects where ProjectType is blank?
By the way, you need to be...
July 6, 2016 at 8:06 am
WHERE p.ProjectType <> 'New' AND (ABS(DATEDIFF(month, p.Finish, np.Finish)) <= 2
or
WHERE p.ProjectType = 'New'
John
July 6, 2016 at 7:17 am
Viewing 15 posts - 2,491 through 2,505 (of 7,191 total)