Viewing 15 posts - 241 through 255 (of 268 total)
Robert Frasca (4/14/2014)
From what I can see, that's only true for parameters passed to stored procedures. .
Actually its not so much that but the difference between an Execute SQL Task...
April 15, 2014 at 12:44 pm
In this case the error message means exactly what it says. In general, when you have aggregates (like the SUM() function in your query), you have to list *all*...
April 15, 2014 at 11:41 am
Here's one way that might do it:
DECLARE @Pct float = .25
DECLARE @maxID int = (select max(ID) from #TesteTable)
MERGE INTO #TesteTable a
USING (
SELECT ID, Duration, A+A*@pct as...
April 15, 2014 at 11:03 am
Try commenting out the first "order by" clause. It makes no sense to order the data before UNION anyway
April 15, 2014 at 10:35 am
Right, The local variable type is Int64. However, what is the parameter type (in the SQL task Parameter Mapping tab.) IN your case, that should be LONG, I...
April 14, 2014 at 10:58 am
Are you passing the parameter as an integer (e.g. LONG)?
April 14, 2014 at 9:42 am
One advantage is that Select...Into can lock the database until the insertion is completed.
FWIW I sometimes go with this:
-- Step 1. Create target table
select <whatever>
into #target
where 1 = 0
...
--...
April 11, 2014 at 1:29 pm
Dominic Gagné (4/11/2014)
Let's say I have a query like:
SELECT * FROM Table1 T1
INNER JOIN Table2 T2 ON T1.ID = T2.ID
INNER JOIN Table3 T3 ON T1.ID = T3.ID
LEFT JOIN Table4 T4...
April 11, 2014 at 1:19 pm
Sure you can do it. You'll need to join on a subquery that gets the max datetime value
April 11, 2014 at 1:15 pm
See my Post #1560145 above
April 11, 2014 at 12:26 pm
1. Look at the query plan for any table scans and try to restate your query to avoid them
2. Add indices to match the columns you join or search on.
3....
April 11, 2014 at 7:10 am
Your second select is missing a comma:
SELECT '', 'SB9104520001', '2010-05-24', 'GLD', '8058581', NULL 'USD', '40122.00', '4251'
There should be a comma between NULL and 'USD'
Also, your ddl specifis that the column...
April 11, 2014 at 7:07 am
Lots of good resources, starting MSDN:
Brent Ozar:
http://www.brentozar.com/sql/table-partitioning-resources/
MS SQL Tips:
http://www.mssqltips.com/sqlservertip/2888/how-to-partition-an-existing-sql-server-table/
Mark Chapple:
http://databases.about.com/od/sqlserver/a/partitioning.htm
MSDN Blogs:
http://blogs.msdn.com/b/manisblog/archive/2009/01/18/easy-table-partitions-with-sql-server-2008.aspx
...and many, many more!
April 11, 2014 at 6:00 am
What's wrong with 1.3 seconds?
Seriously though, be sure you have indices on the join columns. Pre-aggregate the minimum calculations do reduce the join rows.
April 10, 2014 at 10:54 am
You're still rendering it directly as text. I think its better to return a float and let SSRS format it according to the formatting you set up. Also,...
April 9, 2014 at 4:14 pm
Viewing 15 posts - 241 through 255 (of 268 total)