Viewing 15 posts - 12,991 through 13,005 (of 13,469 total)
if VarCarCol is null, you wouldnt't get an error when comparing null > 1 in SQL server; but in another application or programming language you would:
in my sample table REFERENCENBR...
August 14, 2006 at 8:57 am
probably obvious to everyone that you can avoid the variable and just us an if exists:
IF exists(select * from test_tbl)
raiserror('Your Error Message Here',16,1) with log
else
print 'Good to...
August 10, 2006 at 3:10 pm
you want to use a sub select in this case, if you want the summary data from the select statement you made;
something like this should give you the idea:
SELECT Location_1...
August 10, 2006 at 2:34 pm
there's a difference between actual space used, and max space;
this script i'm pasting below will give you the actual space used;
go
/*******************************************************************************
Written By : Simon Sabin
Date :...
August 10, 2006 at 1:43 pm
several things you can do:
change your default timeouts: the default is 30 seconds.
dim Conn as adodb.Connection
Conn .CommandTimeout = 300 'seconds=5minutes
Conn .ConnectionTimeout = 300 'seconds=5minutes
next i would suggest changing your statement...
August 10, 2006 at 1:36 pm
Cory that info you provided was neat;
here's an example of what happens with that date:
create table #test(id int identity,dt datetime)
insert into #test(dt) values('12/11/9999')
insert into #test(dt) values('12/11/9999 23:59:59')
insert into #test(dt) values('12/11/9999...
August 10, 2006 at 9:29 am
you must change the collation for each column in the database that is char,varchar,etc.
simply changing the collation of the database DOES NOT affect the existing schema. to prove it, do...
August 10, 2006 at 9:04 am
wouldn't it be true that if you are using a CHAR field instead of a VARCHAR field, the string would be padded with spaces?
create table #test(charid char(20) primary key, notes...
August 9, 2006 at 3:14 pm
are these cursors nested within each other?, it might be your issue is you are using @@fetch_status as the bailout condition for all 3 nested loops; as soon as one of...
August 8, 2006 at 4:42 pm
here's a solution that creates the statements in FK hierarchy order by using one of the sp_ms procs;
note that I know it is not 100% perfect; if the database has...
August 8, 2006 at 3:41 pm
i know the default UDP port is 1434, but could not find it anywhere in my registry;
i've pasted a script below that finds the TCPIP ports being used, but i...
August 4, 2006 at 2:09 pm
the public role is sufficient to give the user access to create the DDL for any table/view/proc;
I just created a new user and gave them the public role to a...
August 4, 2006 at 7:22 am
an interesting idea; i've got databases that have a lat/longitude for each county, so you could calculate where nearby counties are < 40 miles or something; but that's not what...
August 3, 2006 at 1:28 pm
to get the fk constraints related to a specific table, use the proc sp_fkeys:
use pubs
sp_fkeys titles
results:
| pubs | dbo | titles | title_id | pubs | dbo |
August 3, 2006 at 7:39 am
well my dev machine is just that...development, sample data, and if i take the service down to defrag, there's no real impact. , so i have a scheduled task of...
July 24, 2006 at 10:48 pm
Viewing 15 posts - 12,991 through 13,005 (of 13,469 total)