Viewing 15 posts - 2,056 through 2,070 (of 3,489 total)
Sounds like you need an outer join between Sales and Budget instead of an inner join. Post your query so we can see what you're dealing with.
March 2, 2016 at 1:16 pm
I can't answer your question without some CREATE TABLE scripts. What table are the records related to Customer coming from?
I posted a basic pattern based on AdventureWorks because it's...
March 2, 2016 at 12:48 pm
If you add /x:Macroname to the end of the execution path, then when the database opens it will call the macro Macroname, so you could have something like
DoCmd.RunSQL...
Application.Quit
inside your macro...
March 2, 2016 at 12:35 pm
maybe like this?
SELECT *
FROM test_max m
INNER JOIN
(SELECT id
, MAX(date_created) AS LastDate
FROM test_max
GROUP BY id) lst
ON m.id=lst.id
AND m.date_created = lst.LastDate;
You may want to add your fields explicitly to your SELECT...
March 2, 2016 at 10:21 am
That's what the second query I posted does. NEWID() returns a random number so ordering by it and then doing a TOP returns a random set of records each time...
March 2, 2016 at 9:06 am
Shot in the dark, since we don't have answers to Phil's questions, but here's a guess. I built this using AdventureWorks2012
SELECT [Name] AS TerritoryName
, t.TerritoryID
, tc.CustomerID
, tc.AccountNumber
FROM Sales.SalesTerritory T
CROSS...
March 2, 2016 at 8:52 am
write a stored procedure and assign him execute permissions on it?
March 1, 2016 at 2:00 pm
March 1, 2016 at 10:19 am
David,
you could modify your stored procedure so that you can pass in a date and use something like this in your filter
If you could use DATEFROMPARTS, you'd be in the...
February 27, 2016 at 9:29 am
Not much to go on, but if each delegate is worth a specific amount, then you can do some counts and simple multiplication to compare to your break-even amount.
Without more...
February 26, 2016 at 2:28 pm
Not a lot to go on.
How are you prompting the user for a date? What data type is your parameter?
February 25, 2016 at 2:40 pm
Your stored procedures aren't really prefixed with sp_ ? You know that's for system stored procedures, right?
February 24, 2016 at 4:49 pm
I did mine differently. I checked for existence of both class types in the "attends" table...
CREATE TABLE Student(
StudentID INT IDENTITY PRIMARY KEY,
FirstName VARCHAR(10) NOT NULL,
LastName VARCHAR(15) NOT NULL
);
GO
INSERT INTO...
February 24, 2016 at 4:34 pm
If you have tons of databases to do it on, you could create a cursor to loop through the databases and then run the SQL to enable service broker. ...
February 23, 2016 at 1:31 pm
You mean something like this? You'd need a Calendar table
SELECT *
FROM Calendar
WHERE TheDate>=GETDATE()-90;
February 23, 2016 at 1:02 pm
Viewing 15 posts - 2,056 through 2,070 (of 3,489 total)