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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by thminer

  1. thminer

    syntax issues with if else stmt

    thanks Denis. aliases on the tables worked great.
  2. thminer

    variables in a table name

    i am trying to figure out if naming a table with a declared variable is possible. i have a stored procedure that runs one time a week. when i run the sproc, i enter a variable known as @weeknumber. i would like the result set to write to a table with the name of the @weeknumber variable. for...
  3. thminer

    syntax issues with if else stmt

    hey all having some trouble with this if else. getting errors like "error 209 - ambiguous column name emEmployee" this is because column emEmployee is in all of the joined tables. thanks for the help. IF EXISTS (Select * From tblbonus WHERE emSelect1 = 'Salary') Begin Select...
  4. thminer

    error in exporting report to sql server

    i am having more problems exporting reprots to sql server. my report has a group header for the records it pulls from the source tables. when i try to export the report, the error message is "column names in each table must be unique. column GH2_employee in table CREXPORT is specified more...
  5. thminer

    exporting to sql db in crystal 8.0

    i am exporting using ODBC, and to sql server. also, some of my fields do contain characters like >. do these characters make a report un-exportable?
  6. thminer

    exporting to sql db in crystal 8.0

    i am trying to export a report into a table on a sql server. i am receiving error messages "Line1: syntax error near >". no more explanation is offered. where can i find out how to fix this error? it exports fine to excel
  7. thminer

    exporting to sql db in crystal 8.0

    i am trying to export a report to a sql db and am receiving sql errors such as Line1: error near '>'. is there a way to find this error or get around it?
  8. thminer

    SQL training

    does anyone know the best place to find online or CD based SQL training? i need it to be self paced so that i can learn faster than a traditional training class. CD is better for me, but anything will do. thnx
  9. thminer

    error 512- newbie

    thanks everyone. i will do some revising and see what happens. thanks for your help.
  10. thminer

    error 512- newbie

    ok- the whole code is included, and the lines that return errors are bold. thanks a lot. CREATE PROCEDURE [dbo].[WeeklyBonus] AS /* declare all variables*/ Begin Declare @target int Declare @vacused int Declare @weeklydirecthours int Declare @totalhoursworked int Declare @bonuspayout...
  11. thminer

    error 512- newbie

    how about on a line like this? the line is question is the first, in bold. there are many records where emselect1 = salary. If (Select emSelect1 From EM) = "salary" Set @paidhours = @weeksworked * 40 Else Set @paidhours = @totalhours i think the problem is i have not distinguished that...
  12. thminer

    error 512- newbie

    thnx! it worked great for that line, i will try all of the other lines with the same logic.
  13. thminer

    error 512- newbie

    i am now having difficulty with error 512, "Server: Msg 512, Level 16, State 1, Procedure WeeklyBonus, Line 40 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression." the issue is that there are...
  14. thminer

    Newbie- variables in stored procedure

    thanks, i think that does it.
  15. thminer

    Newbie- variables in stored procedure

    the variable is defined, but the problem i am having is with if then syntax. the value will not be a column, etc., it will be the result of the entire if-then statement posted in my original message. i am not sure how to write that statement in SQL language to define the variable

Part and Inventory Search

Back
Top