Viewing 15 posts - 16 through 30 (of 153 total)
I looked up reading and writing images to and from the database, because I think the concept would be similar. A nice explanation with some C# code is here:
June 10, 2008 at 1:18 pm
an alternate solution:
create table #test(PersonID int, [Value] int, Altvalue int)
Insert INTO #test
Select 1, null, 6
union all select 1, null, 6
union all select 1, null, 6
union all select 1, null, null
union...
June 5, 2008 at 10:21 am
The DISTINCT keyword is the same as a group by with no aggregates. I don't know if it's faster or not.
June 5, 2008 at 10:16 am
This is what he is saying:
set @sql_str='select * from mydatabase.dbo.mytable'
If you fully qualify the tablename prefixed with the database, you can execute against that table regardless of the connection context...
May 23, 2008 at 9:02 am
Go to Tools|Options|Results tab
and set the max characters per column value higher...
May 16, 2008 at 10:35 am
Mahesh, I disagree. From what I understand, the query optimizer will determine which table to select from first. I've experimented with changing my join order around, and the query plan...
May 15, 2008 at 11:24 am
You'll have to make it a dynamic query. That is, build your sql string, and execute it
declare @sql nvarchar(max)
Set @sql = 'update ' + @tablename...
May 12, 2008 at 12:38 pm
And if you forget a condition in your where clause linking two of the tables together, it is an implicit CROSS JOIN.
May 9, 2008 at 8:52 am
Hmmm. Since the columns are the same across the two, I'd create one table, and simply have another column indicating "type" whether it be a numeric value(1,2) or a char(1)...
May 7, 2008 at 12:13 pm
1. Tables scans are bad. Maybe some indexes on the temp tables depending on how large they are.
2. Joining to table valued functions can also significantly impact performance.
We went down...
May 1, 2008 at 1:43 pm
Hmmm...or more circuitously:
Select * From table where len(myColumn) + 1 <> len(myColumn + '.')
I'm sure there's a flaw in my logic here, but the idea is to exploit the behavior...
April 28, 2008 at 10:52 am
I believe that the temp table will stay there as long as you have the SSMS window open, which is why when developing, I always put the drops in so...
April 24, 2008 at 1:34 pm
you can research the AVG and MAX aggregate functions. There are plenty of samples in BOL.
April 24, 2008 at 5:26 am
If I'm not mistaken, #temp table are implicitly dropped at the end of the stored procedure regardless of whether or not you explicitly drop it. ##temp tables (global ones) must...
April 22, 2008 at 7:57 am
It's efficient when your users aren't complaining that its slow 🙂
April 22, 2008 at 7:52 am
Viewing 15 posts - 16 through 30 (of 153 total)