Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: phil22046
  • Order by date
  1. phil22046

    Error Message

    I agree with you, GIGO. But I am inheriting this system. The Vendor who wrote this system for us obviously didn't know how to design a database. I have to deal with tables with no primary key, never normalized data and no help from the vendor.
  2. phil22046

    Error Message

    Not Quite I got: Server: Msg 8114, Level 16, State 5, Line 4 Error converting data type varchar to numeric.
  3. phil22046

    Error Message

    How can I get back something other than an Int?
  4. phil22046

    Error Message

    OK I get 256 records when I run that, maybe there ar4e 256 bad records. I was thinking that there was only one bad record and was trying to narrow it down.
  5. phil22046

    Error Message

    the SQL I am running is this: DECLARE @startingdate datetime; DECLARE @endingdate datetime; SET @startingdate = '01/01/2007'; SET @endingdate = '12/31/2007'; IF OBJECT_ID (N'dbo.Temp_ReportData', N'U') IS NOT NULL DROP TABLE dbo.Temp_ReportData; SELECT ITEM AS NAME, INVDATE AS...
  6. phil22046

    Logic error updating a column

    Well its appropriate then, it is almost Halloween!
  7. phil22046

    Logic error updating a column

    Haw can I get the result set to not have NULLs? my latest SQL: Update .dbo.Temp_ReportData SET JanAmt = JanAmt + (Select SUM(ISNULL(cost,0)) FROM dbo.Temp_Detailstable WHERE dbo.Temp_Detailstable.Cnumber = Temp_reportData.cnumber AND...
  8. phil22046

    Logic error updating a column

    First let me explain that the final product will have #temp files. The reason I created database temp files is so I could have something to work with as an aid to development. Anyway this is not being developed on the 'Live' database. It is only a copy. So I am not ruining anything. I...
  9. phil22046

    Logic error updating a column

    I did that and got this error: Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated.
  10. phil22046

    Logic error updating a column

    I wanted to update an entire column (January) in my report table. I need a different way to do this. I got this error when running the following: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an...
  11. phil22046

    How to have a trigger call a stored procedure

    Also the databases are quite small. The largest table has only 40000 records.
  12. phil22046

    How to have a trigger call a stored procedure

    Ok the motivation for writing this trigger and stored procedure was because we don't have access to the application source code and can only tamper with the database as a way of correcting this problem. Instead of Update, we could use INSERT, DELETE. Or we could update all records thru a job...
  13. phil22046

    How to have a trigger call a stored procedure

    The Cnumber is a 10 character Alphanumric field. The stored procedure will update only one conference. This is what I have now and it passes the syntax check: CREATE TRIGGER [fixcounts] ON [dbo].[REGISTR] AFTER UPDATE AS DECLARE @The_Cnumber AS Varchar(10) Select @The_Cnumber =...
  14. phil22046

    How to have a trigger call a stored procedure

    This is what I have so far and it will not pass the syntax check. CREATE TRIGGER [fixcounts] ON [dbo].[REGISTR] FOR INSERT, UPDATE, DELETE AS EXEC ospreytraining2.dbo.UpdateOneConferenceCounts @The_Cnumber = dbo.registr.cnumber;
  15. phil22046

    How to have a trigger call a stored procedure

    The Non-profit I work for sells registrations to courses as the main business. Only once every 24 hours is a process run that updates the counts, and so occasionally there is overbooking. The reason is that it takes a long time to run, and this was a poor design anyway. I want to add an...
  16. phil22046

    Into Clause not working

    ca8msm, it was a syntax error.
  17. phil22046

    Into Clause not working

    I have a large SQL statement with a Union to another large SQL stmt. When I run it I see the data in the results pane of query analyzer. I want to put the results into a temp table to be able to write additional sql statements to update another table. Also to speed up execution I should...
  18. phil22046

    Create one store procedure to execute multiple SQL statements

    My beginning of code is: Create Procedure RevenueByMonth @startingdate datetime, @endingdate datetime SET @startingdate = '01/01/2007' SET @endingdate = '12/31/2007' I am getting this error: Server: Msg 156, Level 15, State 1, Procedure RevenueByMonth, Line 6 Incorrect syntax near the...
  19. phil22046

    Create one store procedure to execute multiple SQL statements

    Only the first SQL statement seems to do anything. The second creates a temp table in my database and no temp table exists after execution. Do I need to put the word GO between each statement?
  20. phil22046

    Create one store procedure to execute multiple SQL statements

    I have a very complex crosstab type of report I have been assigned to produce and my approach has been to create a temp file in the database with all the column headings and zeros in all the places where the numbers would go. What I want to do is to use several SQL statements to update the...

Part and Inventory Search

Back
Top