Viewing 15 posts - 1,741 through 1,755 (of 2,838 total)
Brandie Tarvin (5/17/2011)
I've actually had to do that at my work place. If those solutions don't work for some reason, let us know and I'll check my production environment to...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 11:24 am
CELKO (5/17/2011)
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 11:23 am
CELKO (5/17/2011)
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 11:20 am
Gianluca Sartori (5/17/2011)
SELECT SaleID FROM #SalesDetails sd
INNER JOIN #ProdList ON sd.ProductID =...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 10:58 am
Gianluca Sartori (5/17/2011)
;WITH Sales AS (
SELECT SaleId, COUNT(DISTINCT ProductId) AS DistinctProducts
FROM #SalesDetails
WHERE ProductId IN (SELECT ProductId FROM #ProdList)
GROUP BY SaleId
),
Products AS (
SELECT COUNT(DISTINCT ProductId) AS DistinctProducts
FROM...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 10:52 am
HowardW (5/17/2011)
SELECT SaleID FROM #SalesDetails sd
INNER JOIN #ProdList ON sd.ProductID = #ProdList.ProductID
GROUP...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 10:34 am
If I may, I'd like to request assistance on a question of mine here
http://www.sqlservercentral.com/Forums/Topic1110359-392-1.aspx
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 10:15 am
OK, this should get all the initials that aren't in a given period
create table #tTimetable (DayID int, PeriodID int, StaffID int);
insert into #tTimetable(DayID, PeriodID, StaffID)
values
(1,1,2),
(1,1,7),
(1,1,8),
(1,1,9),
(1,2,6),
(1,2,7),
(1,2,8),
(1,2,9),
(1,3,1),
(1,3,2),
(1,3,3),
(1,3,4),
(1,3,5),
(1,3,6),
(1,3,7)
create table #tStaffTimeTableInfo (StaffID int,...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 10:07 am
toddasd (5/17/2011)
Stefan, your solution lists the staff members for that particular periodID. It seems to me he wants the staff that are not matched.
Oops, sorry about that. I'll go fix...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 9:59 am
This should do it, I think
create table #tTimetable (DayID int, PeriodID int, StaffID int);
insert into #tTimetable(DayID, PeriodID, StaffID)
values
(1,1,2),
(1,1,7),
(1,1,8),
(1,1,9),
(1,2,6),
(1,2,7),
(1,2,8),
(1,2,9),
(1,3,1),
(1,3,2),
(1,3,3),
(1,3,4),
(1,3,5),
(1,3,6),
(1,3,7)
create table #tStaffTimeTableInfo (StaffID int, StaffInitials varchar(10));
insert into #tStaffTimeTableInfo(StaffID, StaffInitials)
values
(1,'ABC'),
(2,'RWT'),
(3,'YUJ'),
(4,'OPP'),
(5,'QWE'),
(6,'TFV'),
(7,'ASA'),
(8,'MNB'),
(9,'PLM')
CREATE TABLE...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 17, 2011 at 9:46 am
LutzM (5/16/2011)
Stefan Krzywicki (5/16/2011)
SQL Server's not even mentioned, I guess we have a way to go in being considered suitable for very large databases....
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 16, 2011 at 12:54 pm
GSquared (5/16/2011)
Peoplesoft and JD Edwards are Oracle products, not Oracle competitors. The survey was about Oracle products, not just about their database engine, so it would naturally include both of...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 16, 2011 at 12:38 pm
GSquared (5/16/2011)
Stefan Krzywicki (5/16/2011)
GSquared (5/16/2011)
Stefan Krzywicki (5/16/2011)
SQL Server's not even mentioned, I guess we have a way to go in being considered suitable for...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 16, 2011 at 12:09 pm
GSquared (5/16/2011)
Stefan Krzywicki (5/16/2011)
SQL Server's not even mentioned, I guess we have a way to go in being considered suitable for very large databases....
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 16, 2011 at 11:48 am
Brandie Tarvin (5/16/2011)
Stefan Krzywicki (5/16/2011)
Brandie Tarvin (5/16/2011)
Stefan Krzywicki (5/16/2011)
SQL Server's not even mentioned, I guess we have a way to go in being considered...
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
May 16, 2011 at 11:46 am
Viewing 15 posts - 1,741 through 1,755 (of 2,838 total)