BEGIN TRANSACTION
UPDATE
QREVALUE
SET
ScrapRecordTag = 'Some value',
TagNumber = 'some value',
QPRQPINumber = 'some value',
ProblemDescription = 'some value',
QREConfirmation ='some value'
NAMC = 'some value
FROM QREVALUE Q1, SkpiProblemLog S2
where SortYesNo='Yes' and Q1.ScrapRecordTag = S2.ScrapRecordTag
UPDATE
SkpiProblemLog
SET
PartName= 'Some value',
PartNumber= 'some value',
FROM SkpiProblemLog S2, QREVALUE Q1
where Q1.ScrapRecordTag = S2.ScrapRecordTag
COMMIT
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.[QPR/QPI Number], QREVALUE.[Tag Number], QREVALUE.NAMC, QREVALUE.ScrapRecordTag AS Expr1
FROM QREVALUE LEFT JOIN Sort ON QREVALUE.[Tag Number]=Sort.TagNumber
WHERE (((QREVALUE.TagNumber) Is Null));
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.[QPR/QPI Number], QREVALUE.[Tag Number], QREVALUE.NAMC, QREVALUE.ScrapRecordTag AS Expr1
FROM QREVALUE LEFT JOIN Sort ON QREVALUE.[Tag Number]=Sort.TagNumber
WHERE (((QREVALUE.TagNumber) Is Null));
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.[QPR/QPI Number], QREVALUE.[Tag Number], QREVALUE.NAMC, QREVALUE.ScrapRecordTag
FROM QREVALUE
WHERE (((QREVALUE.TagNumber) Is Null
AND QREVALUE.[Tag Number] NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.[Tag Number]=Sort.TagNumber))
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.QPRQPINumber, QREVALUE.TagNumber, QREVALUE.NAMC, QREVALUE.ScrapRecordTag
FROM QREVALUE
WHERE (((QREVALUE.TagNumber) Is Null
AND QREVALUE.TagNumber NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.TagNumber=Sort.TagNumber)));
WHERE (((QREVALUE.TagNumber) Is Null
WHERE (((QREVALUE.TagNumber) Is NOT Null
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.QPRQPINumber, QREVALUE.TagNumber, QREVALUE.NAMC, QREVALUE.ScrapRecordTag
FROM QREVALUE
WHERE (((QREVALUE.TagNumber) Is not Null
AND QREVALUE.TagNumber NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.TagNumber=Sort.TagNumber)));
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag )
SELECT QREVALUE.QPRQPINumber, QREVALUE.TagNumber, QREVALUE.NAMC, QREVALUE.ScrapRecordTag
FROM QREVALUE
WHERE (((QREVALUE.SortYestNo = 'Yes'
AND QREVALUE.TagNumber) Is not Null
AND QREVALUE.TagNumber NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.TagNumber=Sort.TagNumber)));
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag, SortYesNo )
SELECT QREVALUE.QPRQPINumber, QREVALUE.TagNumber, QREVALUE.NAMC, QREVALUE.ScrapRecordTag, QREVALUE.SortYesNo
FROM QREVALUE
WHERE (((QREVALUE.SortYestNo = 'Yes'
AND QREVALUE.TagNumber) Is not Null
AND QREVALUE.TagNumber NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.TagNumber=Sort.TagNumber)));
INSERT INTO Sort ( QPRQPINumber, TagNumber, NAMC, ScrapRecordTag, SortYesNo )
SELECT QREVALUE.QPRQPINumber, QREVALUE.TagNumber, QREVALUE.NAMC, QREVALUE.ScrapRecordTag, QREVALUE.SortYesNo
FROM QREVALUE
WHERE (((QREVALUE.SortYestNo) = 'Yes'
AND (QREVALUE.TagNumber) Is not Null
AND QREVALUE.TagNumber NOT IN (SELECT DISTINCT TagNumber
FROM SORT
WHERE QREVALUE.TagNumber=Sort.TagNumber));
Title | # Comments | Views | Activity |
---|---|---|---|
Using Case in sql queries | 17 | 58 | |
adding % symbol to a percentage - oracle query | 16 | 39 | |
MySQL Select latest stock count records | 11 | 36 | |
Oracle - Stored Procedure Privilge access | 3 | 22 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!