Showing posts with label orders. Show all posts
Showing posts with label orders. Show all posts

Friday, March 9, 2012

Get The Date

Hi all,

I am trying to get the date difference from the day it being orders to the date it being shipped.

I am doing something like this, but it still returns the wrong result:

DaysLate=CONVERT(INT,DATEPART(dd, o.DueDT))-CONVERT(INT,DATEPART(dd,GetDate()))

Is anyone can help me with this?

Thanks in advance.

try,

DATEDIFF(d, oDueDT, GETDATE())

|||Thanks...

Wednesday, March 7, 2012

Get some data out of the Northwind db

I'm trying to connect my sql server 2000. Wich components do i need to get, for example, the content in the orders db in the Northwind db.All you need is the classes located in the System.Data.SqlClient namespace. Here is an example on MSDN that gets a list of categories from the Categories table in Northwind:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqlcommandclassctortopic.asp