Viewing 15 posts - 1,426 through 1,440 (of 1,538 total)
I tried searching various places but nowhere i found that UNION sorts the data, it only performs a SELECT DISTICNT on the cummulative resultset.
I was wrong there!!
December 19, 2008 at 3:00 am
Refer BOL and msdn...
http://msdn.microsoft.com/en-us/library/aa213039(SQL.80).aspx
http://msdn.microsoft.com/en-us/library/ms173763.aspx
December 19, 2008 at 2:02 am
put them in brackets []
[column one], [column two]
December 19, 2008 at 1:35 am
If you just want to restore the database, make sure no users are connected to the database. If they are connected, force them to disconnect...
--step 1 disconnect users....
alter database yourDBName...
December 19, 2008 at 1:31 am
I tried something like this....
------------------------------
create table ##emp
(
name varchar(25)
)
insert into ##emp
select '1'
union all
select 'Har'
union all
select '2'
union all
select '7'
union all
select 'abc'
union all
select '#'
union all
select '@'
alter table ##emp add col2 varchar(20)
-- from Client...
December 19, 2008 at 1:24 am
It'll wait for the first update to finish as first update has acquired a rowlock; 2nd one cannot update the rows held by the lock created by 1st update.
December 19, 2008 at 1:09 am
The problem is I don't want to use EXEC(@combined query string) to temperately save the results to a table or something and then fetch it again, how can I do?...
December 19, 2008 at 1:05 am
1) user1 and user2 selecting the data from table1.
Shared locks will be applied and each user will be able to see results. The locks get expired once all requested data...
December 19, 2008 at 12:54 am
You can write a scheduled job for this task of allocation.
1. find number of available records requiring action and are not in a state of 'inwork'
2. find number of availabe...
December 19, 2008 at 12:34 am
Try running this query
--------------------------------
declare @Table_Name varchar(500)
set @Table_Name='S_EVT_ACT'
Declare @Query Varchar (500)
set @Query='select * from ' + @Table_Name
Exec (@Query)
December 19, 2008 at 12:21 am
This is happening since u're using UNION which sorts the data and outputs only distinct values.
Replcae UNION with UNION ALL and no sorting happens
--------------------------------------
create table #emp
(
name varchar(25)
)
--drop table #emp
insert into...
December 19, 2008 at 12:15 am
assuming you have 100 records and 20 users, You allocate 5 records each to the 20 users.
Make an change in the application so that each user sees only those records...
December 19, 2008 at 12:09 am
well i would define triggers as procedures capable of autofiring based on certain events. difference is they donot accept parameters.
December 18, 2008 at 11:44 pm
Viewing 15 posts - 1,426 through 1,440 (of 1,538 total)