|
-
Feb 9th, 2000, 11:14 PM
#1
Thread Starter
Lively Member
Hi, people,
I have a SQL statment as record source of a DATA Control. I'm trying to insert a space between 2 fields, using this SQL:
If I use:
SELECT GroupID, GroupCode & GroupDescri AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
it works,
but if I use
SELECT GroupID, GroupCode & " " & GroupDescri AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
it returns a error messages (too few parameters, expect 1)
I've already tried to use str(GroupCode), cause GroupCode is a numeric field:
SELECT GroupID, str(GroupCode) & " " & GroupDescri AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
Same error
If I use:
SELECT GroupID, GroupCode & " " & 'GroupDescri' AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
same error.
What I am doing wrong?
Thanks in advance,
Roselene
-
Feb 10th, 2000, 01:39 AM
#2
Lively Member
It will depend on the type of database you are connecting to but if I was doing it for oracle the statement would read,
select SELECT GroupID, (GroupCode | | " "" | |GroupDescri) AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
It is important to put the parentheses around the expression.
Hope this helps
Chris
-
Feb 10th, 2000, 09:02 PM
#3
Lively Member
Hi,
try
Code:
SELECT GroupID, GroupCode & ' ' & GroupDescri AS Expr1
FROM Grupos
ORDER BY GroupCode WITH OWNERACCESS OPTION;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|