Dear All,
I want to create a view and the view only should get those rows from a table which a dateColumn has in this format(MM/DD/YYYY) this date(XX/20/XXXX) date for every month if the date is 21 in the view should not show that record, means for only one day the view should hold/keep the record.
thanks in advance.
4 1473 Luuk 1,047
Expert 1GB
my dateformat is se differntly, bu that should not make a difference, because the DATE is stored, and not a string representation of that date. - create table testDate (d date);
-
-
insert into testDate values('2014-01-01');
-
insert into testDate values('2014-01-19');
-
insert into testDate values('2014-01-20');
-
insert into testDate values('2014-01-21');
-
-
select * from testDate where day(d)=20;
above will only return 1 row.
Dear Luuk,
i want to select all those record from a table whose 20 days are completed in the system, means ofter every 20 days the view should select those rows from the table whose 20 days are completed,
I have done as bellow but i am not sure its okay or not. - declare @Date tinyint
-
set @Date=day(getdate())
-
select @Date,* from BillBoards
-
where day(@Date)-day(Billaboards.BillBoardDate)=20;
Thanks And Records
Please use code tags when posting code or formatted data.
I have no idea what you are trying to do. Your explanations are confusing. Please post some sample data and results.
Luuk 1,047
Expert 1GB
yes, indeed confusing is what he wants... (free after Yoda ;)
But, i think, you might want to do this?: -
SELECT * from BullBoards
-
WHERE Billaboards.BillBoardDate < DATEADD(dd,-20,getdate())
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Zero.NULL |
last post by:
Hi,
We are using Month-year tables to keep the history of long transaction
of our application. For example:
We capture the details of a certain action in table...
|
by: smcgrath via AccessMonster.com |
last post by:
I have a table listing accounts with a closed date - our Trial balance drops
the account after 7 days but our database keeps the record forever - How do I
calculate the end of month less 7 days so...
|
by: arulkumara |
last post by:
Hi,
I want to insert a particular row into a table for every month of beginnging date like 1-11-2007,1-12-2007.
for that which one is best triggres or batch jobs.
please...
|
by: rahia307 |
last post by:
hi
i want to create email function every month at 25 date. how can i create it.
if any one have any idea about it help me.
|
by: ddtpmyra |
last post by:
Im using PHP report and I convert the month date into numbers but when I generate and publish it now displaying like this...
1
10
11
2
3
4
5
6 and so forth. How can I make it happen to sor...
|
by: Fannie Dlamini |
last post by:
hi guys
am creating a leave system in an access form,i want it to add automatically two days to employees every month(thats if the employee has not taken days),for example if today's date was the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |