Questions in topic: "automatic"https://ask.sqlservercentral.com/questions/topics/single/594.html
The latest questions for the topic "automatic"save email attachmenthttps://ask.sqlservercentral.com/questions/118195/save-email-attachment.html
I get an email daily with an attachment.
i want to automatically save the attachment to a server.
i managed to get a rule on outlook to save the atachment in a folder on my computer.
but i want it saved to a folder on a server.
how can i do this?
thanks,emailattachmentautomaticThu, 19 Feb 2015 11:50:12 GMTSQL USERReplicationhttps://ask.sqlservercentral.com/questions/114722/replication-3.html
we have repications running in the sql server and some times they are not replicating i used to reinitiate the subscription and then it is again replicating .
Is there any solution that it will automatically reinitite the subsription if any error oor the replications fails.
Any help Appreciated.replicationsubscriptionsautomaticanyTue, 09 Sep 2014 14:22:17 GMTeswargenerate Autonumber depending on a fieldhttps://ask.sqlservercentral.com/questions/113311/generate-autonumber-depending-on-a-field.html
This is the desired output:
Obj1 Obj2
0001 ijk-000
0001 ijk-000
0001 ijk-000
0001 ijk-000
0001 ijk-000
0002 ijk-001
0002 ijk-001
0002 ijk-001
0002 ijk-001
But I am getting the following:
Obj1 Obj2
0001 ijk-000
0001 ijk-001
0001 ijk-002
0001 ijk-003
0001 ijk-004
0002 ijk-005
0002 ijk-006
0002 ijk-007
0002 ijk-008
Can you please fix my query? Based upon the Obj1 column, Obj2 value should get incremented.
select Obj2
,'IJK-' + convert(varchar,NUM) as NameNew
from (select a.*
,(select max(SUBSTRING(NAME,5,len(NAME)))
from table1
where name like 'IJK-%'
) + a.[Seq Id] as NUM
from table2 A
) c
Obj1 is another column in the table2.row_numberautomaticgenerate-sequenceWed, 09 Jul 2014 11:48:16 GMTch.venkatesh514Automating database restoreshttps://ask.sqlservercentral.com/questions/97753/automating-database-restores.html
Hello there,
I have a task under which I have to backup a production database on a SQL2005 server. This bak file then has to be copied to a SQL2008 R2 server. It has then to be restored into a database on the SQL2008 server. I can keep the database names the same on both the servers. One of the challenges that I have is the location of the ldf and mdf files. They are on different drives. For example on SQL2005, the log is on E and the data file is on F. On the SQL2008 server, the data file is on E and the log file is on F. To throw a further spade into the whole setup, there might be users who have left connections open to the database on SQL2008 that might need to be killed before the restore can start. Is there an automatic way of doing this via a scheduled script? Also the problem will be that since the database backups generated on SQL2005 will have the date and time stamps in the name how can I successfully automate the restore?
Any help would be greatly appreciated.
Regards
RavirestoreautomaticWed, 23 Jan 2013 19:23:51 GMTravichetalAutomatic calculation problemhttps://ask.sqlservercentral.com/questions/17289/automatic-calculation-problem.html
I have two tables called TimeCardHours and Employee. Below are the structure of those.
create table TimeCardsHours
(
TimeCardDetailID int identity (1,1) constraint pkTimeCardDetailID primary key,
TimeCardID char (10),
DateWorked datetime not null ,
ProjectID char (10),
WorkDescription varchar (100),
BillableHours int constraint chkBillableHours check (BillableHours>0),
TotalCode int,
WorldCodeID char (10)
)
create table Employee
(
EmployeeID int identity (1,1) constraint pkemployeeid primary key,
FirstName char (10) not null,
LastName char(10),
Title char (10) constraint chktitle check (title in ('Trainee','Team Member','Team Leader','Project Manager','Senior Project Manager')),
Phone char (20) not null constraint chkemployeephone check (phone like ('([0-9],[0-9],[0-9])-([0-9],[0-9],[0-9])-([0-9],[0-9],[0-9],[0-9])')),
BillingRate int constraint chkbillingrate check (billingrate>0)
)
Now I have a question like below:
The total cost in TimeCardHourse should be automatically calculated using the formula
(Billable hours * Billing rate for the employee to whom the time card is issued.)
I gave a big try to do this, but I failed. please help me..Please..calculationsautomaticFri, 23 Jul 2010 00:58:05 GMTsepala