Showing posts with label delete. Show all posts
Showing posts with label delete. Show all posts

Thursday, March 29, 2012

How remove all quote characters in a sql table?

Hi

I have a table with a few hundred emailadresses. How can I delete all quotes (') from the addresses, so that'email@.email.com' is replaced asemail@.email.com.

Thank you

zipfeli

You can use the REPLACE Function. And you want to an UPDATE not a DELETE.

UPDATE table SET Column =REPLACE(column, '''', '')

|||

UPDATE TableName SET EMailAddrCol = REPLACE(EMailAddrCol, '''', '')

I hope this helps,

Best of Luck!

Friday, February 24, 2012

How I can undo drop Table ?

Hello:
Please, I need Help. I have an Access database linked to SQL Setver 2000
tables.
I delete the tables from Access. I inmediately stop Sql Server. I need to
restore the tables. How can I proceed ?
I really will appreciate any help .
Roberto
Roberto Carabajal wrote:
> Hello:
> Please, I need Help. I have an Access database linked to SQL Setver
> 2000 tables.
> I delete the tables from Access. I inmediately stop Sql Server. I
> need to restore the tables. How can I proceed ?
> I really will appreciate any help .
> Roberto
You'll need to restore the database from a backup file and then restore
any log files. If you are using a recovery model other than Simple, you
may be able to recover the table using a tool like Log Explorer from
Lumigent (but you'll need to purchase it).
There is no undo operation for things like this.
David G.
|||Restore from a backup. There is no built-in feature to undo deletions of
objects.
David Portas
SQL Server MVP
|||Hello Roberto
The table/data may be unrecoverable if the following are true :
- Command was not run within a transaction
- Command completed before SQL Server service was stopped
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Do you mean you deleted the link in Access? If so, relink the table.
Deleting the link in Access will not drop the SQL Server table.
If Access is the linked server in SQL and you deleted the Access table, you
may be able to restore the table if the Access DB has not been compacted
since the deletion.
Kevin
"Roberto Carabajal" <RobertoCarabajal@.discussions.microsoft.com> wrote in
message news:DDFEECBE-2FE5-43C6-B30A-FA887A99E92A@.microsoft.com...
> Hello:
> Please, I need Help. I have an Access database linked to SQL Setver 2000
> tables.
> I delete the tables from Access. I inmediately stop Sql Server. I need to
> restore the tables. How can I proceed ?
> I really will appreciate any help .
> Roberto
|||I delete the table in Access tables's view, but the table was linked to Sql
Server, so the "real" table resided in Sql Server.
Thanks very much anyway.
"Kevin Doyle" wrote:

> Do you mean you deleted the link in Access? If so, relink the table.
> Deleting the link in Access will not drop the SQL Server table.
> If Access is the linked server in SQL and you deleted the Access table, you
> may be able to restore the table if the Access DB has not been compacted
> since the deletion.
> Kevin
> "Roberto Carabajal" <RobertoCarabajal@.discussions.microsoft.com> wrote in
> message news:DDFEECBE-2FE5-43C6-B30A-FA887A99E92A@.microsoft.com...
>
>
|||I'sorry. I should clarify it is an .ADP proyect used as a tool to managing
the server.
The problem was that droping table from the project <=> drop table in the
server.
Perhaps, it could be a "undo" in the proyect, but I must admit Access never
had similar one.
"Roberto Carabajal" wrote:
[vbcol=seagreen]
> I delete the table in Access tables's view, but the table was linked to Sql
> Server, so the "real" table resided in Sql Server.
> Thanks very much anyway.
>
> "Kevin Doyle" wrote:

Sunday, February 19, 2012

How grant all objects

How
grant user to tables(insert,update,delete,select),Sp,Func,Views !
in one line...
if can be...You'll need to do updates to the system tables, (I believe) and so you'll need to allow ad-hoc updates on those tables - normally not allowed.

However, and I know this is not what you're asking, but I like not giving any permissions on tables, and only giving exec permissions on Stored Procs. This way you protect your tables and you limit what can be done / seen in your database by defining allowed requests and actions in the procedures.