Viewing 15 posts - 11,431 through 11,445 (of 13,469 total)
the only things you identified so far is a slight shortening of a couple of keywords....saving a handful of keystrokes doesn't mean that's an improvement, just a preference.
March 13, 2009 at 2:36 pm
same thing, different way:
[font="Courier New"]UPDATE mytable
SET myfield= '************' + RIGHT(myfield,4)
WHERE LEN(myfield) = 16 --only change items that are exactly 16 chars
SELECT * FROM mytable WHERE LEN(myfield) <> 16 [[/font]
...
March 13, 2009 at 11:57 am
do not spam the same question into multiple forums. it was's everyones time and disjoints all the answers.
everyone uses the "View Latest Posts", so you need to post this only...
March 13, 2009 at 11:09 am
do not spam the same question into multiple forums. it was's everyones time and disjoints all the answers.
everyone uses the "View Latest Posts", so you need to post this only...
March 13, 2009 at 11:08 am
do not spam the same question into multiple forums. it was's everyones time and disjoints all the answers.
everyone uses the "View Latest Posts", so you need to post this only...
March 13, 2009 at 11:07 am
do not spam the same question into multiple forums. it was's everyones time and disjoints all the answers.
everyone uses the "View Latest Posts", so you need to post this only...
March 13, 2009 at 11:07 am
I've done something similar, but made sure it was an application that happens to conenct to SQL server, not do it via SQL server itself.
.NET DataSource object has the ability...
March 13, 2009 at 8:23 am
eashoori (3/13/2009)
thanks a lot for...
March 13, 2009 at 7:37 am
if the stored procedure returns 10 columns, you'll have to have a temp table that catches all ten columns...after that, you could ignore the other columns and continue from...
March 12, 2009 at 9:15 pm
this proc might come in handy: sp_kill
usage is simply sp_kill YOURDBNAME
kills all the sessions connected to the database you identify:
[font="Courier New"]--enhanced 02/04/2005 to also list hostname
CREATE PROCEDURE sp_Kill
@DBNAME VARCHAR(30)
--Stored...
March 12, 2009 at 11:48 am
the info is in the registry...i've got this script saved in my snippets, it used to work well:
CREATE TABLE #GetPort
(
token varchar(100),
value varchar(20))
go
DECLARE @inst varchar(200)
DECLARE @inst1 varchar(100)
--Determine registry path and key
IF(charindex('\',@@servername)...
March 12, 2009 at 10:41 am
great code examples; what if i wanted to generate X number strings, for arguments sake lets say 10...i can't seem to visualize how to generate multiple records though.
rub my nose...
March 12, 2009 at 10:02 am
yes.
whether the PK is identity, or a non identity PK:
both of these examples work:
[font="Courier New"]
CREATE TABLE A( empno INT IDENTITY(1,1) PRIMARY KEY, emp VARCHAR(64),empaddress VARCHAR(64))
GO
CREATE VIEW V AS SELECT empno, emp...
March 12, 2009 at 9:24 am
ahh Lynn I like that code;
I parameterized the TOP (64) with @top, and can use that to generate any length whether 64 here, ro whatever i might need.
very nice!
Thanks...
March 12, 2009 at 8:38 am
i had to base the business rule on the prototype trigger you showed me, plus the 3 strikes your out rule.
your trigger implied if 3 specific fields were NOT NULL,...
March 12, 2009 at 5:52 am
Viewing 15 posts - 11,431 through 11,445 (of 13,469 total)