Re: MID(,,) equiv in JET SQL using VB6/ADO
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 25 Apr 2007 21:10:01 -0500
"Paul Clement" <UseAdddressAtEndofMessage@xxxxxxxxxxxxxx> wrote in message
news:mj5s239aifkcvu40vi2a94rmd3f53n6c25@xxxxxxxxxx
On Mon, 23 Apr 2007 14:19:36 -0500, "jpm" <uh@xxxxxxxxxxxxxxxxxxxxxxxxxx>wrote:
against a
¤ Hello,
¤
¤ What equivalent of the MID(,,) vba expression can I use in a query
¤ JET database? I'm using VB6 and ADO 2.6.Jet
¤
¤ I think that with DAO I might use this function; I know that with T-SQL
¤ querying I'd use the subString(,,) function.
¤ Both functions are failing to execute when running the query against the
¤ file:mid([InvoiceDate],
¤
¤ >>>"SELECT order_num, Mid([invoicedate], 3, 2) as Month,
¤ >>>1,2) as Yr, cust_Code , soldtoName, ProdLine INTO tmpOrders FROMADtl
¤ >>>INNER JOIN AHd ON Adtl.Lorder = AHd.HOrder WHERE InvoiceDate Betweenattempts to process invalid
¤ >>>'060101' And '060301' And (fg = 'xXX-NC' or fg = 'xXX.NC')"<<<<
¤
¤ Thanks for any input,
The Mid function is supported by Jet SQL, however just as in VBA if Mid
data an error will be generated.function to validate your data
What type of error are you encountering? You may have to use the IIf
before attempting to execute Mid.
Paul, please explain to me what the OP was attempting to do. I think I
missed something? <g>
-ralph
.
- Follow-Ups:
- Re: MID(,,) equiv in JET SQL using VB6/ADO
- From: Paul Clement
- Re: MID(,,) equiv in JET SQL using VB6/ADO
- References:
- MID(,,) equiv in JET SQL using VB6/ADO
- From: jpm
- Re: MID(,,) equiv in JET SQL using VB6/ADO
- From: Paul Clement
- MID(,,) equiv in JET SQL using VB6/ADO
- Prev by Date: Lazy Caching issue
- Next by Date: read data from excel with unknown *** name
- Previous by thread: Re: MID(,,) equiv in JET SQL using VB6/ADO
- Next by thread: Re: MID(,,) equiv in JET SQL using VB6/ADO
- Index(es):