• SQL select

    SELECT obj.object_type FROM apps.opt_log_issue log, discov.opt_changed_database_objects obj WHERE --(UPPER(log.resolution(+)) like '%'||obj.object_name||'%' -- and trunc(log.resolution_date(+)) - trunc(to_date(substr(obj.last_ddl_time,1,11),'dd-mon-yy')) <=5 -- and trunc(log.resolution_date(+))...

    QAQA65 pointsBadges:
  • How do I use the results of count(*)=0

    I am using SQL to code a select statement. If the result of the statement = count(*)=0, I want to put a message out on a report.

    Sherryborden85 pointsBadges:
  • Outputting results of SQL SELECT statements into a spreadsheet

    I am using OPENROWSET to output the result of a number of SQL SELECT statements into a spreadsheet. It works for most of the SELECT statements, but there are 4 random queries out of 82 that take more than an hour to execute. This is the code: insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel...

    SQL Server Ask the Experts2,585 pointsBadges:
  • Crystal Record selection

    I need to eliminate duplicate records by comparing two fields, if the data is the same, I only want it to appear once. "Select Distinct" report option compares the complete record. Please help

    Srustemeyer5 pointsBadges:
  • SQL Subfile and position to ability

    I have a subfile that can be sorted by any of 4 fields, so I want to use imbedded SQL to read the data out of my PF in order to populate the subfile. I want to be able to allow the user to enter position to information, and position to that entry - normally, I would do a SETLL to the file based on...

    Klw50 pointsBadges:
  • join tables with nested select count and group by

    hi i am having three tables : state, agencydetail, parentdetaills i am running following queries but i am getting wrong result plz help me out where is the problem select state.state,count(ag.agencycode) as registag,count(ff.agencycode) as reportag,count(inp.regno) as incpwait,count(interp.regno)...

    Bijendersverma5 pointsBadges:
  • 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...

    Jzurbo775 pointsBadges:
  • SQL: Using a column created in the SELECT in the WHERE CLAUSE

    Can I use a column in the WHERE clause that I created with 'AS' in the WHERE clause. I have tried and SQL tells me that the column is not in the table? Thanks, Ray

    RayT30 pointsBadges:
  • Optimizing Query

    Hi, I am having a table which is having around 170 Columns(Don't blame me but my Developer) and there are only 989 records in the table.I created all sorts of Indexes but still the query (Select * from Table) takes almost 2 mins to display 989 records.I need all the columns to be displayed.Is there...

    Sachin VCO15 pointsBadges:
  • update a field from a file with a field from a selection from two files

    Hi! When I try this: update fileD d set d.value = (select c.value from (select b.key, b.value from fileB b where b.key not in (select a.key from fileA a)) c where d.key = c.key) I get the message "Null values not allowed in column or variable VALUE." on the other hand, when I do this selection:...

    Mr.70 pointsBadges:
  • Using SELECT statements

    Can we get the number of saturdays in any month using a SELECT statement(i.e without creating a table or function)? If so, can you give me the logic?

    OracleATE190 pointsBadges:
  • Showing all records

    DATA SET: Table1 XID YID WRKDATE --- --- ------- 1 NOR 2007-01 2 SOU 2007-03 Table2 XID ZID QTY --- --- --- 1 PEN 10 1 PAP 20 2 PAP 5 1 PEN 10 2 PAP 5 Result XID YID WRKDATE ZID QTY --- --- ------- --- --- 1 NOR 2007-01 PAP 20 1 NOR 2007-01 PEN 10 1 NOR 2007-01 PEN 10 2 SOU 2007-03 PAP 5 2 SOU...

    TeamJR315 pointsBadges:
  • oracle quires

    while executing the following qurie 'inser into custmaster select * from tnjcust where seccode='431';' answer is not enough valus

    Balachander k0 pointsBadges:
  • Select from table where data row missing

    I have a table with the main fields being BU, ASSET, BOOK for any BU and ASSET combination, there should be two to four rows of data, with just the BOOK value being different. Data corruption has caused us to find all BU-ASSET combinations missing the value 'AMT' for BOOK. I need to join the table...

    Jej12160 pointsBadges:
  • Nested Selects in CLLE

    I am attempting to palce Nested Select Statements within a CLLE program and it will not accept the process. ie: SELECT wHEN a=B THEN(DO) PROCESS.... ENDDO WHEN C=D THEN(DO) PROCESS eNDDO WHEN (X=Y) tHEN(DO) select wHEN X1 = A tHEN(dO) PROCESS eNDDO wHEN X1 = b THEN(DO) PROCESS eNDDO eNDselect wHEN...

    wmfsr20 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following