Viewing 15 posts - 9,691 through 9,705 (of 10,144 total)
torpkev (8/4/2008)
selling my kidney for gas money.. i think i may go bug em about it
:hehe: Admirably laid-back attitude Kev!
August 4, 2008 at 7:17 am
--not quite, I want to find all the records that exist in both tblstudent_course and tblNew_entrants.
SELECT c.Course_Code, c.Max_Course_Year, c.Academic_Year, c.Student_ID_Number
FROM tblStudent_Course c
INNER JOIN tblNew_Entrants n
ON c.Course_Code =...
August 4, 2008 at 5:47 am
So if Student_ID_Number exists in tblStudent_course but not in tblRegistrations then you want to insert the appropriate columns from tblStudent_course into tblRegistrations;
and if Student_ID_Number exists in tblNew_entrants but not...
August 4, 2008 at 5:23 am
Jude, what do you want to do with tblNew_Entrants? How does it fit into your description?
August 4, 2008 at 5:01 am
jeordonez (8/4/2008)
August 4, 2008 at 4:24 am
Atif Sheikh (8/4/2008)
August 4, 2008 at 3:19 am
Hi Jeff
You pick up a chunk of code off this forum and use it for a year or two; who's credited with it becomes lost in the mists of time....
August 4, 2008 at 2:29 am
Hi Adam
"Running totals" is one way to tag this problem, and here's a proof-of-concept solution. It's a bit raw so you can check values for yourself to see what's happening....
August 2, 2008 at 10:10 am
Adam Warne (8/1/2008)
That's spot on Jack.Thanks for the responses guys. I'm still trying to solve this myself too.
First one to a solution get's to go home early?
Already happened mate,...
August 1, 2008 at 11:40 am
Adam, I've changed my code to subtract the current day number from the first available delivery day number, but if you run it now it will still be incorrect because...
August 1, 2008 at 9:02 am
Hi Adam
I deliberately changed the data for company 3 to make the test valid.
August 1, 2008 at 8:44 am
Add [DaysToDelivery] to the current date:
SELECT c.CompanyID, c.CompanyName,
DATEADD(DD,
CAST(CHARINDEX('1', CAST(Monday AS CHAR(1))+
CAST(Tuesday AS CHAR(1))+
CAST(Wednesday AS CHAR(1))+
CAST(Thursday AS CHAR(1))+
CAST(Friday AS CHAR(1))+
CAST(Saturday AS CHAR(1))+
CAST(Sunday AS CHAR(1)), DATEPART(dw, GETDATE()) ) AS...
August 1, 2008 at 8:31 am
SET NOCOUNT ON
DROP TABLE #DeliveryCompany
DROP TABLE #DeliveryDays
CREATE TABLE #DeliveryCompany
(
CompanyID INT
...
August 1, 2008 at 8:16 am
That's the intention.
If you're likely to have a run of questions on this topic, why not post some table structures and sample data for people to test against?
August 1, 2008 at 6:30 am
Viewing 15 posts - 9,691 through 9,705 (of 10,144 total)