Viewing 15 posts - 13,546 through 13,560 (of 14,953 total)
Try this, see if it does what you need:
;with LastEntry (N, D) as
(select name, max(date)
from dbo.entries
group by name)
Select E.Number, E.Name, E.Date, M.Text1
From Entries As E
Inner Join Main As M...
June 3, 2008 at 8:59 am
In 2005, the text of the view is in sys.sql_modules in the definition column. In 2000, it's in syscomments (but might be split across multiple rows because of the...
June 3, 2008 at 8:54 am
Have you thought of setting up a Try...Catch in the trigger so that it runs the unstable process and deals with it gracefully if it does fail? Would that...
June 3, 2008 at 8:52 am
You'll definitely get better performance from an Identity column than from something you create on your own.
June 3, 2008 at 8:46 am
majorbloodnock (6/3/2008)
June 3, 2008 at 8:41 am
You can use coalesce for this kind of thing, but it's not "a single SQL statement", since it takes a few lines of code.
What Steve was suggesting, with "inner join"...
June 2, 2008 at 1:20 pm
There are two ways I would suggest testing out. One is Grant's suggestion of two separate procs, called by a master proc. The other is a Union All...
June 2, 2008 at 12:31 pm
I'm going to second Robert's suggestion. One master table with the IDs, then child tables with the ID and other stuff. Triggers can be used to enforce unique...
June 2, 2008 at 12:25 pm
As others have said, this is a great site for asking questions and getting articles.
June 2, 2008 at 9:22 am
select 'Table1' as TableName, count(*) as Qty -- First Table
from dbo.Table1
where RECORD_ModificationDate >= @StartDate_in
and RECORD_ModificationDate < @EndDate_in
union all
select 'Table2' as TableName, count(*) -- Second Table
from dbo.Table2
where RECORD_ModificationDate >=...
June 2, 2008 at 9:18 am
I tend to name views and procs based on the table(s) they will access, and the function they perform. My naming convention looks a lot like OOP, just without...
June 2, 2008 at 9:03 am
Check your connection properties in Access. I've seen that problem when there were incorrect credentials stored there.
June 2, 2008 at 8:46 am
Which fields you will create indexes on will depend on what your most common and/or most demanding queries will be.
For example, if you usually have a vendor ID and want...
June 2, 2008 at 8:40 am
I'm not really clear on what you're asking. Are you trying to find out how to validate some data before you insert it into a database?
June 2, 2008 at 8:27 am
Viewing 15 posts - 13,546 through 13,560 (of 14,953 total)