Showing posts with label class. Show all posts
Showing posts with label class. Show all posts

Monday, March 19, 2012

Help needed with DATETIME Arithmetic

Hi,

I have the following query:

SELECT dbo._Fault.id, dbo._Fault.date_created, dbo._Fault.reference,
dbo._Fault.class, dbo._Fault.owner, dbo._Fault.Contact_Name, dbo._Fault.
Product,
dbo._Fault.Problem_Description,
dbo._Fault.Action_Taken, dbo._Fault.Problem_Solution,
dbo._Fault.Duration_start_date, dbo._Fault.Duration_duration,
dbo._Fault.Duration_date_summary,
dbo._Fault.Fault_Status, dbo._Fault.Fault_Source, dbo._Fault.Part_Number,
dbo._Fault.Serial_No,
dbo._Product.id AS PRODUCTID, dbo._Product.description
FROM dbo._Fault LEFT OUTER JOIN
dbo._Product ON dbo._Fault. Product = dbo._Product.id

I need an additional field appended to the end of this (called
'DATECOMPLETED') that will take the 'Duration_start_date' and add the
'Duration_duration' to it - effectively giving me a new datetime field that
is newer than the start date.

I have tried unseccessfully to amend the code but I am afraid my knowledge
of SQL is limited. I would greatly appreciate if someone could show me how
to do this.

Thanks,

DarrenMintyman wrote:

Quote:

Originally Posted by

Hi,
>
I have the following query:
>
SELECT dbo._Fault.id, dbo._Fault.date_created, dbo._Fault.reference,
dbo._Fault.class, dbo._Fault.owner, dbo._Fault.Contact_Name, dbo._Fault.
Product,
dbo._Fault.Problem_Description,
dbo._Fault.Action_Taken, dbo._Fault.Problem_Solution,
dbo._Fault.Duration_start_date, dbo._Fault.Duration_duration,
dbo._Fault.Duration_date_summary,
dbo._Fault.Fault_Status, dbo._Fault.Fault_Source, dbo._Fault.Part_Number,
dbo._Fault.Serial_No,
dbo._Product.id AS PRODUCTID, dbo._Product.description
FROM dbo._Fault LEFT OUTER JOIN
dbo._Product ON dbo._Fault. Product = dbo._Product.id
>
I need an additional field appended to the end of this (called
'DATECOMPLETED') that will take the 'Duration_start_date' and add the
'Duration_duration' to it - effectively giving me a new datetime field that
is newer than the start date.
>
I have tried unseccessfully to amend the code but I am afraid my knowledge
of SQL is limited. I would greatly appreciate if someone could show me how
to do this.
>
Thanks,
>
Darren


If Duration_duration is a number and you want it to be the number of
days added to Duration_start_date you would add something like this to
the select list:

dateadd(dd, Duration_duration, Duration_start__date)|||Thanks for the reply. That seems to have done the trick :o)

"ZeldorBlat" <zeldorblat@.gmail.comwrote in message
news:1158695486.220267.171700@.m73g2000cwd.googlegr oups.com...

Quote:

Originally Posted by

>
Mintyman wrote:

Quote:

Originally Posted by

>Hi,
>>
>I have the following query:
>>
>SELECT dbo._Fault.id, dbo._Fault.date_created, dbo._Fault.reference,
>dbo._Fault.class, dbo._Fault.owner, dbo._Fault.Contact_Name, dbo._Fault.
>Product,
> dbo._Fault.Problem_Description,
>dbo._Fault.Action_Taken, dbo._Fault.Problem_Solution,
>dbo._Fault.Duration_start_date, dbo._Fault.Duration_duration,
> dbo._Fault.Duration_date_summary,
>dbo._Fault.Fault_Status, dbo._Fault.Fault_Source, dbo._Fault.Part_Number,
>dbo._Fault.Serial_No,
> dbo._Product.id AS PRODUCTID,
>dbo._Product.description
>FROM dbo._Fault LEFT OUTER JOIN
> dbo._Product ON dbo._Fault. Product =
>dbo._Product.id
>>
>I need an additional field appended to the end of this (called
>'DATECOMPLETED') that will take the 'Duration_start_date' and add the
>'Duration_duration' to it - effectively giving me a new datetime field
>that
>is newer than the start date.
>>
>I have tried unseccessfully to amend the code but I am afraid my
>knowledge
>of SQL is limited. I would greatly appreciate if someone could show me
>how
>to do this.
>>
>Thanks,
>>
>Darren


