Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data shaping SQL Where clause

Status
Not open for further replies.

jefargrafx

Instructor
May 24, 2001
273
US
I new to data shaping and hoping to use it on one of my prject.

I got everything working, but I need to all multiple where statement to the sql. I can add three ANDs, but when I add the fouth the script breaks?

Is there a limit to the number of WHEREs you can use, works fine in straight SQL but breaks in a SHAPE statement.

here's my SQL

let me know

DataShapeSQL = "SHAPE { SELECT * FROM Product WHERE NewRelease Like '2/1/2005' AND Product.[Item #] LIKE 'i%'" & _

"AND Product.[Item #] LIKE 'CDi%'" & _
"AND Product.[Item #] NOT LIKE 'IS%' ORDER BY Product.[Item #] } " & _

"APPEND ({ SELECT * FROM Category } " & _
" RELATE ID TO ID) AS rsCatName_Link"

set rsProduct = Server.CreateObject("ADODB.Recordset")
rsProduct.Open DataShapeSQL, MM_connDataShaper_STRING

jef
 
you need to add in a space to the lines below. you done them for some but not all
 
do you mean

DataShapeSQL = "SHAPE { SELECT * FROM Product WHERE NewRelease Like '2/1/2005' AND Product.[Item #] LIKE 'i%'" & _

" AND Product.[Item #] LIKE 'CDi%'" & _
" AND Product.[Item #] NOT LIKE 'IS%' ORDER BY Product.[Item #] } " & _

" APPEND ({ SELECT * FROM Category } " & _
" RELATE ID TO ID) AS rsCatName_Link"

set rsProduct = Server.CreateObject("ADODB.Recordset")
rsProduct.Open DataShapeSQL, MM_connDataShaper_STRING

jef
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top