#mysql - Mon 9 Apr 2007 between 00:02 and 00:29

NY Lost Funds



asianCoolzcan mysql do this ---- > insert into tableX select field1='abc', field2, field3 from tableX where field1='xxx' ?
can mysql do insert and select in one statement?
sqsyes
insert into b (blue, green) SELECT red, alpha from a WHERE red=1;
asianCoolzsqs, it's different. u see my statement, i wat the field1 be assigned with new value
insert into tableX select field1='abc', field2, field3 from tableX where field1='xxx' ?
it's actually copy and insert into same table
and field1 is assigned new value while doing insert
sqshmm...
insert into tableX(field1,field2,field3) SELECT 'abc', field2, field3 from tableX where field1='xxx'
field1 will ALWAYS be 'abc' in the new row?
is that what you want?
asianCoolzgenius . thanks dude !
sqssure
ZombieSELECT `CUSTOMER` . `REP_NUM` , SUM( `CUSTOMER` . `BALANCE` ) FROM CUSTOMER WHERE `REP_NUM`="65" AND `BALANCE`>
`CREDIT_LIMIT` GROUP BY `CUSTOMER` . `REP_NUM` ORDER BY `CUSTOMER`.`REP_NUM`
This is returning a Null Set.
And it shouldn;t be
It works up to the point where I try and exclude those "Balances" greater than Credit Limit.
Hello?
CareBear\Hello.
ZombieHi.'
CareBear\Zombie : Is credit_limit negative?
ZombieNo.
CareBear\Zombie : Ie. the lower limit for the balance?
Zombie : Then you'll have to negate it.
Since credit is negative balance.
ZombieBut its nmot a negative
CareBear\balance>-credit_limit
credit_limit is the maximum negative value that balance is allowed to have?
(Or minimum, to be strictly correct.)
chadmaynardmaximum in magnitude
CareBear\Right.
ZombieBoth values are positive.
CareBear\Zombie : What does credit_limit represent? What meaning does it have?
ZombieA credit limit of a CUST_NUM by a specific REP_NUM
The specific REP_NUM is
#65
customers represented by sales rep #65 that have balances less then their credit limit
CareBear\You didn't answer my question though.

Page: 2 9 16 23 30 37 44 51 58 

IrcArchive

NY Lost Funds