Bill,

 

As usual, the obscure SQL question are answered by you. This worked great.

 

Thanks,

Paul

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of Bill Downall
Sent: August 03, 2017 1:27 PM
To: [email protected]
Subject: Re: [RBASE-L] - Problem with a Select Distinct Statement

 

Hi, Paul,

 

In R:BASE, you can use the #3 notation to select the column that is physically 
the third column in a table. Does that work with an SATTACHED table, too?

 

SELECT #7, #3 FROM dbo.SALES_REP

 

Bill

 

On Thu, Aug 3, 2017 at 1:22 PM, Paul C. Buckley <[email protected] 
<mailto:[email protected]> > wrote:

Albert,

 

I don’t see a way to alias the database. The SCONNECT automatically puts the 
dbo. in front of the table names.

 

Thanks,

Paul

 

From: [email protected] <mailto:[email protected]>  
[mailto:[email protected] <mailto:[email protected]> ] On Behalf 
Of Albert Berry
Sent: August 03, 2017 12:02 PM
To: [email protected] <mailto:[email protected]> 
Subject: Re: [RBASE-L] - Problem with a Select Distinct Statement

 

Can you alias the SQL database to eliminate the ‘.’ from the name, perhaps?

Albert 

On Aug 3, 2017, at 9:55 AM, Paul C. Buckley <[email protected] 
<mailto:[email protected]> > wrote:

 

Buddy,

 

That didn’t work either, I still get the “Database dbo not connected” error.

 

Paul 

 

From:  <mailto:[email protected]> [email protected] [ 
<mailto:[email protected]> mailto:[email protected]] On Behalf Of 
Buddy Walker
Sent: August 03, 2017 11:05 AM
To:  <mailto:[email protected]> [email protected]
Subject: RE: [RBASE-L] - Problem with a Select Distinct Statement

 

Paul

  Since there is a dot in the column name try using the IDQUOTES around the 
column name

 

Buddy

 

 

From:  <mailto:[email protected]> [email protected] [ 
<mailto:[email protected]> mailto:[email protected]] On Behalf Of 
Paul C. Buckley
Sent: Thursday, August 3, 2017 10:41 AM
To:  <mailto:[email protected]> [email protected]
Subject: [RBASE-L] - Problem with a Select Distinct Statement

 

Good morning,

 

I'm running the latest build of R:BASE X Enterprise. I have a connection to a 
SQL database & about 6 or 8 SQL tables attached. I'm trying to create a SQL 
Select Distinct statement and can't get the syntax correct. Here's what I've 
tried:

 

SELECT DISTINCT dbo.sales_rep.id <http://dbo.sales_rep.id>  AS rep_id, 
sales_rep.NAME-ALIAS from dbo.SALES_REP

 

Error is:

 

<image001.png>

 

 

SELECT DISTINCT sales_rep.id <http://sales_rep.id>  AS rep_id from dbo.SALES_REP

 

Error is:

 

<image002.png>

 

But this works without error: SELECT * from dbo.SALES_REP

 

Any blues clues?

 

Thanks,

Paul Buckley

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

 

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

 

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
For more options, visit https://groups.google.com/d/optout.

 

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected] 
<mailto:[email protected]> .
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to