473,385 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Select queries with columns populated with Null

3
Hi,

I am trying to combine two sets of different databases, however, one of my databases does not have a particular field that the other one has, so I would like to input all the data in that field for that database as a null. I am having trouble trying to build that. As you can see OMORCT exists as a field on the AU table but does not exist in the SG table. How can I script this if I want all the fields under OMORCT in the AU table to be blank or null?

SELECT sal.OMAS400, sal.OMPERI, sal.OMCOMP, sal.OMOREF
FROM dbSC.dbo.tbl_SG AS sal

UNION ALL

SELECT sal.OMAS400, sal.OMPERI, sal.OMCOMP, sal.OMOREF, sal.OMORCT
FROM dbSC.dbo.tbl_AU AS sal


Thanks very much in advance for your expertise and any advice on this!!
Dec 31 '10 #1

✓ answered by Rabbit

Null As OMORCT

3 1443
Rabbit
12,516 Expert Mod 8TB
Null As OMORCT
Dec 31 '10 #2
Yu Ong
3
Hi Rabbit Thanks a lot! Worked like magic! Really appreciate the expertise and help. Happy new year in advance.
Dec 31 '10 #3
Rabbit
12,516 Expert Mod 8TB
No problem and good luck with everything else. Happy New Year!
Dec 31 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tinku | last post by:
Hi All We are migrating one of our application from Informix to Oracle. Now one of our tables contains a column named "MODE" which is a reserved word. I could create the table with this name...
9
by: Martin | last post by:
Hi there, I've been looking far and wide on this one. I'm looking for a way to select from columns where the columns have a certain pattern! Example: Instead of doing: SELECT q1, q2,...
4
by: Paul | last post by:
I have run into a strange problem with a site I am working on. My SELECT queries work fine, but I just tried to add an UPDATE statement and it fails. A test showed that INSERT fails also. I created...
9
by: mfyahya | last post by:
Hi, I'm new to databases :) I need help speeding up select queries on my data which are currently taking 4-5 seconds. I set up a single large table of coordinates data with an index on the fields...
14
by: Martin Lacoste | last post by:
Access 2000 Trying even the most basic queries - select queries joining (inner join) two tables - and the results are not updatable, and I can't tell why they aren't. All permissions are on,...
5
by: Allan M. | last post by:
I have a series of select boxes that must be populated client side, because they interact with each other. The design specification calls for these boxes to be updated without having to make a...
5
by: John | last post by:
I just cannot manage to perform a SELECT query with NULL parameter... My CATEGORY table does have one row where TCATEGORYPARENTID is null (real DB null value). TCATEGORYID and TCATEGORYPARENTID...
2
omerbutt
by: omerbutt | last post by:
hi there i have to select 7 columns from table1, 1 column from table2, and 1 column from tables3 and show the result but i am not getting it right the main thing that i am trying to achieve is that i...
11
by: pattyd | last post by:
I have multiple queries that will run on my onopen event of my report. I use the docmd.openquery for the select queries the problem is I can see all these popup in the background. I do use the close...
3
by: acoppini | last post by:
I need help! I think that my problem is one of syntax using strings. Specifically I have defined a string field called issuername that I am later trying to use as an input into select queries. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.