I have a table that has a Fantype field in it and other fields and data and two of the Fantypes are
CA
CABD
I need to add two new fans TPD & TPB these fan types are the same as
CA and data = TPD and same data
CABD and data = TPB and same data
I want to add the new fans but use the same data that is associated with the CA and CABD
I need to have in one table the CA CABD TPD TPB in one table and have the CA & TPD, CABD & TPB have the same data.
Am I going about this wrong.
????????????????????????????????????????
Not sure how to get this part done
I need to CREATE TABLE TEMP AND IMPORT
STRUCTURE FROM TABLE1 INTO TABLE TEMP.
????????????????????????????????????????
----------------------------------------
SELECT * INTO TEMP FROM TABLE1
DELETE FROM TEMP
WHERE FanType <> 'CA'
AND FanType <>'CABD';
UPDATE TEMP SET FanType = 'TPD'
WHERE FanType = 'CA';
UPDATE TEMP SET FanType = 'TPB'
WHERE FanType = 'CABD';
------------------------------------------
????????????????????????????????????????????????
I'm not sure if this is correct
SELECT * INTO TABLE1 FROM (SELECT * FROM TABLE1
UNION
SELECT * FROM TEMP);
????????????????????????????????????????????????
--------------------------------------
UPDATE TABLE1
SET LISTPRICE = LISTPRICE * .92;
----------------------------------------
???????????????????????????????????????????????????
I can remeber how to do this part either.
UPDATE TABLE1
Need to replace the first value in a field and replace it with a 2. (like 1023 would now be 2023)
????????????????????????????????????????????????????
CA
CABD
I need to add two new fans TPD & TPB these fan types are the same as
CA and data = TPD and same data
CABD and data = TPB and same data
I want to add the new fans but use the same data that is associated with the CA and CABD
I need to have in one table the CA CABD TPD TPB in one table and have the CA & TPD, CABD & TPB have the same data.
Am I going about this wrong.
????????????????????????????????????????
Not sure how to get this part done
I need to CREATE TABLE TEMP AND IMPORT
STRUCTURE FROM TABLE1 INTO TABLE TEMP.
????????????????????????????????????????
----------------------------------------
SELECT * INTO TEMP FROM TABLE1
DELETE FROM TEMP
WHERE FanType <> 'CA'
AND FanType <>'CABD';
UPDATE TEMP SET FanType = 'TPD'
WHERE FanType = 'CA';
UPDATE TEMP SET FanType = 'TPB'
WHERE FanType = 'CABD';
------------------------------------------
????????????????????????????????????????????????
I'm not sure if this is correct
SELECT * INTO TABLE1 FROM (SELECT * FROM TABLE1
UNION
SELECT * FROM TEMP);
????????????????????????????????????????????????
--------------------------------------
UPDATE TABLE1
SET LISTPRICE = LISTPRICE * .92;
----------------------------------------
???????????????????????????????????????????????????
I can remeber how to do this part either.
UPDATE TABLE1
Need to replace the first value in a field and replace it with a 2. (like 1023 would now be 2023)
????????????????????????????????????????????????????