Showing posts with label automatically. Show all posts
Showing posts with label automatically. Show all posts

Monday, March 26, 2012

How to connect to AdventureWorks database

I'm trying to connect to the AdventureWorks sample database, after just installing it from the SQL 2005 setup. I was expecting it to automatically appear in SQL Server Management Studio, but it's not there.

How do I get it to show up there?

-Alex

You will have to attach the databases first. they are just deplyoed to the file location specified in the instalaltion path.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

You may not have installed them. If you go through SQL Server 2005's setup, you need to select the sample databases option.

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/

|||

refer this KB http://msdn2.microsoft.com/en-us/library/aa992075(VS.80).aspx

Madhu

|||While installing the SQL 2005 setup, by default the sample databases option will be disabled. You have to explicitly enable this option to install the sample databases.

Wednesday, March 7, 2012

How to Compare Date every day automatically?

I got various Job Details listed in my table. I have set all jobs in a
such a way that they will be LIVE when Flag=1 and EXPIRED when Flag=0.
But how can I compare the Expiry Job Date with the Current Date and
Update Flag=0 automatically when its expired. I probably need compare
everyday.
I have no clue how to do this. I looked at Triggers but may be its not
the one i'm looking for..
Is this possible in SQL Server?
Thanks in Advance for your time and helpsomething like this:
update jobs
set flag=0
where expiry_date=convert(varchar(8),getdate()
,112)
set up a job to run this update daily.
however, it seems redundant, to have both the expiry date and the flag in
the table.
dean
"savvy" <johngera@.gmail.com> wrote in message
news:1138960957.385296.309670@.g47g2000cwa.googlegroups.com...
>I got various Job Details listed in my table. I have set all jobs in a
> such a way that they will be LIVE when Flag=1 and EXPIRED when Flag=0.
> But how can I compare the Expiry Job Date with the Current Date and
> Update Flag=0 automatically when its expired. I probably need compare
> everyday.
> I have no clue how to do this. I looked at Triggers but may be its not
> the one i'm looking for..
> Is this possible in SQL Server?
> Thanks in Advance for your time and help
>|||Thank you very much for your help Dean
I created a job in SQL Server and its working fine
Thanks in once again