Viewing 15 posts - 61 through 75 (of 497 total)
Lars,
An even better way to declare the cursor would be to use a local variable.
DECLARE @c1 CURSOR
SET @c1 = CURSOR FOR...
Everything else is the same but you have now limited...
May 13, 2004 at 5:08 pm
Steve, this is actually in SQL Books Online under Alter Table. It is as follows...
ALTER TABLE table
<SNIP>
< table_constraint > ::=
[ CONSTRAINT constraint_name ]
{ [ {...
May 13, 2004 at 4:09 pm
As Bill stated it looks like the problem is with creating the view in a different database than your current database. So what you need to do is shell out to...
May 13, 2004 at 4:00 pm
Use a simple Insert statement that selects the old record and puts the new values in as variables...
INSERT INTO Foo(fldlist)
SELECT @var1, @var2, fldlist FROM Foo WHERE ....
May 8, 2004 at 8:04 pm
Cynthia,
Since you are coming from an Access ADP I would think what you really need to do is create a stored procedure to do this and then call it from...
May 7, 2004 at 11:39 am
We actually have a field where we store formatted XML. This usually has quite a few tabs in it. I was handed the db design when I got here. But...
May 7, 2004 at 11:29 am
Sheetal,
Can you post some samples that we might be able to see what you are having problems with?
Basically what I have found is that if your default database collation...
May 6, 2004 at 2:57 pm
The simple answer is NO. The more detailed answer is that it can be done if you place the table in it's own file group and then just backup the...
May 6, 2004 at 1:47 pm
Matt,
If you open SQL Server Books Online (IE: Sql servers version of help) and put "system stored procedures, listed" in the Index you will get all the publically listed system...
May 6, 2004 at 1:33 pm
Greg another way would be to use the COLLATE clause on your field.
SELECT I_use COLLATE Latin1_General_Bin
, COUNT(I_use COLLATE Latin1_General_Bin)
FROM #t
OR Better yet when you create your temp table just...
May 6, 2004 at 1:23 pm
I typically cheat a bit and use the ISNULL to replace the nulls with all Z's
SELECT fld
FROM Foo
ORDER BY ISNULL(fld,'zzzzzzzz')
May 6, 2004 at 1:15 pm
Since the uniqueidentifiers always have the same format you should be able to use that to quickly look up those values.
IF EXISTS(SELECT * FROM tempdb..sysobjects WHERE id = object_id('tempdb..#Test'))
DROP...
May 6, 2004 at 1:12 pm
I chose not to use replace as there may be other places that have valid tabs. Replace is certainly good if you know the data only has the tab as...
May 6, 2004 at 12:43 pm
Basically what I would do in this situation is to create a JobRequest table that holds the information needed to call the SP that does the bulk insert. Then in...
May 5, 2004 at 6:42 pm
Is the last character of the string always what you want at the beginning? If so try something like the following.
UPDATE Foo
SET fld = RIGHT(fld,1) + LEFT(REPLACE(fld,'-',''), LEN(REPLACE(fld,'-',''))-1)
I don't have...
May 5, 2004 at 6:27 pm
Viewing 15 posts - 61 through 75 (of 497 total)