Viewing 15 posts - 106 through 120 (of 1,082 total)
Hi,
Please could you save the graphical "Actual Execution Plan" as a .sqlplan zip it up and attach it.
Also could we get index definitions for for the tables in your query.
Without...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 3, 2009 at 5:14 am
I'm pretty sure that sql you are writing is doing what it is supposed to do.
It's just a matter or asking sql correctly 🙂
but yeah I would say there is...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2009 at 6:29 am
I can't see how that is possible as the field's don't match up to what you have posted as sample results...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2009 at 5:27 am
what query did you use for that sample data?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2009 at 5:00 am
try this:
--YOUR TABLE
DECLARE @emp TABLE
(ID INT IDENTITY(1,1),
Name VARCHAR(10),
AGE INT)
--TEST DATA
INSERT INTO @emp
SELECT 'Kings',16 UNION ALL
SELECT 'Wings',18 UNION ALL
SELECT 'Sings',20 UNION ALL
SELECT 'Things',22
--SOLUTION
SELECT id,Name as Field FROM @Emp UNION
SELECT id,CAST(age as...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2009 at 3:44 am
it all depends where your duplicates are coming from?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2009 at 2:09 am
you need to list the columns you going to insert into:
Insert into Table
(ID ,Name ,LastName ,zoneID)
Select ID, Name, LastName, Zone ID
from OtherTable
Where date >= '01/01/2009'
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 10:15 am
could post some sample data of input and output data.
Please also refer to the first link in my sig for posting , that will result in the faster help from...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 9:10 am
will also need to see the query as mentioned above but I have noticed that the table:
"tblPEI_product" has many many Clustered Index Scans.
there might be a way for us to...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 9:04 am
it could be parameter sniffing, search around here and you should find some good answers to it
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 8:58 am
Sorry me again...
Two other things I noticed in your query, and which out know the actual relationships and meanings of the tables/fields I might be wrong but...
I have noticed that...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 6:33 am
out of interest. am I correct in saying that this query should report the total financials per grouped by each place?, if so then you going to need to do...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 6:25 am
exactly correct, see my example above try doing that will all the subqueries you basically just change the column alias from heat to say sewer etc and change the case...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 6:17 am
~The query is also a bit confusing I see you have GROUP BY clause but I can't find any aggreation functions in your select.
So I'm guessing this is what you...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 6:13 am
The reason you would get an error like that is going to be down to one of the many correlated-subqueries you have in the select part of your query.
because each...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 1, 2009 at 6:08 am
Viewing 15 posts - 106 through 120 (of 1,082 total)