SQL & PL/SQL

SQL and PL/SQL related topics.

oracle oci.dll error

i am getting oracle oci.dll could not be loaded only on 64bit
pl give me solution for this

thanks
ramkumar sharma

sql

insert into flag_cust
(CID,
LAST_NAME,
FIRST_NAME,
M_INIT,
ADD1,
ADD2,
CITY,
STATE,
ZIP,
DOB,
SEX,
ACCT_STATUS,
HH_INCOME,
FICA_SCORE,
NEW_IND,
SURROGATE_CID)
SELECT
MK.*
,CASE WHEN MK.new_IND = 'n'
THEN DW_SEQ.NEXTVAL
Else null
END as surrogate_cid
FROM
(SELECT
c.CID,
LAST_NAME,
FIRST_NAME,
M_INIT,
ADD1,
ADD2,
CITY,
STATE,
ZIP,
DOB,
SEX,
ACCT_STATUS,
HH_INCOME,
FICA_SCORE,
case when C.cid is null
THEN 'y' else 'n'

Update statement to change SSN(Social Security Number) no in PeopleSoft:

Hi Folks,

Can anybody help me what will be the update statement for SSN no format change.I am giving you the example in below:
Existing SSN in PeopleSoft--- 830-75-6027.

SSN should be updated to 000-75-6027.

kindly help me to write the update statement on it.
Table name: PS_PERS_NID

Thanks in advance.

How to insert values into table based on condition from another table

Hi,

Can anyone help me in inserting a value into table based on values from another table.

for Example
____________________________________________________________

i want to insert value "a" if value a particular value in the other table is "c" and i want to insert value "b" if value in the others table is "d"

i hope i am not making it too complex

Thanks in advance!!!

Querying long char filed

Hi,

I need to query the PSSQLTEXT defn record by having the condition SQLTEXT like '%recname%';

how to accomplish this in Oracle. In DB2 i did it many times but in oracle this is not running.

Thanks,
Hari.A

Update Error - Single-row subquery returns more than 1 row

I'm working on an update. I am first getting the current data (NOW) and then comparing it to a saved file (LAST). I need to update this file which is called ps_uni_textbk_skew with the values from the NOW table for several fields for the keys that match the NOW table to the ps_uni_textbk_skew table. There are 5 keys (SUBJECT, CATALOG_NBR, CLASS_SECTION, STRM, SSR_TXBDTL_SEQNO) . This query works great if you remove the update stuff. I get 2 rows. But once I started adding the update around the query, it doesn't work anymore.

SQL Question on Full Outer Join

Hi, I am writing a sql select statement. First, I need to get all courses and if they have textbooks, include the textbooks. (this is my new data extract). That's the first select and it works great. Then I need to take this file and do a full outer join with another file. (this is my previous old data extract, it does contain some extra fields, so not the exact same table layout). I should get a mixture of some records are only in the first select, others in both files and some only in the file I'm joining with.

Compare too rows and insert the changes into new record in Oracle10g

Hi All, Please help me in writing a query to compare two rows of a table and insert the changes(i.e., changed columns) into another table.

How to apply patches and update Oracle 10g database

Kindly tell me step by step how to apply new patches in oracle 10g database

Help me with this SQL

Hi I have a table called EMPDET with Emplid and Deptid as keys and values are as shown below.

Emplid Deptid Desc
1 A TEST
2 A TEST
3 A ABC
4 A TEST
5 B XYZ
6 B XYZ
7 B xyz
8 C TEST2
9 C STH
10 C TEST2
11 D STG
12 D STG
13 D STG

I need to write a query which will fetch below results. It should pick only dupilcate combination

Expected results:

A TEST
A ABC
C STH
C TEST2

Thanks,
Kris