Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 20th, 2005, 10:06 AM
BaronVonDoppleG BaronVonDoppleG is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 116 BaronVonDoppleG User rank is Corporal (100 - 500 Reputation Level)BaronVonDoppleG User rank is Corporal (100 - 500 Reputation Level)BaronVonDoppleG User rank is Corporal (100 - 500 Reputation Level)BaronVonDoppleG User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 22 h 20 m 4 sec
Reputation Power: 7
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
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #2  
Old April 20th, 2005, 11:01 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,907 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 9 h 21 m 6 sec
Reputation Power: 279
Code:
INSERT INTO user (login_name, login_password) 
VALUES ('testLogin',cast('password' as raw(20)))

this should do the trick
Comments on this post
Gran Roguismo agrees!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > converting a varchar2 to raw before insert


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT