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 bkrike 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: n36z
  • Content: Threads
  • Order by date
  1. n36z

    Nullif and Case Expression

    If @value was not null, How would you express it with a NOT Isnull expression in a case statement? declare @value1 int set @value1=1 select * from table1 where 0 = 0 AND CASE WHEN "NOT nullif(@value1,'')" THEN columnA END = @value1
  2. n36z

    Case statement error

    When I run the following query. An error is being thrown "Incorrect syntax near 'columnA'" declare @value1 int set @value1=2 select * from table1 where 0 = 0 AND CASE WHEN @value1>1 columnA ELSE 1 END = 1
  3. n36z

    nullif error when no value is specified

    I am testing a parameter for a Null value. When I specify a "1" for the value, the expression works correctly: declare @value1 int set @value1=1 select nullif(@value1,'') Without specify a value, I get an error message that reads "Incorrect syntax near the keyword 'select'.": declare...
  4. n36z

    IF Statement

    Expression (A) Successfully executes, however Expression B returns an error. I want to be able to conditionaly include a WHERE or AND clause based off of a specified condition. How do I do it? Expression A if (2>1) select * from table1 where columnA = 2 Expression B select * from table1...
  5. n36z

    cfstoredproc or stored procedure problem

    I am having a problem when calling a stored procedure. I have designed the stored procedure to accept "Null" values. Condition 1 Configuation as ColumnA with a value of 1, a query is successfully returned with the expected data set <cfprocparam cfsqltype="CF_SQL_INTEGER" value="1" type="In"...

Part and Inventory Search

Back
Top