Showing posts with label goal. Show all posts
Showing posts with label goal. Show all posts

Tuesday, March 20, 2012

a beginner question

if i have a table like this:
=========
id units tag
1 2 x
1 3 x
1 10 y
2 5 x
2 5 x
2 2 x
3 10 y
3 3 x
3 1 y
=========

basiclly the goal is to sum up all the units which has same tag for each id
so that the output will be some thing like:
============
id units tag
1 5 x
1 10 y
2 12 x
3 11 y
3 3 x
============
i am supose to use simple queries to do this job, but i just have no idea how to
can any one give me an idea?

thanks

Quote:

Originally Posted by temptgan

if i have a table like this:
=========
id units tag
1 2 x
1 3 x
1 10 y
2 5 x
2 5 x
2 2 x
3 10 y
3 3 x
3 1 y
=========

basiclly the goal is to sum up all the units which has same tag for each id
so that the output will be some thing like:
============
id units tag
1 5 x
1 10 y
2 12 x
3 11 y
3 3 x
============
i am supose to use simple queries to do this job, but i just have no idea how to
can any one give me an idea?

thanks


select id,sum(units) as units,tag from table_above
group by id, tags|||

Quote:

Originally Posted by temptgan

if i have a table like this:
=========
id units tag
1 2 x
1 3 x
1 10 y
2 5 x
2 5 x
2 2 x
3 10 y
3 3 x
3 1 y
=========

basiclly the goal is to sum up all the units which has same tag for each id
so that the output will be some thing like:
============
id units tag
1 5 x
1 10 y
2 12 x
3 11 y
3 3 x
============
i am supose to use simple queries to do this job, but i just have no idea how to
can any one give me an idea?

thanks


select id,sum(units) as units,tag from table_above
group by id, tag

Thursday, February 9, 2012

3rd party Backup Software and MSSQL 2000

Can SQL 2000 initiate backups to 3rd party applications (like LiteSpeed
and BrightStor's SQL Backup Agent)? My goal is to be able to manage
backup and restores completely through SQL Enterprise Manager and Query
Analyzer without having to logon to the Server and using the 3rd party
backup application's software. Is this possible through SQL?

Thank you,
Stephanie"Stephanie" <stuttle@.centene.com> wrote in message
news:1125609584.963975.200390@.g44g2000cwa.googlegr oups.com...
> Can SQL 2000 initiate backups to 3rd party applications (like LiteSpeed
> and BrightStor's SQL Backup Agent)? My goal is to be able to manage
> backup and restores completely through SQL Enterprise Manager and Query
> Analyzer without having to logon to the Server and using the 3rd party
> backup application's software. Is this possible through SQL?

Yes.

> Thank you,
> Stephanie