Viewing 15 posts - 211 through 225 (of 1,082 total)
try putting this after your rollback:
DBCC CHECKIDENT (#T1,reseed,0)
DBCC CHECKIDENT (#T1,reseed)
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 28, 2009 at 8:02 am
this might work, by converting the numeric to varchar instead.
select *
from thangela.NpowerNorthern_v1 a INNER JOIN EPPS.dbo.Customers b ON b.MPANCORE = CAST(a.MPAN1 as VARCHAR)
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 28, 2009 at 7:50 am
are you sure that all your varchar values are numerically compatebly?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 28, 2009 at 7:48 am
SELECT p.Name, sCost, mCost, hCost, tCost
FROM TProject p
OUTER APPLY (SELECT SUM(Cost) as sCost,idProject FROM TSoftware WHERE idProject = p.idProyect GROUP BY idProject) s
OUTER APPLY (SELECT SUM(Cost) as mCost,idProject FROM...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 28, 2009 at 2:12 am
Is the project not the top level here.
Also should you query not look like this.
SELECT p.name, SUM(s.cost) AS Software, SUM(m.cost) AS Material, SUM(t.cost) AS Travel, SUM(h.cost)...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 27, 2009 at 10:05 am
Please could you supply some sample data.
I've added the following data and I don't get any duplicates.
One thing to please check is that there are no duplicate names in your...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 27, 2009 at 10:02 am
Here is an article that Gail touches on about this topic.
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 27, 2009 at 6:29 am
[Code]
DECLARE @YourTable TABLE
(ScheduleuserId INT,Userid INT, Status INT)
INSERT INTO @YourTable
SELECT 1, 1, 0 UNION ALL
SELECT 1, 2, 1 UNION ALL
SELECT 1, 3, 2 UNION ALL
SELECT 1, 4, 0 UNION ALL
SELECT...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 27, 2009 at 5:21 am
be careful, because it isn't always the best option...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 24, 2009 at 5:02 am
Out of interest which method did you take?
I'm with Jack on this, I have started moving to NOT EXISTS as I also find that I often get better performance...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 24, 2009 at 4:28 am
just remember that your solution does not take into account time.
so for example if you run the query at 2009-04-21 16:38.59
Then anything before 16:38.59 on the 2009-04-14 will not be...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 21, 2009 at 9:39 am
Could you post the solution?
this will help any others searching for a similar solution 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 21, 2009 at 9:23 am
I agree 100% 🙂 I think the tools for your solution have now been provided and working out the last part will provide a good learning platform for you to...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 21, 2009 at 9:12 am
Try give it a go.
So you here is your current date:
15/01/2009
try and right the code.
What you want to try and do is either.
Make you [TableDate] > currentdate - 7 days...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 21, 2009 at 9:07 am
thanks Grant 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
April 21, 2009 at 9:04 am
Viewing 15 posts - 211 through 225 (of 1,082 total)