loveindia Posted September 25, 2015 Report Posted September 25, 2015 not in is an exclusion. nuvvu first vadindi inclusion approach neeku filtering cheyataniki ekkuva values unte, use IN clause indaka example pedite, only Chennai, usa thappa, migata emi vaddu neeku, then use where fieldvalue in('chennai', 'usa') Filtering thakkuva values ante reverse. chennai, usa thappa migata anta kavalante use where fieldvalue not in('chennai','usa') using IN is the poorest form to ask a query to run in terms of heavy data man..
sqlhelp Posted September 25, 2015 Author Report Posted September 25, 2015 This is bad man... u will end up in infinite loop... inka vere ela cheyocho any ideas man? ee table size is largest in the database and entha takuva and easy ga update cheygelthe antha better but i am running out of options as vere columns ni include chese la ledhu ... location ane column lo motham text values
sqlhelp Posted September 25, 2015 Author Report Posted September 25, 2015 not in is an exclusion. nuvvu first vadindi inclusion approach neeku filtering cheyataniki ekkuva values unte, use IN clause indaka example pedite, only Chennai, usa thappa, migata emi vaddu neeku, then use where fieldvalue in('chennai', 'usa') Filtering thakkuva values ante reverse. chennai, usa thappa migata anta kavalante use where fieldvalue not in('chennai','usa') IN cheydaniki ledhu enduku ante ahh fields challa ekuva unayi inclusion lo only oka 10 fields unayi
sqlhelp Posted September 25, 2015 Author Report Posted September 25, 2015 Put your field values in a table variable or temp table... Use not exists clause and write a straight forward update statement man.. Rowcount tho row by row ne kada chesedi ? am I missing something ? temp table lo just fieldvalues which I dont want to be updated insert chesi then update ah like ila ? create table #fieldvaluetable ( fieldvalueID int ) insert into #fieldvaluetable (fieldvalueID) select t.fieldvalue where t.fieldvalue exists(200,510) and thn do update ?
andhravodu Posted September 25, 2015 Report Posted September 25, 2015 ROFL man.. okasari query chudu malli... row by row enduku jarugutundi... ragging chestunnavendi man, query mallee choosi edit petta, table mottam bulk malle malle kodutunnadsni
SUbba LIngam Posted September 25, 2015 Report Posted September 25, 2015 simple update and exists clause tho work kaada nee req ? am i missing anything ?
loveindia Posted September 25, 2015 Report Posted September 25, 2015 ragging chestunnavendi man, query mallee choosi edit petta, table mottam bulk malle malle kodutunnadsni
sqlhelp Posted September 27, 2015 Author Report Posted September 27, 2015 Another question please help guys table eg Id Name fieldname value sort 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 nenu work and value 5 insert cheyali fieldname and value columns lo for each different name row in table ? like aftr insert ila undali I am stuck with sort column ela sequence ga number update chestham ? Id Name fieldname value sort 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 10 monday work 5 2 11 tuesday work 5 2 19 wednesday work 5 2 55 thursday work 5 2 42 friday work 5 2
andhravodu Posted September 27, 2015 Report Posted September 27, 2015 Another question please help guys table eg Id Name fieldname value sort 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 nenu work and value 5 insert cheyali fieldname and value columns lo for each different name row in table ? like aftr insert ila undali I am stuck with sort column ela sequence ga number update chestham ? Id Name fieldname value sort 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 10 monday work 5 2 11 tuesday work 5 2 19 wednesday work 5 2 55 thursday work 5 2 42 friday work 5 2 use this insert into <table> (id, name, fieldname, value, sort) select id, name, 'work' as fieldname, 5 as value, sort+1 from <table>;
loveindia Posted September 27, 2015 Report Posted September 27, 2015 LTT u are also sql no man... y not tell simple answers??
sqlhelp Posted September 27, 2015 Author Report Posted September 27, 2015 use this insert into <table> (id, name, fieldname, value, sort) select id, name, 'work' as fieldname, 5 as value, sort+1 from <table>; sorry ila undi data so sort lo max value tiskoni + 1 cheyali daniki for each row ? 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 10 monday day 10 2 11 tuesday day 10 2 19 wednesday day 10 2 55 thursday day 10 2 42 friday day 10 2 10 monday work 5 3 11 tuesday work 5 3 19 wednesday work 5 3 55 thursday work 5 3 42 friday work 5 3
loveindia Posted September 27, 2015 Report Posted September 27, 2015 What did u try about it so far man.. tell..
andhravodu Posted September 27, 2015 Report Posted September 27, 2015 sorry ila undi data so sort lo max value tiskoni + 1 cheyali daniki for each row ? 10 monday time 1 1 11 tuesday time 1 1 19 wednesday time 1 1 55 thursday time 1 1 42 friday time 1 1 10 monday day 10 2 11 tuesday day 10 2 19 wednesday day 10 2 55 thursday day 10 2 42 friday day 10 2 10 monday work 5 3 11 tuesday work 5 3 19 wednesday work 5 3 55 thursday work 5 3 42 friday work 5 3 neeku already 'work' value undi kada, appudu neeku 4 kavala kotta work value vesi? ante, neeku unna work value tho kalipi, extra 10 monday work 5 4 11 tuesday work 5 4 19 wednesday work 5 4 55 thursday work 5 4 42 friday work 5 4 ani kavala?
4Vikram Posted September 27, 2015 Report Posted September 27, 2015 u are also sql no man... y not tell simple answers?? chusna ardam kale so lite ani ltt chesna.. aina naak antha talent led vuncle, edo time ki nadipistuna malla training start chesdam ani planning main hun
Recommended Posts