Viewing 15 posts - 991 through 1,005 (of 1,473 total)
No problem Stu, thanks for the inserts. This also allows me to fix the numerous issues my last method had.
[font="Courier New"]CREATE TABLE visit(
VisitID INT,
StudentID INT,
visitDate DATETIME,
score INT,
PRIMARY KEY CLUSTERED (StudentID, VisitDate,...
December 4, 2008 at 9:14 am
Can you provide new sample data / results to illustrate what you're looking for now? (Please post it in the fashion I did in my original post, with INSERT...
December 4, 2008 at 8:32 am
I think he'd want: sp_MSForEachTable (And it uses a cursor anyways, but it does save some typing and probably looks a bit cleaner overall)
And with the indexes, you could...
December 4, 2008 at 8:24 am
I think the problem with one if statement is the inline GO's for the alter table. I've got a mid procedure alter table in production and it works fine...
December 4, 2008 at 8:16 am
Where are you getting the information on what the status of each room is? It's not in this query. Do you already have another way to get that...
December 4, 2008 at 7:52 am
Unfortunately, your'e not.
This is the way I understand your setup, please correct me where wrong:
You are inserting data into tableA.
If that data is more than 512 characters, you would like...
December 4, 2008 at 7:13 am
If you needed a trigger at all, it would be on Table A, as that is where you are inserting your data.
However, situations like this are normally handled by what's...
December 4, 2008 at 7:05 am
As far as #1 goes, a cursor with the names of all your tables and some dynamic sql should handle it.
For the second part... that sounds dangerous and arbitrary and...
December 4, 2008 at 7:03 am
If you can't get that to work for you, here is a link to the equivalent online page:
December 4, 2008 at 6:58 am
Joe,
The link wasn't intended to be used on the internet, it's a link for MS Help. If you open up your books online (Hit F1 from SSMS...
December 4, 2008 at 6:56 am
You're looking more along the lines of UNPIVOT instead of concatenation then. Since you have no idea what your maximum number of rooms can be, you're also looking at...
December 4, 2008 at 6:50 am
This may not be the most efficient way:
SELECT COUNT(*)
FROM (SELECT DISTINCT ReqID, ClientID FROM employees) E
December 4, 2008 at 6:47 am
Don't know much about oracle, but if this doesn't get answered, try a different approach. Add some sample data that can demonstrate how keep works (see the link in...
December 4, 2008 at 6:44 am
ARE the month/date/hour columns common to both? They're coming from two different tables and one says start and the other says end. Are the two different tables/fields going...
December 4, 2008 at 6:12 am
Something like this?
SELECT *
FROM Table1 T1
INNER JOIN
(SELECT T2I.Reg_ID, Status
FROM Table2 T2I
INNER JOIN (SELECT Reg_ID, MAX(history_date) History_Date
FROM Table2
GROUP BY Reg_ID) T2D
ON T2I.Reg_ID = T2D.Reg_ID...
December 3, 2008 at 3:51 pm
Viewing 15 posts - 991 through 1,005 (of 1,473 total)