Showing posts with label twice. Show all posts
Showing posts with label twice. Show all posts

Tuesday, March 20, 2012

backing up

hello,
I canot get my databases to automatically backup twice a day. I have tried
through enterprise manager a couple of different ways. Can someone tell me
how to do this?
Thanks!
Eric
What errors are you seing? Is SQLAgent running ?
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Eric Throckmorton" <eric@.contractorsunlimited.com> wrote in message
news:%23%23jAasU3EHA.3388@.TK2MSFTNGP15.phx.gbl...
> hello,
> I canot get my databases to automatically backup twice a day. I have
> tried through enterprise manager a couple of different ways. Can someone
> tell me how to do this?
> Thanks!
> Eric
>
|||Eric,
Have you tried backing it up manually from Query Analyzer, does that work?
Have you tried backing up PUBS database or another database?
If you could include the error message that you are getting, that would be
helpful.
Thanks,
Fargham

Friday, February 24, 2012

Avoid getting same country twice

I have a DB containing trips around the world.
I want to create a menu with all the countries we visit but at the moment it returns the whole column. i.e. Brazil 5 times etc.
How do I avoid repititions?
I thought I could make an array and check it to see if the country was already there, but I think SQL must have a native routine to achieve the same thing.
Thanks
MFirst of all, you should check your data model and select statement you use to retrieve countries. Probably your SELECT is not defined properly if it returns multiple rows. Anyway, you can retrieve unique names using DISTINCT:

select DISTINCT CountryName
from ...|||cool, thanks er.. madafaka.
my SQL looks like this now, and works a treat:

"SELECT DISTINCT Country, url_link FROM dest_search ORDER BY country"

knowing me there's probably still a better way!
Incidentally the url_link is the path to the detail page and I gather doing it this way allows the search engines to follow the links. at first I put just:
"SELECT DISTINCT Country FROM dest_search ORDER BY country"
but that gave me an error because it excluded the url_link data.

Cheers
M