Hi,I have the following view...SELECT dbo.tbl_StarSign_PredictionSet.StarSignPredictionSetID, MAX(dbo.tbl_StarSign_PredictionSet.Date) AS Date, MAX(CASE WHEN StarSignID = 1 THEN PredictionText ELSE NULL END) AS Aries, MAX(CASE WHEN StarSignID = 2 THEN PredictionText ELSE NULL END) AS Taurus, MAX(CASE WHEN StarSignID = 3 THEN PredictionText ELSE NULL END) AS Gemini, MAX(CASE WHEN StarSignID = 4 THEN PredictionText ELSE NULL END) AS Cancer, MAX(CASE WHEN StarSignID = 5 THEN PredictionText ELSE NULL END) AS Leo, MAX(CASE WHEN StarSignID = 6 THEN PredictionText ELSE NULL END) AS Virgo, MAX(CASE WHEN StarSignID = 7 THEN PredictionText ELSE NULL END) AS Libra, MAX(CASE WHEN StarSignID = 8 THEN PredictionText ELSE NULL END) AS Scorpio, MAX(CASE WHEN StarSignID = 9 THEN PredictionText ELSE NULL END) AS Sagittarius, MAX(CASE WHEN StarSignID = 10 THEN PredictionText ELSE NULL END) AS Capricorn, MAX(CASE WHEN StarSignID = 11 THEN PredictionText ELSE NULL END) AS Aquarius, MAX(CASE WHEN StarSignID = 12 THEN PredictionText ELSE NULL END) AS PiscesFROM dbo.tbl_StarSign_Prediction INNER JOIN dbo.tbl_StarSign_PredictionSet ON dbo.tbl_StarSign_Prediction.StarSignPredictionSetID = dbo.tbl_StarSign_PredictionSet.StarSignPredictionSetIDGROUP BY dbo.tbl_StarSign_PredictionSet.StarSignPredictionSetID
The object viewer says that all of the columns allow null except the first. When I do an insert with my local SQL server, the rows get inserted fine using triggers.With my live server the insert trigger doesn't seem to be even firing as its reporting an error of.... quote:
The column 'StarSignPredictionSetID' in table 'newbury.dbo.vw_StarSign_Prediction' cannot be null..