Showing posts with label involved. Show all posts
Showing posts with label involved. Show all posts

Wednesday, March 21, 2012

deleting data using table prefix

I can run a select to retrieve data using a prefix 'a' for the specific table involved. However when I try to run a delete using the same criteria it fails telling me

Msg 102, Level 15, State 1,.......Line 1

Incorrect syntax near 'a'

The Select statement looks like:

select count(*) from schema.table a where a.customer_id=1234

The Delete looks like:

delete from schema.table a where a.customer_id=1234

What am I doing wrong here? and how can I prefix the table, because the command I want to run is much more complicated than the example above and it needs the prefix

According to BOL there is no alias for delete statement

Thanks

|||

You can use the TSQL extension for the DELETE statement like:

delete from schema.table

from schema.table a

where a.customer_id=1234

Saturday, February 25, 2012

Delete suscription

Good morning to all ...
I am trying to delete a suscription in EM. I can not find the publication
and the
databases involved in the replication created for test purpouses, however in
the folder suscriptions on my server there is a reference to a transactional
publication that is
running and trying to synchronize a DB allready deleted. How to stop this
synchronization
and delete this suscription ?
Thanks in advance for your advice,
Raul
I found a solution ...
In EM, tools, replication, disable publishing and distributing ...
(This deleted the distribution DB)
Looks like in our tests, the replication was deleted but the distribution
database don't.
Thanks,
Raul
"Raul Romero" <rcoronado@.info-arch.com> wrote in message
news:%23L7dHjMcEHA.4092@.TK2MSFTNGP11.phx.gbl...
> Good morning to all ...
> I am trying to delete a suscription in EM. I can not find the publication
> and the
> databases involved in the replication created for test purpouses, however
in
> the folder suscriptions on my server there is a reference to a
transactional
> publication that is
> running and trying to synchronize a DB allready deleted. How to stop this
> synchronization
> and delete this suscription ?
> Thanks in advance for your advice,
> Raul
>