Article View: bit.databases.mssql-l
Article #159Re: use string to create cursor
From: Michel Walsh
Date: Fri, 09 Mar 2001 12:22
Date: Fri, 09 Mar 2001 12:22
34 lines
2497 bytes
2497 bytes
Hi,
What is the context? T_SQL or VBA? Please, try to limit your crosspost to
the relevant newsgroups, an answer in VBA won't help you if you intend to
use T_SQL, isn't it?
So, from modulesDAOvba, I assume you MAY want a DAO based solution:
Dim rst As DAO.Recordset
Dim db As Database
Set Db=CurrentDb
Set rst=Db.OpenRecordset("SELECT * FROM test WHERE id IN(" & strlist
& ");" )
Hoping ... it may help,
Vanderghast, Access MVP
"Oliver Davitt" <davitto@eircom.net> wrote in message
news:unkp6.7883$r4.7437@news.indigo.ie...
> is it possible to use a string to create a cursor in p-sql, e.g. set
strSQL
> = "select * from tbltest wher id in (" +strlist + ")"
> declare crstest cursor as strSQL.
>
> Any help would be much appreciated
>
>
>
>
Technical Details
Message-ID:
<OcVsoOJqAHA.488@tkmsftngp05>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!EU.net!blackbush.xlink.net!netnews.web.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!tkmsftngp01!tkmsftngp05References:
<unkp6.7883$r4.7437@news.indigo.ie>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f589c,9700485597e1bb5e X-Google-Attributes: gidf589c,public X-Google-Thread: 12fc46,9700485597e1bb5e X-Google-Attributes: gid12fc46,public X-Google-Thread: 1083b9,9700485597e1bb5e X-Google-Attributes: gid1083b9,public X-Google-Thread: f6611,9700485597e1bb5e X-Google-Attributes: gidf6611,public X-Google-Thread: 11453f,9700485597e1bb5e X-Google-Attributes: gid11453f,public X-Google-Thread: 104de1,9700485597e1bb5e X-Google-Attributes: gid104de1,public X-Google-Thread: f58a3,9700485597e1bb5e X-Google-Attributes: gidf58a3,public X-Google-Thread: 1131f0,9700485597e1bb5e X-Google-Attributes: gid1131f0,public X-Google-ArrivalTime: 2001-03-09 04:25:06 PST From: "Michel Walsh" <Vanderghast@msn.com> References: <unkp6.7883$r4.7437@news.indigo.ie> Subject: Re: use string to create cursor Date: Fri, 9 Mar 2001 07:22:39 -0500 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <OcVsoOJqAHA.488@tkmsftngp05> Newsgroups: bit.databases.mssql-l,comp.databases.ms-sqlserver,microsoft.beta.sqlserver7.OLAPAddins,microsoft.private.directaccess.sqlserver,microsoft.private.sqlserver7.olap,microsoft.private.SQLServer7.Server,microsoft.public.access.modulesdaovba,microsoft.pu NNTP-Posting-Host: mon-pq68-130.netcom.ca 216.123.142.66 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!EU.net!blackbush.xlink.net!netnews.web.de!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!tkmsftngp01!tkmsftngp05