Viewing 15 posts - 106 through 120 (of 187 total)
souLTower (1/29/2009)
January 29, 2009 at 10:18 am
I recommend you do a few things:
- Is it really necessary to join 7 tables all using FULL OUTER JOIN? It's really bad database design if that's the case. Most...
January 29, 2009 at 10:08 am
I'm still on 2000, so I'm not into CTE's (yet)... So this would be my solution:SELECT id, [desc], loc, SUM(qty1), SUM(qty2)
FROM (
SELECT T1.id, T1.[desc], T2.loc, T2.qty1, 0 qty2
FROM Table2 T2...
January 29, 2009 at 9:47 am
It seems not, however you can change it to something like this:
SELECT COUNT(*)
FROM
(
SELECT col1, col2, col3
FROM table
GROUP BY col1, col2, col3
) X
January 29, 2009 at 8:52 am
This should do it:SELECT a.groupid, b.name, COUNT(a.groupid) AS 'Total #'
FROM subjects a
INNER JOIN Group b ON a.groupid = b.groupid
WHERE subjecttype IN ('member','affiliate') AND a.groupid like '03%'
GROUP BY a.groupid, b.name
HAVING COUNT(a.groupid)...
January 29, 2009 at 8:25 am
When you can use Windows authentication, do that. However, applications using the database, are mostly not on the same domain, so that requires using SQL Server authentication. Means you'll end...
January 29, 2009 at 7:00 am
Please do not post the same question in 2 different categories, as urgent as it may be...
January 26, 2009 at 11:51 pm
What you're trying to do is very dangerous, because what would you do with the following numbers:
1: 1,234.45
2: 1.234,45
3: 1234,45
4: 1234.45
The same value in different formats, based what country settings...
January 22, 2009 at 5:25 am
When you want to use a variable in a SQL statement, you need to do this a bit different:
CREATE PROCEDURE sp_GetTasks
@colname nvarchar(50),
@colvalue...
January 20, 2009 at 10:10 am
Can you provide table description and sample data, so I can play around with it? The article in the link below describes very well how to do this.
January 20, 2009 at 10:03 am
I don't know if you know anything about theory and understanding databases commons. I did, and I first learned (well, first dBASE III/IV) Access, then SQL Server. Using all the...
January 19, 2009 at 11:15 am
Only strange thing I see in your query is that tm_actvy appears in both as a table name and a column name, is that correct?
Other thing is that you should...
January 19, 2009 at 11:05 am
I'm glad to help... For understanding what went wrong, you might check out this article: http://www.sqlservercentral.com/articles/Performance+Tuning/62278/
January 19, 2009 at 7:34 am
dvora.id (1/19/2009)
I created a selective insert query.
When I’m activating the update part the query takes a lot of time more than hour.
I think that I’ll need to insert some index...
January 19, 2009 at 5:18 am
Viewing 15 posts - 106 through 120 (of 187 total)