@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> good morning everyone
<0> without using cursors, how can I loop in a recordset to perform specific action depending on the value of a column?



<1> in native sql or a client
<0> in a stored procedure
<1> what actions?
<0> 1- select * from table1 where [condition]
<0> 2- for each record, perform select * from table2 where table2.column2 = table1.column1
<0> 3- for each record in 2, IF columnX = value, do another select
<0> otherwise, do something else



<0> 4- take values from 1, 2 and 3 to build a final recordset to return
<1> select t1.*,t2.*,case t2.columnx when 'egg' then 'EGGY' else 'NOT EGGY' end from t1 inner join t2 on (t2.column1=t1.column1)
<0> thanks
<2> can anyone clarify me why in MSSQL the reason why I get (0 ROWS AFFECTED) when im doing a valid Update statement?
<2> set Resource = (select distinct resource from serveraccesslog)
<2> has anyone had this kind of problem? (if done separately the Select statement return the desired values)


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

#allnitecafe
maca rooth
#allnitecafe
mrbangalore
#kl
#allnitecafe
guster discography torrent
what is lexatonil used for
#chat-world
cins cins nickler



Home  |  disclaimer  |  contact  |  submit quotes