Welcome to Dream.In.Code
Getting Help is Easy!

Join 98,765 Programmers for FREE!. Ask your question and get quick answers from Dream.In.Code experts. There are 1,054 online right now! We're the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert

Register to Make This Box Go Away!


Date function in sql plus

 
Reply to this topicStart new topic

Date function in sql plus

nelliegirl
post 9 May, 2008 - 06:18 AM
Post #1


New D.I.C Head

*
Joined: 8 Feb, 2008
Posts: 27

I need to list the items, by order that have not been shipped in two weeks from date of order.
I can not figure out the two weeks from date of order. This is what I got so far except the date. Any suggustions.

Select Item.ItemID, ItemDesc, OrderDate
From Item, Inventorys, Customer_Shipped, Orderline, Cust_order
Where Item.ItemId = Inventorys.ItemID
And Inventorys.InvID = Orderline.InvId
And Orderline.CshipID = Customer_Shipped.CshipID
And orderline.orderid = cust_order.orderid
And DateShipped ;
User is offlineProfile CardPM

Go to the top of the page


PsychoCoder
post 9 May, 2008 - 06:26 AM
Post #2


using Coding.God;

Group Icon
Joined: 26 Jul, 2007
Posts: 6,569



Thanked 24 times

Dream Kudos: 7350

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#

My Contributions


Take a look at Oracle's DateADD function
User is online!Profile CardPM

Go to the top of the page

nelliegirl
post 9 May, 2008 - 06:31 AM
Post #3


New D.I.C Head

*
Joined: 8 Feb, 2008
Posts: 27

QUOTE(PsychoCoder @ 9 May, 2008 - 06:26 AM) *

Take a look at Oracle's DateADD function



Thanks I will try that out.
User is offlineProfile CardPM

Go to the top of the page

nelliegirl
post 9 May, 2008 - 04:06 PM
Post #4


New D.I.C Head

*
Joined: 8 Feb, 2008
Posts: 27

QUOTE(nelliegirl @ 9 May, 2008 - 06:31 AM) *

QUOTE(PsychoCoder @ 9 May, 2008 - 06:26 AM) *

Take a look at Oracle's DateADD function



Thanks I will try that out.

Still having a problem with this one

I need to list the items, by order that have not been shipped in two weeks from date of order.
I can not figure out the two weeks from date of order. This is what I got so far except the date. Any suggustions.

Select Item.ItemID, ItemDesc, OrderDate
From Item, Inventorys, Customer_Shipped, Orderline, Cust_order
Where Item.ItemId = Inventorys.ItemID
And Inventorys.InvID = Orderline.InvId
And Orderline.CshipID = Customer_Shipped.CshipID
And orderline.orderid = cust_order.orderid
And DateShipped ;
User is offlineProfile CardPM

Go to the top of the page

baavgai
post 9 May, 2008 - 04:15 PM
Post #5


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,358



Thanked 30 times

Dream Kudos: 300

Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions


DateADD is the way to go. However, days are implicit in SQL Server and very simple if you're just figuring days from now.

Try this:
CODE
select GetDate()


Then this:
CODE
select GetDate()-14


And if it looks right, go from there
CODE
And DateShipped > GetDate()-15


Hope this helps.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 7/20/08 02:47PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month
-->