Viewing 15 posts - 376 through 390 (of 424 total)
I have a table which contains information on approx 250 people. There are 3 columns in this table that I'm interested in (ID, LName, FName). What I'm looking to do...
January 26, 2008 at 12:32 pm
ian's first solution should be all you need with this minor change:
select logon.hostID,
logon.eventTime as logonTime,
(select min(eventTime) from Events...
January 26, 2008 at 12:02 pm
IF (@GreaterThan IS NOT NULL) AND (@LessThan IS NULL)
SELECT @And = ' AND MonthToDate_Total >= ' + CONVERT(VARCHAR(20),@GreaterThan) + ' '
ELSE IF (@LessThan IS NOT NULL) AND (@GreaterThan IS NULL)
SELECT...
January 25, 2008 at 10:45 am
assuming Gradstudent.loginid is a unique key, and "The question asks for how many students are not TA's? "
select count(*) from gradstudents
where loginid not in (select loginid from ta)
this statement...
January 25, 2008 at 9:25 am
It seems that your need for dynamic sql can be eliminated with a bit of rework. For example, this block:
IF (@GreaterThan IS NOT NULL) AND (@LessThan IS NULL)
SELECT @And...
January 25, 2008 at 9:15 am
i'm sure someone will correct me if i'm wrong, but i believe that select into is not logged while insert into is. if so, select into will be faster...
January 25, 2008 at 12:08 am
any temp table created in a stored procedure vanishes after the stored procedure completes. so you can't use sp_executesql to create a temp table. you'll need to create...
January 24, 2008 at 10:14 pm
from the 'Inserting Rows by Using SELECT INTO' topic of BOL:
SELECT INTO does not use the partition scheme of the source table. Instead, the new table is created in...
January 23, 2008 at 3:58 pm
the view's DDL NOLOCK will override any connection/session locking.
January 23, 2008 at 3:55 pm
In T-SQL there is no guarantee about the order of how OR and AND statements are evaluated. Of course precedence rules are observed, and the result will also stay correct,...
January 23, 2008 at 12:03 pm
nugroho (1/22/2008)
Second Question:
SELECT * FROM Table1 WHERE (@S=1 AND CONTAINS(column1,'key1')) OR (@S=2 AND CONTAINS(column2,'key1')) OR (@S=3 AND CONTAINS(column3,'key1'))
Does SQL engine will search (CONTAINS) only in 1 column depending on...
January 23, 2008 at 11:20 am
to Jeremy:
we rolled out the combined search to testers yesterday. they liked it so much that they've asked for a 4th search method! so the technique described earlier...
January 23, 2008 at 11:10 am
GilaMonster (1/19/2008)
where (M.region=@region OR...
January 21, 2008 at 7:30 am
selecting all values is not an option since there about 36,000 items currently in 6 months of data and we expect 120K items or more in the full 5 year...
January 21, 2008 at 7:24 am
sql server management studio makes it easy. just open the table, its columns, and right-click the column (or click it twice).
from the command line, use sp_rename
EXEC sp_rename
...
January 18, 2008 at 2:23 pm
Viewing 15 posts - 376 through 390 (of 424 total)