Viewing 15 posts - 1,276 through 1,290 (of 1,494 total)
This is all in BOL.
Smalldatetime is rounded to the nearest minute.
Milliseconds in datetime are rounded to 0, 3 or 7.
February 28, 2007 at 3:42 am
Sorry, that exhausts my suggestions.
February 27, 2007 at 8:51 am
@NetworkId should be varchar(255) to avoid datatype precedence issues.
Putting order into a view is not a good idea. Try removing the TOP 100 PERCENT and ORDER BY from the view....
February 27, 2007 at 8:35 am
What is the datatype of EmailAddress? varchar(100) or nvarchar(100)?
February 27, 2007 at 8:13 am
You could try something like:
DECLARE @Query varchar(255)
SET @Query = 'SELECT * FROM [' + LEFT(DATENAME(month, GETDATE()), 3) + '$]'
SELECT * FROM OPENQUERY(Charlie_file, @Query)
February 26, 2007 at 9:19 am
Try:
SELECT [name]
FROM master.dbo.sysdatabases
WHERE DATABASEPROPERTYEX([name],'recovery') = 'FULL'
February 26, 2007 at 7:54 am
SELECT coursegroup
,COUNT(*) AS NoOfIPTS
FROM (
SELECT DISTINCT coursegroup, nnp
FROM course
) D
GROUP BY coursegroup
February 26, 2007 at 4:08 am
Concatenating nunerics to varchars will not work. I suspect all your code like:
CAST(CRLMTAMT AS numeric(19,2))
should be like:
STR(CRLMTAMT, 19, 2)
It may be better to use the BCP utility.
February 23, 2007 at 10:47 am
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
-- *** Test Data ***
CREATE TABLE dbo.Students
(
StudentID int NOT NULL
CONSTRAINT PK_Students PRIMARY KEY
,StudentName varchar(20) NOT NULL
)
GO
CREATE TABLE dbo.StudentGrades
(
StudentID int NOT NULL
CONSTRAINT FK_StudentGrades_Students REFERENCES dbo.Students(StudentID)
,ExamID...
February 23, 2007 at 10:18 am
DECLARE @Name varchar(20)
SET @Name = 'O''Shea'
SELECT @Name
SET @Name = REPLACE(@Name, '''', ' ')
SELECT @Name
-- may want to replace with 146
SET @Name = 'O''Shea'
SELECT @Name
SET @Name = REPLACE(@Name, '''', CHAR(146))
SELECT @Name
February 23, 2007 at 9:07 am
I do not think the DISTINCT or the IN will help the speed if there are a lot of rows in FTR. The following may work better especially if there...
February 23, 2007 at 8:55 am
Something like the following gets rid of the NOT IN but introduces the overhead of an OUTER JOIN.
After checking the same results are produced, you will need to look at the execution...
February 22, 2007 at 9:24 am
You need to use an aggregate function. SUM will be the most efficient although AVG would also work.
-- *** Test Data ***
DECLARE @t TABLE
(
sampleno int NOT NULL
,workcode decimal(18,2) NOT NULL
,result...
February 20, 2007 at 2:57 am
You will need to post sample data and expected results to get any useful help.
http://www.aspfaq.com/etiquette.asp?id=5006
February 20, 2007 at 2:02 am
Viewing 15 posts - 1,276 through 1,290 (of 1,494 total)