Viewing 15 posts - 2,941 through 2,955 (of 3,615 total)
Does your ASP page use SQL Authentication or Windows Authentication?
I've found that in some cases I have to fully qualify a stored procedure name with the database.owner.storedprocedure.
December 1, 2004 at 2:01 am
exec sp_addalias 'domain\username' , 'dbo'
These days the correct method is to make your user a member of the db_owner role.
The downside (and I use the term loosely) is that they...
December 1, 2004 at 1:57 am
Yes it is possible, just don't do it.
http://www.sqlservercentral.com/columnists/rmarda/letsblockthedba.asp
Change you SA password and see who complains, then shoot them.
November 30, 2004 at 9:45 am
If you don't want to go down to the second you could try SMALLDATETIME which has half the storage requirements.
The strange thing is that both types store two numbers, in...
November 30, 2004 at 9:41 am
Yes, it is an unusually poor effort from Microsoft.
One particularly annoying function is that when you script a trace one of the first comments is that you cannot script to...
November 30, 2004 at 9:13 am
I tried the following
DECLARE @sText VARCHAR(250) ,
@sRep VARCHAR(250)
SELECT @sText = 'This is'+CHAR(10)+CHAR(13)+'is a'+CHAR(10)+CHAR(13)+'test' ,
@sRep = REPLACE(@sText,CHAR(10)+CHAR(13),' ')
PRINT @sText
PRINT @sRep
You've probably tried this already but try replacing just the CHAR(10) and...
November 30, 2004 at 4:52 am
I've not had a problem with
DECLARE @vbCRLF CHAR(2)
SET @vbCRLF = CHAR(10) + CHAR(13)
SELECT REPLACE(@myVarChar,@vbCRLF,' ')
November 30, 2004 at 4:21 am
A psychopath likes money, power and sex? Presumably normal people are happy with two out of the three?
Actually, the more I read the article the more it sounded like Tony...
November 29, 2004 at 3:16 am
One thing to watch out for is the default language under which your server is configured.
If it is US_English then CAST('01/05/2004' AS SMALLDATETIME) will give 5th January 2004.
To get around...
November 26, 2004 at 8:43 am
If it is your application that is submitting the SQL then why not have a simple If statement in your code so that when category is not zero then the...
November 26, 2004 at 4:12 am
It won't work in Enterprise Manager but it will in SQL Query Analyser.
November 26, 2004 at 3:46 am
If you are doing it within a stored procedure then it is easy, however if you want to do it as a simple query then try
SELECT *
FROM dbo.Categories
WHERE CategoryId =...
November 26, 2004 at 2:25 am
SELECT SUM(CASE table1.ID1 WHEN NULL THEN 1 ELSE 0 END) AS counter, table2.ID2, table2.ID3 FROM
table2 LEFT JOIN table1
ON
table2.ID2 = table1.ID2
AND
table2.ID3 = table1.ID3
GROUP BY table2.ID2, table2.ID3
November 25, 2004 at 10:09 am
Is it possible that the subquery is doing a dirty read?
There are no indices on SysProcesses and therefore there is nothing in particular to prevent there being multiple entires within...
November 25, 2004 at 10:01 am
If you can do it using a single query then why bother with a cursor?
SQL Server is optimised for set based operations. I tend to view cursors as an option...
November 25, 2004 at 9:52 am
Viewing 15 posts - 2,941 through 2,955 (of 3,615 total)