Usktapa Posted February 10, 2015 Report Posted February 10, 2015 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..
SeelamleniAunty Posted February 10, 2015 Report Posted February 10, 2015 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.. baa mattalodi naa Id ,alli ban chesi 10garu
Usktapa Posted February 10, 2015 Report Posted February 10, 2015 baa mattalodi naa Id ,alli ban chesi 10garu ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar..
Nellore_peddareddi Posted February 10, 2015 Report Posted February 10, 2015 baa mattalodi naa Id ,alli ban chesi 10garu theduulu alantivi mari.
Nellore_peddareddi Posted February 10, 2015 Report Posted February 10, 2015 ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar..
mtkr Posted February 10, 2015 Report Posted February 10, 2015 sorry ardam avaledhu how would that generate a code of 4 letters ? TYUW nundi em em combinations expecting??
mtkr Posted February 10, 2015 Report Posted February 10, 2015 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
SeelamleniAunty Posted February 10, 2015 Report Posted February 10, 2015 ipudu sesara..epdoooo sesi 10gali..mods ipde lesinatunar.. report nokki 10ga
Usktapa Posted February 10, 2015 Report Posted February 10, 2015 report nokki 10ga ne mouse ki oka click waste aindhi.. report seyakuna 10gestha..
SeelamleniAunty Posted February 10, 2015 Report Posted February 10, 2015 ne mouse ki oka click waste aindhi.. report seyakuna 10gestha..
sqlhelp Posted February 11, 2015 Author Report Posted February 11, 2015 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
Usktapa Posted February 11, 2015 Report Posted February 11, 2015 This is generating different combinations with same code . I just need four codes nen seppindhi workout kaale?
mtkr Posted February 11, 2015 Report Posted February 11, 2015 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??
sqlhelp Posted February 11, 2015 Author Report Posted February 11, 2015 nen seppindhi workout kaale? no kaledhu
Usktapa Posted February 11, 2015 Report Posted February 11, 2015 no kaledhu that is the only way..adhi kakpothe nek inka edhi workoiut kadh..
Recommended Posts