SunQuest
           DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old September 1st, 2006, 02:59 AM
karun Reddy karun Reddy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 1 karun Reddy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 54 sec
Reputation Power: 0
How to insert NULL into a Dummy Column

I want to insert NULL to a dummy column ,

ex: table A contains Columns C1 , C2 . i want to get 3 columns (2 existing columns + 1 new column - C3) , in which all the fields in C3 should be NULL . I have written query as

SELECT C1,C2, NULL C3 FROM TABLE A ; The same query is executing in Oracle and inserting NULL in C3 , but it is not working in DB2 . Could you please tell me the solution

Reply With Quote
  #2  
Old September 1st, 2006, 04:24 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 1,762 swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level)swampBoogie User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 4 h 29 m 45 sec
Reputation Power: 37
What data type should the C3 column have? E.g.

Code:
select c1,c2, cast(null as char(10)) as c3
  from a

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > How to insert NULL into a Dummy Column


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 3 hosted by Hostway