dbTalk Databases Forums  

SSELECT Statement

comp.databases.pick comp.databases.pick


Discuss SSELECT Statement in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
the Moderator
 
Posts: n/a

Default SSELECT Statement - 03-02-2007 , 01:19 PM






I am trying to identify the number of records with a common file
variable.with the SSELECT statement. I can't seem to select with a
variable. My code looks like this.

*****
STMT = 'SSELECT EPCACT WITH SEQ = FILE.NUM'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
I can get it to select if I don't use enter the data
******
STMT = 'SSELECT EPCACT WITH SEQ = "01234"'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
What am I doing wrong?



Reply With Quote
  #2  
Old   
frosty
 
Posts: n/a

Default Re: SSELECT Statement - 03-02-2007 , 01:34 PM






STMT = 'SSELECT EPCACT WITH SEQ = "':FILE.NUM:'"'

--
frosty



the Moderator wrote:
Quote:
I am trying to identify the number of records with a common file
variable.with the SSELECT statement. I can't seem to select with a
variable. My code looks like this.

*****
STMT = 'SSELECT EPCACT WITH SEQ = FILE.NUM'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
I can get it to select if I don't use enter the data
******
STMT = 'SSELECT EPCACT WITH SEQ = "01234"'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
What am I doing wrong?



Reply With Quote
  #3  
Old   
Allen Egerton
 
Posts: n/a

Default Re: SSELECT Statement - 03-02-2007 , 02:05 PM



the Moderator wrote:
Quote:
I am trying to identify the number of records with a common file
variable.with the SSELECT statement. I can't seem to select with a
variable. My code looks like this.

*****
STMT = 'SSELECT EPCACT WITH SEQ = FILE.NUM'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
I can get it to select if I don't use enter the data
******
STMT = 'SSELECT EPCACT WITH SEQ = "01234"'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
What am I doing wrong?


Your statement includes the literal FILE.NUM 'cause the entire string is
quoted.

Try:
STMT = "SSELECT EPCACT WITH SEQ = '": FILE.NUM: "'"

--
Allen Egerton
aegerton at pobox dot com


Reply With Quote
  #4  
Old   
the Moderator
 
Posts: n/a

Default Re: SSELECT Statement - 03-02-2007 , 02:34 PM



Thanks, worked great!

Teaching myself Unibasic has been a series of pitfalls.


"frosty" <frostyj (AT) bogus (DOT) tld> wrote

Quote:
STMT = 'SSELECT EPCACT WITH SEQ = "':FILE.NUM:'"'

--
frosty



the Moderator wrote:
I am trying to identify the number of records with a common file
variable.with the SSELECT statement. I can't seem to select with a
variable. My code looks like this.

*****
STMT = 'SSELECT EPCACT WITH SEQ = FILE.NUM'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
I can get it to select if I don't use enter the data
******
STMT = 'SSELECT EPCACT WITH SEQ = "01234"'
EXECUTE STMT CAPTURING JUNK
REC.COUNT = SYSTEM(11)
******
What am I doing wrong?





Reply With Quote
  #5  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: SSELECT Statement - 03-02-2007 , 07:51 PM



"the Moderator" <sparky (AT) no_spam_engineer (DOT) com> wrote:
Quote:
What am I doing wrong?
You're posting to an unmoderated forum with the name "the Moderator",
some people might consider that to be your second error. Can you
please change that? It's bound to spark inquiries from idiots
wondering who the forum moderator is.

Thanks.


Reply With Quote
  #6  
Old   
douglas@pickteam.com
 
Posts: n/a

Default Re: SSELECT Statement - 03-03-2007 , 12:46 AM




Why not just 'COUNT EPCACT WITH SEQ = "':FILE.NUM:'"' ?


Reply With Quote
  #7  
Old   
Joe
 
Posts: n/a

Default Re: SSELECT Statement - 03-03-2007 , 09:09 AM



Tony Gravagno <g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote in
news:fvkhu2d0kbcsova21qvbi7e4rf9efp3kvf (AT) 4ax (DOT) com:

Quote:
"the Moderator" <sparky (AT) no_spam_engineer (DOT) com> wrote:
What am I doing wrong?

You're posting to an unmoderated forum with the name "the Moderator",
some people might consider that to be your second error. Can you
please change that? It's bound to spark inquiries from idiots
wondering who the forum moderator is.

Thanks.
You've got to be kidding me. Care to share the "Acceptable Names For
CDP" list with the group?

Regards,
Joe


Reply With Quote
  #8  
Old   
Allen Egerton
 
Posts: n/a

Default Re: SSELECT Statement - 03-03-2007 , 09:28 AM



Joe wrote:
Quote:
Tony Gravagno <g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote in
news:fvkhu2d0kbcsova21qvbi7e4rf9efp3kvf (AT) 4ax (DOT) com:

"the Moderator" <sparky (AT) no_spam_engineer (DOT) com> wrote:
What am I doing wrong?
You're posting to an unmoderated forum with the name "the Moderator",
some people might consider that to be your second error. Can you
please change that? It's bound to spark inquiries from idiots
wondering who the forum moderator is.

Thanks.

You've got to be kidding me. Care to share the "Acceptable Names For
CDP" list with the group?

Regards,
Joe
The list is too long, but don't worry, "Joe" is okay.

Thanks for checking.

<sfsf>

--
Allen Egerton
aegerton at pobox dot com


Reply With Quote
  #9  
Old   
Joe
 
Posts: n/a

Default Re: SSELECT Statement - 03-03-2007 , 09:52 AM



Allen Egerton <aegerton (AT) pobox (DOT) com> wrote in news:RugGh.937$uo3.428
@newssvr14.news.prodigy.net:

Quote:
Joe wrote:
Tony Gravagno <g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote in
news:fvkhu2d0kbcsova21qvbi7e4rf9efp3kvf (AT) 4ax (DOT) com:

"the Moderator" <sparky (AT) no_spam_engineer (DOT) com> wrote:
What am I doing wrong?
You're posting to an unmoderated forum with the name "the
Moderator",
some people might consider that to be your second error. Can you
please change that? It's bound to spark inquiries from idiots
wondering who the forum moderator is.

Thanks.

You've got to be kidding me. Care to share the "Acceptable Names For
CDP" list with the group?

Regards,
Joe

The list is too long, but don't worry, "Joe" is okay.

Thanks for checking.

sfsf
Such language. And coming from a Pick "Professional" no less.

<sfr>


Reply With Quote
  #10  
Old   
Joe's employer
 
Posts: n/a

Default Re: SSELECT Statement - 03-03-2007 , 05:26 PM



Joe <who's (AT) home (DOT) now> wrote:
Quote:
You've got to be kidding me. Care to share the "Acceptable Names For
CDP" list with the group?
Oh lighten up. That was intended to be humorous for anyone silly
enough to shake their head at it - thanks for playing.

That said, I'm sure some newbies actually do or will look at that and
and say "I didn't know this group had a moderator", and that just
sparks more silly conversations. Let's use pseudonyms or real names,
I don't care, but for cripesake is it wrong to ask someone to not use
a meaningful title as their forum name?

BTW Joe - you're fired!


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.