Jump to content

Recommended Posts

Posted

sql server help 

 
oka table lo there is a column  with codes 
 
 like example 
 
ID       Name        Code 
1        news         TYUW
2        paper         ABCD
 
 
aithe naku ah code lo unna values ni inko table lo ki insert cheyali by reordering the code value  in 4 different ways
 
ID       Name        Code 
1        news1        YUTW
2        news2       UYWT
3        news3       TUWY
4        news4       WTUY
 
How can i reorder the values and insert them ?    
 
I tried something like  below kani values repeat avthunayi.. 
 

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)

 
 
basically ivii oka question ki multiple choice answers , so random ga code values ni dfferent options laga chupiyali  where user will choose order of the code value. 
  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • Usktapa

    12

  • sqlhelp

    9

  • mtkr

    8

  • SeelamleniAunty

    3

Top Posters In This Topic

Posted

em order la cheyale.??gallery_8818_6_385253.gif?1367349476

 

distinct chesina alage unayi 

 

edaina order  doesn't matter. 

Posted

 

sql server help 

 
oka table lo there is a column  with codes 
 
 like example 
 
ID       Name        Code 
1        news         TYUW
2        paper         ABCD
 
 
aithe naku ah code lo unna values ni inko table lo ki insert cheyali by reordering the code value  in 4 different ways
 
ID       Name        Code 
1        news1        YUTW
2        news2       UYWT
3        news3       TUWY
4        news4       WTUY
 
How can i reorder the values and insert them ?    
 
I tried something like  below kani values repeat avthunayi.. 
 

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)

 
 
basically ivii oka question ki multiple choice answers , so random ga code values ni dfferent options laga chupiyali  where user will choose order of the code value. 

 

PM Loveindia or Gymbalu bhaiyya, they might help.... LTT for experts

Posted

neeku aa word lo oche anni combinations kaaval? or any specific 4 values a? or any other spl condition?

Posted

neeku aa word lo oche anni combinations kaaval? or any specific 4 values a? or any other spl condition?

specific 4 kadh..any unique 4.gallery_8818_6_385253.gif?1367349476

Posted

specific 4 kadh..any unique 4.gallery_8818_6_385253.gif?1367349476

 

 

akkada YTUW kuda oka possible value... so adi enduku expoect cheyyatledhu???

ade asking only any specific 4 values kaavala r thana requirement enti ani? ante 5 letter word unte any 5 values return cheyyala or all possible combinations aa?

Posted

akkada YTUW kuda oka possible value... so adi enduku expoect cheyyatledhu???

ade asking only any specific 4 values kaavala r thana requirement enti ani? ante 5 letter word unte any 5 values return cheyyala or all possible combinations aa?

 

nenu just example ala rasanu
any random order with these 4 values   TYUW 

 

TYUW is right order  so user ni   4 seprate questions lo 1st code  ?  2nd code ila multiple choices tho  adgutham

 

so however the order is  like  1st question  ki   T avthundi answer

Posted

md5?
 

ante nek values osthunai anav kada..so aa values ki md5 hash values assign cheshi..4 values select chesko..

 

fox ex itla untai hash values..

YUTW- 70227b9573dffe3a5d363a8c126144cf

UYWT-05fcd35711b0d3ab554db8766eac6a59

TUWY-efaf2210b3621a6f1af61cd8f00c16ea

WTUY-9243a5d3bbbd5698507f0fdb91f3d7a1

 

gallery_8818_6_385253.gif?1367349476

Posted

nenu just example ala rasanu
any random order with these 4 values   TYUW 

 

TYUW is right order  so user ni   4 seprate questions lo 1st code  ?  2nd code ila multiple choices tho  adgutham

 

so however the order is  like  1st question  ki   T avthundi answer

 

 

 

ee multiple choice ento ardam kaaled.. but oka way is... (assuming colum value is fixed.. like here 4)

 

split the word into multiple columns

 

like TYUW ni

 

T

Y

U

W

 

then apply cross join with one whr condition applying any one of col is not equal to thr

Posted

ee multiple choice ento ardam kaaled.. but oka way is... (assuming colum value is fixed.. like here 4)

 

split the word into multiple columns

 

like TYUW ni

 

T

Y

U

W

 

then apply cross join with one whr condition applying any one of col is not equal to thr

 

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

×
×
  • Create New...