Table1- have two column
filename data
AFGDFD-20112011 hi how r u
bsdasd-23042011 name shoud be in bold
Now i want output like
filename data
AFGDFD hi how r u
bsdasd name shoud be in bold

Kindly answer this

Answers were Sorted based on User's Feedback



Table1- have two column filename data AFGDFD-20112011 hi how r u bsdasd-23042011 ..

Answer / david

select substr(filename,1,6),data from table1;



tjis is ur solution ..if any confusion regards this question
plz post there...


thanks
gunjan david

Is This Answer Correct ?    3 Yes 0 No

Table1- have two column filename data AFGDFD-20112011 hi how r u bsdasd-23042011 ..

Answer / ajit nayak

select substr(filename,1,instr(filename,'-',1,1) - 1) from dual;

Is This Answer Correct ?    0 Yes 0 No

Table1- have two column filename data AFGDFD-20112011 hi how r u bsdasd-23042011 ..

Answer / mohamed shafee

select left(filename,6),data from table1
or
select convert(varchar(6),filename),data from table1

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Oracle General Interview Questions

If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?

0 Answers  


What is partitioned table in Oracle?

0 Answers   MCN Solutions,


How to retrieve data from an explicit cursor?

0 Answers  


How to view existing locks on the database?

0 Answers  


What is the difference between truncate & delete command?

0 Answers  






What is a OUTER JOIN?

1 Answers  


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

0 Answers   TCS,


how the indexes are stored in the Oracle Database?

0 Answers  


which statement is running fastly ie insert or delete?

13 Answers   Oracle,


What are the differences between char and nchar in oracle?

0 Answers  


Hi, I want table structure shown below. How can i create this ? Num Name Address Addr1 Addr2 I want Addr1 and Addr2 under Address column. How can i achive this ? Is it possible ?

2 Answers   IBM,


What is the max number of columns in an oracle table?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)