Viewing 15 posts - 13,381 through 13,395 (of 13,451 total)
this is from the middle of a loop which joined sysobjects and syscolumns....
i've basically done what you are doing now...scripting out the table definition, complete with defaults, contraints etc.
I stick...
May 17, 2005 at 6:41 am
For a .NET application, you can start with some of the built in encryption methods from the framework;
http://www.codeproject.com/dotnet/SimpleEncryption.asp
has a handful of examples using it, as well as comments as...
May 17, 2005 at 6:32 am
I've done this for several different reasons... but it is basically the same...munge existing data to be unreleated to real client data.
i've got a database of animal names, colors, and...
May 16, 2005 at 2:50 pm
for reference, I like to put a check constraint for a datetime which sets a minimum value...the reason is a date of zero is a valid date (01/01/1900 00:00:00)
for example...
May 16, 2005 at 2:03 pm
someone's contribution to the site, almost identical to Frnaks suggestion, but i probably renamed it to be convenient to my naming convention:
create procedure sp__CountTableRows
as
begin
SELECT sysobjects.name, sysindexes.[rows]
FROM sysobjects
INNER JOIN
sysindexes
ON sysobjects.id =...
May 16, 2005 at 7:15 am
Our office does the same...we have a vb dll for older apps and a vb.net dll for the web and winforms to use, both of which have a variety of...
May 16, 2005 at 7:08 am
reporting services must be installed on the same box as SQL to comply with the default licensing requirements, i think.
after that it's the usual cost benefit scenario.....most people recommend SQL...
May 16, 2005 at 6:59 am
after each update statement, check the @@ROWCOUNT value...it tells you the number of rows affected by the previous transaction.
with that value, you can logically decide what to do next...wheter it...
May 16, 2005 at 6:36 am
Someone else may have a better solution but this works:
this cursor based solution finds columns that are of type VARCHAR, and then returns EVERYTHING that matches your input string
this would...
May 10, 2005 at 3:26 pm
A while back in my shop i had to search all columns of type int.
In my case, many of the columns where actually foreign keys, but were not following the...
May 10, 2005 at 7:17 am
i'm a huge fan of constraints.... here's the things i typically look for:
in our shop, Primary keys have a naming convention: they all end in either "ID" or "TBLKEY"
You probably...
May 10, 2005 at 6:25 am
For an index
if exists (select * from dbo.sysindexes where name = N'INDEX' and id = object_id(N'[dbo].[TABLEA]'))
print 'Yep, there is an index'
else
print 'No Index of that name'
May 5, 2005 at 6:33 am
ALTER the database, and then start a transaction which tests if the feature you tried to change is changed. for example:
ALTER DATABASE PUBS SET AUTO_CLOSE OFF
--now test if the feature...
May 5, 2005 at 6:16 am
this is from a discussion post i had saved in the past: it used bcp to send to a dynamically named file based on the @id field; hope this helps.
DECLARE...
May 4, 2005 at 6:24 am
does this work for you? i just put the commadn into a string and caled the shell with the variable.
DECLARE
@TodayDate as varchar(40),
@TodayHour as varchar(40),
@TodayMinu as varchar(40),
@NewFileName as varchar(100),
@cmdstr as varchar(128)
SELECT...
May 2, 2005 at 9:51 am
Viewing 15 posts - 13,381 through 13,395 (of 13,451 total)