hi,
The Query to Create View is:
CREATE VIEW PROJECT_vw AS \
SELECT \
PROJNO \
,PROJNAME \
,DEPTNO \
,RESPEMP \
,PRSTAFF \
,CHAR(SUBSTR(mo nthname(PRSTDAT E),1,3))||'
'||RTRIM(CHAR(d ay(PRSTDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PRSTD ATE))))
\
,CHAR(SUBSTR(mo nthname(PRENDAT E),1,3))||'
'||RTRIM(CHAR(d ay(PRENDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PREND ATE))))
\
,MAJPROJ \
FROM PROJECT
But it gives the following error:
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0153N The statement does not include a required column list.
SQLSTATE=42908
What is wrong with the query? May be its giving problem with the
concatenation part but i want the data into the views to be like that
only. What is the correct query to do this?
Help will be appreciated
TIA 4 14174
Following columns have no name.
,CHAR(SUBSTR(mo nthname(PRSTDAT E),1,3))||'
'||RTRIM(CHAR(d ay(PRSTDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PRSTD ATE))))
\
,CHAR(SUBSTR(mo nthname(PRENDAT E),1,3))||'
'||RTRIM(CHAR(d ay(PRENDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PREND ATE))))
\
Add column list.
CREATE VIEW PROJECT_vw(PROJ NO, PROJNAME, DEPTNO, RESPEMP,
PRSTAFF,PRSTDAT E, RENDATE) AS \
Sorry, I forgot MAJPROJ.
CREATE VIEW PROJECT_vw(PROJ NO, PROJNAME, DEPTNO, RESPEMP,
PRSTAFF,PRSTDAT E, RENDATE, MAJPROJ) AS \
It worked. Thanx for the reply.
Tonkuma wrote: Following columns have no name. ,CHAR(SUBSTR(mo nthname(PRSTDAT E),1,3))||' '||RTRIM(CHAR(d ay(PRSTDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PRSTD ATE)))) \ ,CHAR(SUBSTR(mo nthname(PRENDAT E),1,3))||' '||RTRIM(CHAR(d ay(PRENDATE)))| |' '||LTRIM(RTRIM( CHAR(year(PREND ATE)))) \
Add column list. CREATE VIEW PROJECT_vw(PROJ NO, PROJNAME, DEPTNO, RESPEMP, PRSTAFF,PRSTDAT E, RENDATE) AS \
Or give the columns an explicit name in the select list:
SELECT col1, col2, col3 + col4 AS myName
FROM ...
--
Knut Stolze
DB2 Information Integration Development
IBM Germany This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lyle Fairfield |
last post by:
I have a table: Schools,
and another table: Teachers
as one teacher may be assigned to more than one school I link these with a
third table: SchoolTeachers
I index (unique) this linking table on SchoolID and TeacherID to prevent
assigning a teacher to a school more than once.
So far, so good.
|
by: Edward Diener |
last post by:
In C++ an overridden virtual function in a derived class must have the exact
same signature of the function which is overridden in the base class, except
for the return type which may return a pointer or reference to a derived
type of the base class's return type.
In .NET the overridden virtual function is similar, but an actual parameter
of the function can be a derived reference from the base class's reference
also.
This dichotomy...
|
by: Robin Bonin |
last post by:
In my user contol I am creating a set of dropdownlists.
Each list is created based on input from the other lists.
The problem I am having is setting the selected index on
the lists.
If someone changes box1, I want to set the selected index in
box2 = 0. When I do this, I dont get an error, but when the
page loads, it still has the selected value and not 0.
It seems that it is getting the selected value from the viewstate
|
by: Paul Say |
last post by:
Problem:
I have a custom class called Job and a custom collection called
JobsCollection.
I currently display the collection on a web page via a datagrid, and I have
a dropdown list that allows the user to select several diferent views. This
works fine.
My plan is to next allow the user to define views of thier own. I have found
several articles on creating a dynamic datagrid and this is the approach I
|
by: Medora Schauer |
last post by:
I've installed 7.4.2 on a PowerPC system running linux 2.4.13. When I
try to run initdb to create to create the database cluster I get the
following:
$ initdb -D $PGDATA
The files belonging to this database system will be owned by user
"thebox".
| |
by: tech tech |
last post by:
Hello All,
I installed postgresql 7.3.4 on HPUX PA in /usr/local/pgsql and put the libraries in
/usr/local/pgsql/lib/LIB_new. During the initialization( initdb), it loads libraries (language) from
/usr/local/pgsql/lib. In postgresql version 7.3.1, libraries are not loaded and no such problem during initdb.
I had the following problem:
$ initdb -D /var/pgsql
The files belonging to this database system will be owned by user "postgres".
|
by: Dominique |
last post by:
In order to become more familiar with the Model-View-Controller pattern, I
have written a demo where each View is a plugin and the plugins are loaded at
startup from the plugins directory. When the View's are loaded they add
themselves to the DataModel View list...
FDataModel.AddView(this);
Where AddView looks like this...
public void AddView( MvcView view )
{
|
by: Al Norman |
last post by:
We have two separate DLLs that do not interact (directly, at least). One is
an MFC extension DLL that was built back in VC++ 6 days (but has been
recompiled with VS2005). The other is a DLL that contains .Net functions
wrapped in C++ (as described by Paul DiLascia -- see
http://msdn.microsoft.com/msdnmag/issues/06/06/CAtWork/default.aspx). Both
DLLs specify 'Use MFC in a shared DLL'.
Since we have an old VC 6 application (large) that we...
|
by: radio1 |
last post by:
Configuration: Access 2002 and SQL Server 2000 using a .ADP Project.
I would VERY MUCH appreciate anyone's input into this problem I'm having.
I have a form in Access that does not permit the user to add/change/delete any data, apparently as a result of adding a GROUP BY clause to a View used indirectly as the form's Record Source.
I really don't believe that this restriction needs to be there, and I'm hoping that someone can suggest...
|
by: Ana RM |
last post by:
Mark.Powell@eds.com (Mark D Powell) wrote in message news:<2687bb95.0308010642.1fc4ff1f@posting.google.com>...
Hi Mark,
Thanks por answer me. I do not think it is important thw warehouse
knowledge to solve my problem because at the end all the tables are
relational.
The point is that I do not want make changes in the database, I want
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |