Viewing 15 posts - 376 through 390 (of 595 total)
OK, here goes:
1) Remove the INDEX HINT. Let SQL Server optimize on its own; it will usually pick the right path if the SQL is well-written.
2) Use modern SQL...
June 5, 2003 at 8:12 am
Try:
DELETE FROM Orders
FROM Orders
INNER JOIN
(
SELECT Order_No, Line_No, MAX(Ship_Date) as MaxShipDate
FROM Orders
GROUP BY Order_No, Line_No
) AS dt
ON Orders.Order_No = dt.Order_No
AND Orders.Line_No = dt.Line_No
AND Orders.Ship_Date <> dt.MaxShipDate
June 4, 2003 at 2:05 pm
Option 1:
You can vertically partition a table by splitting the structure of a table into multiple tables based on column. For instance, you can have a main table with...
June 4, 2003 at 5:52 am
quote:
..can anyone out there think of a workaround?...
What are you trying to work around?...
May 29, 2003 at 9:18 am
quote:
In Access, the First and Last functions allow you to retrieve the first or last value (field) within a Group...
May 29, 2003 at 9:14 am
What's the difference between MIN and First and MAX and Last. YOu can also use TOP clause and the order by clause to produce the results needed.
Edited by -...
May 29, 2003 at 8:45 am
Don't mess with the system tables. Enterprise Manager has a GUI for modifying server logins and roles, and database users and roles. Click to the Server --> Security...
May 29, 2003 at 8:32 am
The NVARCHAR data type is for Unicode character sets. If you don't need Unicode character set, use VARCHAR, which is single byte-wide character set as opposed to 2-byte wide...
May 29, 2003 at 8:27 am
I know this sounds like a stupid question, but why not just let the file system do what it's designed to do and just store the path in the DB?
...
May 29, 2003 at 7:53 am
here you go:
select table.c1, table.c2, table.c3, dt.count_c1
from table inner join
(
select c1, count(*) as count_c1
from table
group by c1
having count(*) > 1
) as dt on table.c1 = dt.c1
May 29, 2003 at 7:38 am
Look in BooksOnline for Aggregate functions:
MIN(), MAX(), AVG(), SUM(), COUNT()...
May 29, 2003 at 7:33 am
quote:
where do you adjust all the major settings in sql? is it done in enterprise manager?
May 29, 2003 at 7:06 am
quote:
Hi,This query..
select distinct id,
count(id) as id_counter
from x
where id_counter > 1
wouldnt work because you are using a aggregate in the select...
May 29, 2003 at 7:02 am
Sure thing. Just put the original query inside a derived table:
select * from
(
select id,
count(*) as id_counter
from x
group by id
) as derived_table
where id_counter...
May 29, 2003 at 6:13 am
OK, in BOL, the article says:
quote:
RemarksUse the @@DATEFIRST function to check the current setting of SET DATEFIRST.
The setting of SET DATEFIRST is...
May 23, 2003 at 9:53 am
Viewing 15 posts - 376 through 390 (of 595 total)