>
If Duration_duration is a number and you want it to be the number of
days added to Duration_start_date you would add something like this to
the select list:
>
dateadd(dd, Duration_duration, Duration_start__date)
>

Sunday, February 19, 2012

Help me install eval, please.

I little experience with sql and no experience with rs. Recently, during a
.net class, the instructor demonstrated rs with the bikeworks db and I was
blown away. I want to give the same demo to the bosses here, so they will
send me to sql and rs classes. Our server is SBS2003 premium with sql
installed, my workstation is XP pro with Visual Studio.net 2003 and sql
desktop, and we also have a server2k we use for terminal services. What
machine should I isntall the rseval on? I seem to get into trouble with all
of them. Please don't send me to our System Administrator, because that's
me.
XP box starts OK, but says the local sql server is not supported. This the
desktop engine installed with studio.net.
2003 box says visual studio isn't installed and it doesn''t seem to like
sharepoint.
2k box says mdac and visual studio are missing.
I'd rather install on my xp box because it will be a while before it goes
into production. I'd just like put on a nice demo.
Thanks, SteveWhat is the version of SQL running on XP? One option would be to run RS on
XP with the RS catalog on the 2003 box. When setup asks where to put the DB
just put in the 2003 box name. Just remember that the user running setup
must have system admin rights on the server with SQL since this user is used
for all DB commands during setup.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Mahon" <stevemahon@.lhpinc.com> wrote in message
news:#xLAX6#nEHA.3628@.TK2MSFTNGP09.phx.gbl...
> I little experience with sql and no experience with rs. Recently, during a
> .net class, the instructor demonstrated rs with the bikeworks db and I was
> blown away. I want to give the same demo to the bosses here, so they will
> send me to sql and rs classes. Our server is SBS2003 premium with sql
> installed, my workstation is XP pro with Visual Studio.net 2003 and sql
> desktop, and we also have a server2k we use for terminal services. What
> machine should I isntall the rseval on? I seem to get into trouble with
all
> of them. Please don't send me to our System Administrator, because that's
> me.
> XP box starts OK, but says the local sql server is not supported. This the
> desktop engine installed with studio.net.
> 2003 box says visual studio isn't installed and it doesn''t seem to like
> sharepoint.
> 2k box says mdac and visual studio are missing.
> I'd rather install on my xp box because it will be a while before it goes
> into production. I'd just like put on a nice demo.
> Thanks, Steve
>|||Please see http://www.microsoft.com/sql/reporting/productinfo/sysreqs.asp
for a detailed list of the Reporting Services System requirements.
The general requirements are:
1. Some component of Visual Studio must be installed to use Report
Designer. Installing VB .NET satisfies this requirement.
2. Make a distinction between where report data stored and where the
Reporting Services catalog resides. Data can come from
a number of different sources, however the Reporting Services EVAL
version will only work with SQL Server 2000 Developer,
Standard, or Enterprise editions. Note that in all cases you need to
have SQL Server SP3a installed.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve Mahon" <stevemahon@.lhpinc.com> wrote in message
news:%23xLAX6%23nEHA.3628@.TK2MSFTNGP09.phx.gbl...
> I little experience with sql and no experience with rs. Recently, during a
> .net class, the instructor demonstrated rs with the bikeworks db and I was
> blown away. I want to give the same demo to the bosses here, so they will
> send me to sql and rs classes. Our server is SBS2003 premium with sql
> installed, my workstation is XP pro with Visual Studio.net 2003 and sql
> desktop, and we also have a server2k we use for terminal services. What
> machine should I isntall the rseval on? I seem to get into trouble with
all
> of them. Please don't send me to our System Administrator, because that's
> me.
> XP box starts OK, but says the local sql server is not supported. This the
> desktop engine installed with studio.net.
> 2003 box says visual studio isn't installed and it doesn''t seem to like
> sharepoint.
> 2k box says mdac and visual studio are missing.
> I'd rather install on my xp box because it will be a while before it goes
> into production. I'd just like put on a nice demo.
> Thanks, Steve
>