objects not inserting to table | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

objects not inserting to table

there are three objects which are not being inserted into a table yet the rest of them which use the same permissions or roles (datawriter) are inserted to the table. The objects in question were correctly being inserted till I attempted to create a stored procedure to print a report of the table. I did create a cell in the table for a local time calculation. I am in the development stage yet and only used the select statement to make sure I can retrieve the data. Keep in mind I am a beginner…LOL.. but learning. Here is the select statement with the added new cell "Iowadatetime" :<br /><br /><br />use jcihistoriandb<br />go<br />select pointid, pointname, utcdatetime, actualvalue, Iowadatetime<br />from rawanalog<br />where pointid = 1 and utcdatetime &gt; getdate() – 1 or pointid = 2 and utcdatetime &gt; getdate() – 1 or pointid = 3 and utcdatetime &gt; getdate() – 1<br /><br />Not sure what I have done but the three object listed are the only ones not there if no where statement. I can open all rows and see other objects. I did get the result set after initiating this statement. However when I continued this morning, the problem started.[<img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />]<br /><br />The Bugster<br /><br /><br /><br />
When you use compound conditions you should use enclosed parentheses to specify the order of evaluation. Makes it easier to read, like this…
where (pointid = 1 or pointid = 2 or pointid = 3) and utcdatetime > getdate() – 1 Is it possible to post the complete Stored Proc?
After further review, I had noticed a dependency (ok maybe alot of them) missing from table. This morning I have restored the database from a week ago to start over on the creation of the sp. I did not even get to the "Create Procedure" statement. Since I am a beginner at all this, I am quite slow, but getting there. the
Well when you get almost done with it and it is still givng you problems post it so we can check it out.
What I had found was the permissions had to be changed. Not sure why, original for Insert and Delete permission was for "mve1" but i had to have "server3mve1". In other words I had two usernames. I still need to do alot of work. I will have too re-configure the server to match the other. (Server2) I will presenting a question on that later.LOL the