|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
converting a varchar2 to raw before insert
I want to insert a value into my db (oracle 9i) where the column is RAW. The value that I have is a VARCHAR2 though. How can I covert is within the INSERT statement.
Currently the insert looks like this Code:
INSERT INTO user (login_name, login_password)
VALUES ('testLogin','password')
these are the column values Code:
LOGIN_NAME VARCHAR2(20) LOGIN_PASSWORD RAW(20) thanks |
|
#2
|
||||
|
||||
|
Code:
INSERT INTO user (login_name, login_password)
VALUES ('testLogin',cast('password' as raw(20)))
this should do the trick
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > converting a varchar2 to raw before insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|