|
Hi All,
I know "TOP" Function can select the TOP n records. How can I select records from for example 20 to 50? I know SQL server doesn't have "LIMIT" Function....
Thanks
Tin
|
|
|
|
|
|
Thanks for your reply, I able to create the row number column but when I tried to select a range of row number. It appeared this error message "
Conversion failed when converting the varchar value 'Row_Number' to data type int"
I have used cast and convert already.
Any idea?
Tin
|
|
|
|
|
Could you post the query so it would be easier to see the problem
|
|
|
|
|
Hi,
what you oculd also try is something like this...
SELECT top(20)* FROM _yourtable
WHERE _tableID not in (select top(20) tableID from _yourtable)
|
|
|
|
|
Hi friends,
Is any tutorial or useful link for stored procedure optimization with example.
I searched in google.But it is not enough. Please if you know send me,
Hope your's reply.
Thanks & Regards
Every Successful Person Have A Painful Story
|
|
|
|
|
|
Hi mik
Thanks for yours reply.
Every Successful Person Have A Painful Story
|
|
|
|
|
I have been listening so many different answer to question of favorite database. I would like to know what is favorite database of SQLAuthority.com readers. I encourage all of you to participate in this poll. It is very quick poll and takes a second.
A gift of USB drive will be provided to user who will also add comment discussing this subject matter. I encourage to send emails to your friends to participate in poll. I am hopping this poll becomes landmark poll for people who are finding answer to favorite database.
http://blog.sqlauthority.com/2009/02/25/the-poll-what-is-your-favorite-database/[^]
Kind Regards,
Pinal Dave
|
|
|
|
|
pinaldave wrote: I would like to know what is favorite database of SQLAuthority.com readers. I encourage all of you to participate in this poll.
Since I don't read SQLAuthotity.com, I only heard of it just a moment ago, if I participated then it would skew your results. It would no longer be a poll of favourite databases of SQLAuthority.com readers.
|
|
|
|
|
Hi,
It is not for my readers only.I would like to collect data from every developer in world.
Please participate in poll.
Kind Regards,
Pinal
|
|
|
|
|
pinaldave wrote: I would like to collect data from every developer in world
Good luck with that. Most marketing companies have the view that if they get a response from 1% of the audience they are doing exceptionally well.
Heck! Many elections can struggle to get 50% turn out.
|
|
|
|
|
Hi friend,
I have a doubt. Could you clear my doubt?
Actually what is raising events available in stored procedure?
If it is yes, how can we implement and test?
Is any useful link or tutorial available for raising events in sp?
Hope yours reply.
Thanks & Regards
Every Successful Person Have A Painful Story
|
|
|
|
|
Programming in T-SQL isn't event based so you cannot use events like you would in Visual Studio. However, yuo can use for example Queues[^].
|
|
|
|
|
In stored procedure we use sp_sendmail and send sms, other notification are all events?What about that.
Every Successful Person Have A Painful Story
|
|
|
|
|
Guvera wrote: In stored procedure we use sp_sendmail and send sms, other notification are all events?What about that
There are several ways of notifying info from the database: mail, sms, queues, file writes, alerts etc. but none of these are events as they're defined for example in C#.
Since you haven't provided any more info about what you actually want to do, it's hard to say what would be a good choice in your situation.
|
|
|
|
|
how to identify tokens in a sql statement
|
|
|
|
|
I believe that the previous answer also covers this: see[^].
|
|
|
|
|
how to get name of the file before extention from database..
|
|
|
|
|
Do you mean a database file or just a string that contains a filename.
To remove the path and the extension, you could try something like:
declare @filename varchar(50);
set @filename = 'c:\a\b\c\filename.extension';
set @filename = substring( @filename, 1, charindex( '.', @filename) - 1)
while charindex( '\', @filename) > 0
begin
set @filename = substring( @filename, charindex( '\', @filename) + 1, 999999)
end
select @filename
And if you're interested in files of a database you should have a look at sys.database_files[^]
|
|
|
|
|
hi,
Which system table in the MS sql hold the information about the user created tables?
regards,
Bill
|
|
|
|
|
Hi,
It depends on what information you're looking for and what version of SQL Server you're using. If you're using 2005 or higher, you could use:
select * from sys.tables
|
|
|
|
|
Hi
I developing a Emplyee Scheduler I need to display weekly Schedule of every Employee in a Single row but I am get records in columns (verticly)
just need to display them like Whole week record in fornt of name of employee. I am using ASP.NET and C# .... can any help its urgent
|
|
|
|
|
Without knowing anything more of your query (or about the data) it's quite impossible to say what's the problem. You could have a look at Using PIVOT and UNPIVOT[^]. Perhaps it is what you're looking for.
|
|
|
|
|
thanx but i am using SQL 2000,let me make u littel bit clear i am getting records like
name1 - date1 - Schedule
name2 - date2 - Schedule
name1 - date1 - Schedule
name2 - date2 - Schedule
and I want or display
------- - date1 - date2
name1 - Schedule - Schedule
name2 - Schedule - Schedule
I hope you and understand and help me
modified on Thursday, February 26, 2009 2:21 PM
|
|
|
|