Viewing 15 posts - 751 through 765 (of 1,346 total)
Well depends
Do you have an indentiy column on your table?
If so its easy.
If not Not easy
Select top 30 Email
from MyTable
Order by Identitycol desc
October 27, 2005 at 10:13 am
Nope!
You'll have to create the code and logic to do so your self. you'll either need to do it in a trigger, or handle all the logic in your insert...
October 27, 2005 at 10:08 am
As noted above, try to do a recompile on your procedure.
Here's a little better article/blog about parameter sniffing
http://blogs.msdn.com/khen1234/archive/2005/06/02/424228.aspx
essentially the query optimizer is trying to guess the values for your...
October 27, 2005 at 10:03 am
With out having your code, table, data, indexing it is impossible to just say what the problem is, but.
It might possibly be Parameter Sniffing this article may be interesting.
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx#EGAA
October 27, 2005 at 9:51 am
You can create a function that concatenates the values.
--Create Test Table
create table ThatTable (Col1 varchar(10), Col2 char(1))
insert into ThatTable (col1, col2)
select '3Ps','G' union
select '4T','G' union
select '4W','G' union
select '5Ze','P' union
select '4Vn','P'...
October 27, 2005 at 9:48 am
With great power comes great responsibility.
October 27, 2005 at 9:30 am
If I were you I would pick up a book like
http://www.bookpool.com/sm/0672319675
I'm sure many others will have book recommendations, but if you do not have the fundamentals an easy...
October 27, 2005 at 9:24 am
Please post additional Table definition information and the logic for your function.
I am guessing here, but if your function is a table valued function.
Example
CREATE FUNCTION myfunction ( @Myvar int)
RETURNS TABLE
....
Then...
October 27, 2005 at 9:18 am
Works will try to use index, but with beginning wildcard, it will be inefficient.
Select * From table name where NAme like '%HA%'
Or
-- Should work but will probably not use any index if...
October 25, 2005 at 7:49 pm
In sql server 2000 T-Sql does not have an equivelent to the limit command. In general sql server 2000 is behind the curve when it comes to paging, and ranking...
October 25, 2005 at 9:55 am
Yes, if you set up transactional replication you can apply a schedule to each subscriber, and each subscriber can have a different schedule.
Note Transactional replication is not instantaneous, there is...
October 24, 2005 at 3:26 pm
Additional information about NULL:
http://www.sqlservercentral.com/columnists/mcoles/fourrulesfornulls.asp
No value can equal (=) null, Null is "Not Defined" or "Unknown"
IS NULL is the proper way to determine if a value is null.
October 24, 2005 at 10:21 am
One day we were getting ready for a new release, and I was asked to restore a database to the staging server which is in the production domain.
Usually I take...
October 24, 2005 at 10:12 am
Sql Server Agent:
See books online for more information
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_automate_42r7.asp
October 24, 2005 at 10:00 am
Yeah, you can't tell a maintenance plan to do a backup in 2 places.
You can probably find/write some code that copies the backups to another drive.
October 21, 2005 at 2:25 pm
Viewing 15 posts - 751 through 765 (of 1,346 total)