Recent IT Questions

1 - 14 of 14
<<PREVIOUS 1 NEXT>>

ms sql query problem with a case statement

[strong]This code works: SELECT     passengers.*, passship.passship_name AS name, passship.passship_speed AS speed, passship.passship_size AS cargo, hyperjump.hops AS hops, ROUND((passengers.pass_engers * passengers.pass_price) / (hyperjump.hops * passship.passship_speed), 0) AS ptprofit...

View Answer   |  Oct 10 2009  3:02 AM GMT
MSSQL, SQL, CASE statement
asked by Rinkratt

  20 pts.

Making two records into one

I was not sure on how to word the title of my questions, so it is better if I simply give you my query and result: SELECT DISTINCT PJ.EMPL_NUM, (CASE WHEN PAY_TYPE = 1 THEN RATE ELSE 0 END) AS REG_RATE, (CASE WHEN PAY_TYPE = 3 THEN RATE ELSE 0 END) AS OVR_RATE FROM...

View Answer   |  May 22 2009  7:16 PM GMT
CASE statement, SQL Records
asked by Fscopel

  15 pts.

empty fields in a query

I have a column with answers that people responded to different questions about themseleves. I have another column with the question id that the answer corresponds to. i want to display the answers in separate columns based on which question it corresponds to. Each column should be filled with the...

View Answer   |  May 5 2009  4:20 PM GMT
CASE statement, NULL, SQL Query
asked by Bananahead

  60 pts.

Oracle SQL question

I want to create a SQL script in Oracle that will run one of two possible SQL scripts based on what the user enters in the Parameter request. Since I'm unable to use IIF and If Then like I can in SQL Server, is there another way to do this? I have tried using case statements but Oracle doesn't...

View Answer   |  Apr 13 2009  2:39 AM GMT
Oracle developers, Oracle SQL, Oracle development
asked by Wanderer9577

  5 pts.

Nested Case statement in Oracle BI

I am trying to create a nested case statement in Oracle BI (9.0.4) the statement works when I do it in Oracle SQL*Plus but will not let me keep the whole script in the Calculation.What do I need to doo to have this work in Oracle BI? The statement is as follows: select emp_name, (CASE WHEN...

asked by Nanapap

  5 pts.

Switch/Case statment in access

how i can use Switch/Case Satatment in Mic. Access 2003, am working on database as follow: Field Name: Directions in this field i need to write codes like: TAm Field Name: Translation here i need to read TAm as T=Take, Am= Morning. the problem i have more than 200 codes, which they have to be...

View Answer   |  Aug 20 2008  11:10 AM GMT
Microsoft Access, Database programming, CASE statement
asked by Darkblue46

  15 pts.

How Do I assign a value if a value in the field is empty

In my script (that is not working yet) I want to make sure if "full_value" (a field) is empty in a particular record then the value zero will be inserted. This is working in Access, but I'm trying to rebuild the query in SQL. Thank you. SELECT DISTINCT oas_balance.cmpcode, oas_balance.el1,...

View Answer   |  Aug 13 2008  0:31 AM GMT
SQL, CASE statement, SQL Query
asked by Ilfoprog

  30 pts.

I want to return multiple value in the THEN clause of CASE statement

I want to return multiple value in the THEN clause of CASE statement. SELECT c.company_code, c.com_inactive_flag, e.emp_no FROM company c, employees e WHERE c.com_code = e.com_code AND e.emp_status in ( (CASE c.com_inactive_flag WHEN 'N' THEN 'A' WHEN 'Y' THEN 'B,C' END) If the flag is N all...

View Answer   |  Aug 10 2008  4:08 AM GMT
SQL, CASE statement
asked by Balcode

  5 pts.

Which Is More Optimized

Which Conditional Statemnt Is More Efficient in VB.NET 2005 IF ELSE OR Switch Case ?

View Answer   |  Aug 6 2008  11:30 AM GMT
VB.NET, CASE statement, Visual Basic 2005
asked by AnjanaDurga

  70 pts.

CASE sintaxis error in SELECT

In the middle of a large storage procedure I have a working SELECT 01 (see below) which at a couple of points uses CASE statement. I need to expand the most inner CASE to get SQL Server check for several values instead of one. Currently CASE I am talking about looks like (it is in the middle of...

View Answer   |  Jul 18 2008  7:46 PM GMT
T-SQL, SQL Server 2005, CASE statement
asked by Jzurbo77

  5 pts.

Order by using case statement SRS 2000

I am using a case statement to order data on a SRS report, when the statement is ran, it returns the correct order, but when I save the RDL and preview it, it returns to ascending order. How do I correct this?

View Answer   |  Jun 11 2008  6:38 PM GMT
CASE statement, SQL Server Reporting Services, SRS 2000
asked by Wi sundevil

  5 pts.

Using Case Statement Inside SQL Join

Hi, I am trying to convert dynamic sql into static sql due to permission issue, I faced a challange when i am trying to convert this part of code given below -- join to ADDR_DETAIL SET @join_sql = 'inner join ADDR_DETAIL on ADDR_DETAIL.GRP_CONTACT_ID = pm.GRP_CONTACT_ID AND ' IF...

View Answer   |  Mar 13 2008  11:08 AM GMT
SQL, T-SQL, JOIN statement
asked by Bmdayal

  5 pts.

ms sql case statement

I have written a case statement in MS SQL that is returning a single phone number for a single id. This is valid as the database contains multiple phone numbers attached to the same id number, with differentiation based on phone type. Once I have found the prefered phone number, I do not want to...

View Answer   |  Mar 6 2008  7:08 PM GMT
SQL, CASE statement
asked by Espqueen

  5 pts.

How to use subselect in a case statement

Getting error... "Token EXISTS was not valid...." on case statement... ,case when g.GFGSTS = '2' and not exists (select a.GFTSEQ from GFTP010 a where a.GFCSQ# = g.GFCSQ# and a.GFGSTS = '3' ) then count(*) end as Void#

View Answer   |  Jan 17 2008  3:11 PM GMT
SQL, SQL Subselect, CASE statement
asked by Qpgmr

  5 pts.

1 - 14 of 14
<<PREVIOUS 1 NEXT>>