Home » SQL & PL/SQL » SQL & PL/SQL » Re:- how to check column value in particular format (windows7)
Re:- how to check column value in particular format [message #630186] Mon, 22 December 2014 06:22 Go to next message
ajamitjain129@gmail.com
Messages: 36
Registered: July 2014
Location: bangalore
Member
hi,

I want to check a column value should be come in this format (X1 Y1, X2 Y2, X3 Y3...). If value is not in the given format then it should be raise an error message.

how can i do this?

Please suggest me.

for example:-

a varchar2(20);

a := '12 12 , 12 12' then it successfully execute but if value is '1 , 12 12' then it should fire the error message.


[Updated on: Mon, 22 December 2014 06:25]

Report message to a moderator

Re:- how to check column value in particular format [message #630188 is a reply to message #630186] Mon, 22 December 2014 08:01 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Only an amateur or a fool stores more than 1 value in a single column.

I choose to not contribute to this ill advised endeavor.

NORMALIZE the data to Third Normal Form
Re:- how to check column value in particular format [message #630189 is a reply to message #630186] Mon, 22 December 2014 08:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I can't help as I am blocked waiting for you to answer my questions in your previous topic:

Michel Cadot wrote on Mon, 21 July 2014 15:24

Which one do you finally choose?
Do you understand it (them)? Did you learn something from this problem and the solutions?


Re:- how to check column value in particular format [message #630210 is a reply to message #630189] Tue, 23 December 2014 02:46 Go to previous messageGo to next message
ajamitjain129@gmail.com
Messages: 36
Registered: July 2014
Location: bangalore
Member
hi,

This is my final query.

select stationarytime, level-1 cons_stop_no
from jain18
connect by prior crew_cd = crew_cd - 1 and stationarytime != '0'
start with stationarytime = '0'
order by to_number(crew_cd) asc

really i learn a lot of thing from this tutorial.
Re:- how to check column value in particular format [message #630211 is a reply to message #630188] Tue, 23 December 2014 02:50 Go to previous message
ajamitjain129@gmail.com
Messages: 36
Registered: July 2014
Location: bangalore
Member
hi BlackSwan,

i am ETL Developer. i have to check value come from source db to destination db is correct or not?
so i am not fool.
if u don't have answer then don't post any thing.

Thanks,
Amit Jain
Previous Topic: Procedure to traverse the table based on fk constraints
Next Topic: Dynamic PL/SQL which reads table and transposes rows to columns
Goto Forum:
  


Current Time: Tue Apr 23 23:24:49 CDT 2024