Browse by Tags

  • Calculate Average in SQL statement

    I need to calculate a players batting average based on a couple of columns in a SQL 2005 database table. I need to be able to do this calculation in a SQL statement because I am populating a grid with the results of the avg and the other columns in the table. For the sake of this example I need to do...
    Posted to WebApplications (Forum) by software on 06-16-2010
  • Using CASE Statement in WHERE CLAUSE (SQL SERVER 2000)

    As system analysis I am reviewing some stored procedures. In one case I asked the developer to create a selectmatching stored procedure that would get as parameters all fields on the table. If a value was received for a specific parameter, the procedure had to filter on that value. If a NULL was received...
    Posted to Miscellaneous (Forum) by software on 06-03-2010
  • SQL Statement Convert varChar to Int for Sort

    I have a SQL 2000 table that has jersey numbers as a column (jerNumber). This column is a varchar(3) because I have to enter values such as 00, 04, 08, etc. Making this an int column is not an option. What I need to do is sort on this column to have the sort come out in numerical order like 0, 00, 01...
    Posted to ASP (Forum) by software on 06-02-2010
  • EXCEL IF statement for string and wildcard character

    I was trying to use Excel if statement for string using wildcard character. I was trying to use luke this =If (C1="F*","F") But, it didnot work. I know that LEFT command does this. But, can we use IF in this case? Secondly, I want to string from one cell to another. I was doing like...
    Posted to MS Excel (Forum) by software on 06-01-2010
  • If-Then-Else statement.  If {field} = "Customer" then do these 3 if statements, If not then these other If statements.

    Hello, Here is my formula: if {CUSTOMER} = "ABC" then if {@datediff} if {@datediff} = 0 then "On Time" else if {@datediff} > 0 then "Late" else if {SFC2.C2_NUM} = "DEF" then if {@datediff} if {@datediff} = 0 then "On Time" else if {@datediff} >...
    Posted to Crystal Reports (Forum) by software on 05-12-2010
  • CASE statement in WHERE clause

    Can i write the following query: SELECT a,b,c FROM my_table WHERE CASE in_emp_id = 0 AND date_from <> 0 THEN exh_valid_from = in_date_from , CASE in_emp_id <> 0 AND in_date_from <> 0 THEN exh_emp_id = in_emp_id , CASE in_emp_id <> 0 AND in_date_from <> 0 THEN exh_valid_from...
    Posted to Oracle (Forum) by software on 04-13-2010
  • Update statement using inner join

    I have two tables ALPHA and BETA. I need to update the BETAID to the ALPHAID. The BETAID is currently set to the ALPHADESC so I am joining on this column. The following update statement works fine in SQL Server: UPDATE BETA SET BETAID= A.ALPHAID FROM TABLE BETA INNER JOIN ALPHA A ON BETAID= A.ALPHADESC...
    Posted to Oracle (Forum) by software on 03-16-2010
  • Using case statement in Stored procedure

    I have the following stored procedure that runs 2 sql statements, basically the statement are the same except for an additional "AND" clause when @intReg > 0. Firstly this does not work, I get a message to say incorrect syntact at ">" Second, I don't think this is very elegant...
    Posted to Miscellaneous (Forum) by software on 03-15-2010
  • using IF THEN statements

    In Crystal Report 9 what is the correct syntax for using if then statement such as the following IF (addresstype) IN {'Home', 'Busin','VacaHome','School'} THEN "City = "&addresscity&", "&"State = "&addressstate; or such as STRINGVAR...
    Posted to Crystal Reports (Forum) by software on 03-15-2010
  • Case Statement

    Hi there, I am trying to use a Case Statement to filter some records. For example here is what I want to accomplish.. 1] I want to set prompts for a field "Company". This company field has multiple entries(about 6) "ABC" "XYZ" "LONDON" etc Now what I want to do...
    Posted to Crystal Reports (Forum) by software on 03-15-2010
Page 1 of 20 (191 items) 1 2 3 4 5 Next > ... Last ยป