Help sql database

TheSpecialist

New member
Local time
Yesterday, 22:03
Joined
Sep 3, 2015
Messages
7
Hi I want my sql database to operate like this below. I just want to use MoonPhase Number. The table below works I just want to use Moonphase Number when the box pops open

PARAMETERS [Enter Date:] DateTime;
SELECT "YourTable" AS SourceTable, YourDate, YourNumber
FROM YourTable
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL
SELECT "Cash4Table", YourDate, YourNumber
FROM Cash4Table
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL
SELECT "GAFiveTable", YourDate, YourNumber
FROM GAFiveTable
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL SELECT "MoonPhaseTable", YourDate, YourNumber
FROM MoonPhaseTable
WHERE YourDate BETWEEN [Enter Date:]-4 AND [Enter Date:]+1
ORDER BY SourceTable, YourDate;



I want a paramater box so when I open the my database I will be prompt to enter a moon phase number. Like 1 or .98, .99 etc
I keep getting a error with my sql script. I just want to be able to put in 1 or .98 and all the table I have below show me the 1 day before and 1 day after how I have below please assist me.

PARAMETERS [Enter YourNumber:] Number;
SELECT "MoonPhaseTable" AS SourceTable, YourDate, YourNumber
FROM MoonPhaseTable
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL
SELECT "Cash4Table", YourDate, YourNumber
FROM Cash4Table
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL
SELECT "GAFiveTable", YourDate, YourNumber
FROM GAFiveTable
WHERE YourDate BETWEEN [Enter Date:]-1 AND [Enter Date:]+1
UNION ALL SELECT "YourTable", YourDate, YourNumber
FROM YourTable
WHERE YourDate BETWEEN [Enter Date:]-4 AND [Enter Date:]+1
ORDER BY SourceTable, YourDate;
 
Suggest changing the first line to

PARAMETERS [Enter Date:] DateTime, [Enter YourNumber:] IEEEDouble;

and see if that helps.
 

Users who are viewing this thread

Back
Top Bottom