Viewing 15 posts - 1,111 through 1,125 (of 1,825 total)
Abhijeet Dighe (1/14/2010)
Thanks.But if I take only 10 characters of string generated using newid() like this:
select CONVERT(varchar(10), right(newid(),10))
still will it generate unique string?
No , but it may be unique enough...
January 14, 2010 at 3:38 am
Because by sheer luck ( not true, but the phrase will do) the rows are returned in an ordered list.
This is cannot be guaranteed.
January 14, 2010 at 3:30 am
If you need a resultset ordered you HAVE to specify order by.
So remove it if you dont care about order , but use it if you do.
January 14, 2010 at 2:56 am
Check out the dense_rank function is BOL to achieve that
January 14, 2010 at 2:40 am
Create a table such as....
Create Table MonthOrder
(
MonthCode char(3),
SortOrder tinyint)
insert into MonthOrder('Jan',1)
insert into MonthOrder('Feb',2)
insert into MonthOrder('Mar',3)
etc...
Join to that , and order by sortorder....
January 14, 2010 at 1:53 am
Something like this ?
with cteemails
as(
SELECT distinct(Email)
FROM(
SELECT Email1,Email2,Email3, Email4,Email5,Email6,Email7,Email8,Email9,Email10 FROM outputresume3
WHERE ((contains (originalresume, '"j2ee" and "java"'))
AND
...
January 13, 2010 at 7:57 am
You cant generate a unique random number , you will have to generate a random number then test for uniqueness.
Heres how i generate random strings
-- EDIT : Apologies , only...
January 13, 2010 at 2:23 am
Something like this ?
with cteuser
as
(
Select user_id,LastName,FirstName,row_number() over (partition by user_id order by LastName) as RowN
from <yourtable>
)
Select * from cteUser where RowN > 1
January 11, 2010 at 7:22 am
This Proc is probably a good starting point
January 11, 2010 at 7:14 am
No issue at all. Each session will have its own unique version of the table.
January 11, 2010 at 7:12 am
homebrew01 (1/11/2010)
The link doesn't work because of a trailing blank. But paste the address, and it takes you to lots of information.
Apologies , Link sorted
January 11, 2010 at 7:02 am
A simple search would of pointed you here
http://www.sqlservercentral.com/Forums/Topic459626-146-1.aspx
January 11, 2010 at 4:47 am
Gianluca Sartori (1/11/2010)
CirquedeSQLeil (1/10/2010)
Or he is waiting just to talk to his developers in India. Which developers will be asking the same questions, if they're worth...
January 11, 2010 at 3:46 am
ifila (1/9/2010)
January 10, 2010 at 3:11 am
Viewing 15 posts - 1,111 through 1,125 (of 1,825 total)