Viewing 15 posts - 47,776 through 47,790 (of 49,571 total)
The inside SQL Server series are books, not online resources. They are very worth buying though.
January 8, 2008 at 7:04 am
The 2005 books online are excellent, and I strongly recommend the Inside SQL Server 2005 series, from Solid Quality Learning.
First one (Storage engine) was written by Kalen Delaney
Next 2 (T-SQL...
January 8, 2008 at 4:53 am
SQL 2005 ignores sorts in a view unless the number of rows is limited by a top statement.
Views shouldn't have sorts in them. The sort should only be done on...
January 8, 2008 at 3:16 am
If you really want to drive a DBA insane...
CREATE TABLE [[dbo.[[[.[,] (
[.[,[,] INT,
[Max([.[,[,)] VARCHAR(10)
)
GO
SELECT [.[,[,], [Max([.[,[,)] FROM dbo.[[dbo.[[[.[,]
Yes, it's valid.
January 7, 2008 at 11:19 pm
Looks good. The main problem now is that there's no way to tell which instructor taught which student.
Perhaps, instead of the InstructorCourse table, have a table which stored the occurences...
January 7, 2008 at 11:09 pm
As an aside, why are you storing dates as strings instead of datetimes?
January 7, 2008 at 12:50 pm
In that case, you need an insert statement, not an update.
Insert puts new rows into a table, update modifies existing rows in the table.
Insert into dbo.MetaEvents (MetaFYStamp, MetaPerStamp, MetaDateStamp)
select cast([Fiscal...
January 7, 2008 at 12:39 pm
How many rows are in MetaEvents?
Also, there's no join between MetaEvents (the table you're updating) and calender (the table that the values are coming from)
What determines which row...
January 7, 2008 at 12:30 pm
Do you want the two records with the lowest dates, or all the records that have the minimum date in the table?
If the first, try top. If the second...
SELECT TheDate,...
January 7, 2008 at 12:20 pm
Arun T Jayapal (1/7/2008)
if (object_id('tempdb..#tblTemp','u') > 0)print 'exists'
else
print 'not exists'
...its not compiling...:ermm:
Looks fine, and runs fine for me. What's the error that you're getting?
January 7, 2008 at 5:34 am
SELECT OBJECT_NAME(object_id), name FROM sys.stats
will show you all the statistics that exist in the DB
DBCC SHOW_STATISTICS ('Table name','Statistics Name')
will give you the breakdown of the stats.
January 7, 2008 at 4:11 am
You should always specify column names in an insert. Otherwise if the structure of the table changes, you code breaks. Whether you explicitly state default values, or leave them out...
January 7, 2008 at 1:11 am
Generally I would recommend leaving the connection settings at their default values, unless you have a good reason to change them, and you know exactly what changing them will do.
January 7, 2008 at 12:50 am
Nice DB. Beter than I've seen a lot of professionals do.
Few points.
Bigints everywhere. Are you expecting more than 2.1 billion students?
The StudentCourseInstructor table looks misnamed. There's no reference to instructor...
January 6, 2008 at 11:19 pm
Viewing 15 posts - 47,776 through 47,790 (of 49,571 total)