I know that Paul has already taken an answer, but I thought I'd chime in anyway. What about something like this:
declare @table varchar(100)
select @table = "xxxx"
if (select rowcnt(i.doampg)
from sysobjects o, sysindexes i
where i.id = o.id
and o.name = @table) = 0...
Hi Lou:
I have two stored procedures that I use extensively for just this purpose:
sp_getddl <tablename>
sp_getidx <tablename>
These appear to do exactly what you're looking for.
You should be able to wrapper calls to these stored procs in some sort of script, so you could hit...
Sorry, been on extended vaca...
Some uniqueness is required; the index has to be a unique clustered or nonclustered index.
As for duplicate entries, we did extensive cleanup of our tables that had dup entries. However, there are some cases where we could still have duplicate rows, and for...
I don't think that Sybase supports a server..database..table mechanism, but what I've done when moving code from one server to another is written a make_bcp shell script that basically takes a query as input (so you can specify where-clause criteria), generates a pipe-delimited file, and prompts...
We are just going through this as well, and our DBAs tell us that we don't have to necessarily have a primary key defined on each table, but there must be at least a unique index on each replicated table. Clustered or non-clustered doesn't matter; neither does ignore-duprow.
Hope this helps...
FINALLY, after much debate with the DBAs, we've implemented a sorta different method of replicating the table in question. We replicated all columns except the timestamp column, and let that self-populate in the secondary table. The column is not part of the key, so this wasn't an issue for...
Hi Tom,
Thanks for the suggestion. I had problem with "locate" function, however. Got message that function does not exist.
I agree that a better solution is to split out the name, but we get this file from an outside vendor, and getting this particular vendor to do anything...
Good Day, All:
I have a field called Manager_Name which contains data, some of which looks like this:
C. Lennis Koontz,II
Theresa Holt
Victor T. Murhman
Paul A. Graham, Jr.
Thomas Murphy Jr.
Jon B. Lovelace Jr.
David B. Rees III
Mary Jo Ochson
M. L...
Good Day, All:
I have a database field called Manager_Name which contains data, some of which looks like this:
C. Lennis Koontz,II
Theresa Holt
Victor T. Murhman
Paul A. Graham, Jr.
Thomas Murphy Jr.
Jon B. Lovelace Jr.
David B. Rees III
Mary Jo Ochson
M. L. Conery
Michael A. Del...
I have a table with a float column, and one value in this column is "0.000098940869229982722".
When I try to convert this value to a string, I get "9.8940869229982722e-005".
I don't want to see the exponential notation, but I do want to see all the decimal places. I tried...
Prasad:
Try the following:
select User, Account,count(Account) as num
into #tmp
from Table1
group by User
select a.User, a.Account
from Table1 a, #tmp b
where a.User = b.User
and a.Account = b.Account
order by convert (varchar,num)+a.User desc
compute count(a.Account)...
Just found out from my DBAs that timestamp is an unsupported datatype when it comes to replication server. This datatype is part of the primary key of a table that needs to be replicated. We've discussed changing the datatype of the field from timestamp to datetime, but found that datetime was...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.