Jump to content

Recommended Posts

Posted

are you getting any output for your query?

Declare @Alphanum Varchar(4) = 'TYUW'

 

Select SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

 

if so..could you post the result set here..gallery_8818_6_385253.gif?1367349476

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • Usktapa

    12

  • sqlhelp

    9

  • mtkr

    8

  • SeelamleniAunty

    3

Top Posters In This Topic

Posted

are you getting any output for your query?

Declare @Alphanum Varchar(4) = 'TYUW'

 

Select SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

+ SubString(@Alphanum, 1 + ( Cast(  4 * Rand( cast(newid() as varbinary) ) as Int)), 1)

 

if so..could you post the result set here..gallery_8818_6_385253.gif?1367349476

baa mattalodi naa Id ,alli ban chesi 10garu ragada11.gif

Posted

baa mattalodi naa Id ,alli ban chesi 10garu ragada11.gif

ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar..gallery_8818_6_385253.gif?1367349476

Posted

baa mattalodi naa Id ,alli ban chesi 10garu ragada11.gif

 

theduulu alantivi mari.gallery_8818_6_385253.gif?1367349476

Posted

ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar..gallery_8818_6_385253.gif?1367349476

gallery_8818_6_385253.gif?1367349476

Posted

sorry ardam avaledhu how would that generate a code of 4 letters ?

 

 

TYUW nundi em em combinations expecting??

Posted

 

 

drop table table_comb

 

create table table_comb

(

Name varchar(10)

)

 

insert into table_comb values ('TYUW')

 

select * from table_comb

 

 

drop table #Temp

 

 

 

create table #Temp (id varchar(1))

 

Insert into #Temp(id) (select substring(Name,1,1) from table_comb)

Insert into #Temp(id) (select substring(Name,2,1) from table_comb)

Insert into #Temp(id) (select substring(Name,3,1) from table_comb)

Insert into #Temp(id) (select substring(Name,4,1) from table_comb)

 

 

select t1.id,t2.id, t3.id, t4.id

from  #Temp t1 cross join

        #Temp t2 cross join

        #Temp t3 cross join

        #Temp t4

where t1.id <> t2.id

   and t1.id <> t3.id

   and t1.id <> t4.id

   and t2.id <> t3.id

   and t2.id <> t4.id

   and t3.id <> t4.id

 

Posted

ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar..gallery_8818_6_385253.gif?1367349476

report nokki 10ga ragada11.gif

Posted

report nokki 10ga ragada11.gif

ne mouse ki oka click waste aindhi..

 

report seyakuna 10gestha..gallery_8818_6_385253.gif?1367349476

Posted

ne mouse ki oka click waste aindhi..

 

report seyakuna 10gestha..gallery_8818_6_385253.gif?1367349476

ragada11.gif

Posted

drop table table_comb

 

create table table_comb

(

Name varchar(10)

)

 

insert into table_comb values ('TYUW')

 

select * from table_comb

 

 

drop table #Temp

 

 

 

create table #Temp (id varchar(1))

 

Insert into #Temp(id) (select substring(Name,1,1) from table_comb)

Insert into #Temp(id) (select substring(Name,2,1) from table_comb)

Insert into #Temp(id) (select substring(Name,3,1) from table_comb)

Insert into #Temp(id) (select substring(Name,4,1) from table_comb)

 

 

select t1.id,t2.id, t3.id, t4.id

from  #Temp t1 cross join

        #Temp t2 cross join

        #Temp t3 cross join

        #Temp t4

where t1.id <> t2.id

   and t1.id <> t3.id

   and t1.id <> t4.id

   and t2.id <> t3.id

   and t2.id <> t4.id

   and t3.id <> t4.id

 

This is generating different combinations with same code .

I just need four codes

Posted

This is generating different combinations with same code .

I just need four codes

nen seppindhi workout kaale?gallery_8818_6_385253.gif?1367349476

Posted

This is generating different combinations with same code .

I just need four codes

 

 

ade nen adigedhi.. nuv cheppedi.. naak ardam kaanidi...

 

 

ea just four codes kaavali??

Posted

no kaledhu
 

that is the only way..adhi kakpothe nek inka edhi workoiut kadh..gallery_8818_6_385253.gif?1367349476

×
×
  • Create New...