Jump to content

sql help urgent


nenu_devudni

Recommended Posts

ASVC    SM

GS       NO_MESH
EL        NO_MESH
WT       NO_MESH
 

Edi na cursor nundi oche records, rendu values n compare chesi oka value assign cheyali ..,.. ela cheste better oo sepandi kasta  @~`

Link to comment
Share on other sites

Just now, mastercheif said:

question lo clarity ledu

oka function undi uncle .. aa function lo oka param value pass chestuna na select ki ... aa slect run chesina prati sari ..same ade structure lo 3 records ostay .. asvc, sm columns .. ipudu endi ante .. aa result set nundi ..prati sari .. i need to check .. if EL = MESH or NO_MESH, if GS = MESH or NO_MESH or WT  = MESH or NO_MESH .. 

Link to comment
Share on other sites

case statements

1 minute ago, nenu_devudni said:

oka function undi uncle .. aa function lo oka param value pass chestuna na select ki ... aa slect run chesina prati sari ..same ade structure lo 3 records ostay .. asvc, sm columns .. ipudu endi ante .. aa result set nundi ..prati sari .. i need to check .. if EL = MESH or NO_MESH, if GS = MESH or NO_MESH or WT  = MESH or NO_MESH .. 

case statements rayacchu kada bujji

Link to comment
Share on other sites

1 minute ago, mtkr said:

ea values comparing??

result set lo ochina column values ni compare cheyali .. so m hoping to use a 2d array or something .. but ela cheyalo ardam katledu .. for comparison .. select ni cursor lo petukuna .. but result set comparision ela how ani ??  

Link to comment
Share on other sites

7 minutes ago, mastercheif said:

case statements

case statements rayacchu kada bujji

single row check aithe okay vuncle ... but I have a condition to check when all 3 exists like .. IF asvc = EL and GS and WT then I NEED TO DO SOME STUFF TOO ... 

Link to comment
Share on other sites

4 minutes ago, nenu_devudni said:

single row check aithe okay vuncle ... but I have a condition to check when all 3 exists like .. IF asvc = EL and GS and WT then I NEED TO DO SOME STUFF TOO ... 

procedures sangathi i don't know man... but simple SQLs lo aythey I would use staging tables or volatile tables

Link to comment
Share on other sites

use boolian comparisons as ': ?' or '&&' in logic with for loop or while loop and then inner loop for result. otherwise use switch & case statements as other member said.

Link to comment
Share on other sites

@TS question chala clear ga post cheyyi so that people can give clear solution. thu thu matram laga post chesthey people can give only suggestions that may or may not apply.

Link to comment
Share on other sites

2 minutes ago, Peach said:

use boolian comparisons as ': ?' or '&&' in logic with for loop or while loop and then inner loop for result. otherwise use switch & case statements as other member said.

case use cheyalenu vuncle .. becasue i need to check for all the 3 asvc like EL,GS and WT at once .. So i am thinking to use a 2d array for comaparison or a record type .. but avi ela use cheyalo ardam katledu .. damn

Link to comment
Share on other sites

20 minutes ago, nenu_devudni said:

single row check aithe okay vuncle ... but I have a condition to check when all 3 exists like .. IF asvc = EL and GS and WT then I NEED TO DO SOME STUFF TOO ... 

denormalize the table...make rows inro columns...assign flags.../ use coalesce, to eliminate nulls, that come with case statement....

basically you need to explode the table to write case statement

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...