2 Replies - 2291 Views - Last Post: 27 April 2012 - 08:52 AM Rate Topic: -----

#1 AN1554   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 130
  • Joined: 03-April 11

Where to insert WHERE in this SHAPE SQL statement?

Posted 27 April 2012 - 08:15 AM

Where do I insert a WHERE statement in this SHAPE statement? There is a field CustomrID in tblTransaction and I would like to fetch CustomerName from tblCustomer where CustomrID = tblCustomer.CustomerID.

"SHAPE {SELECT * FROM tblTransaction} APPEND ({SELECT * FROM tblProductTransaction} AS Level2 RELATE TransactionID to TransactnID)"

Is This A Good Question/Topic? 0
  • +

Replies To: Where to insert WHERE in this SHAPE SQL statement?

#2 AN1554   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 130
  • Joined: 03-April 11

Re: Where to insert WHERE in this SHAPE SQL statement?

Posted 27 April 2012 - 08:21 AM

I got it. I added it within the first {} as in a normal SQL statement.
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes   User is offline

  • Product Manager
  • member icon

Reputation: 601
  • View blog
  • Posts: 3,072
  • Joined: 19-May 09

Re: Where to insert WHERE in this SHAPE SQL statement?

Posted 27 April 2012 - 08:52 AM

By the way, any SHAPE statement is in no way a "normal" SQL statement. :) I'm generally suspicious of statements ilke "Although you could implement similar functionality through code, this functionality shifts much of the mundane work from the developer to the system", especially when they come from Microsoft. SHAPE command is actually part of ADO, not SQL, which means that it's Microsoft proprietary. So do understand that if you use it, it won't translate well if you migrate from one form of database to another. Here's an example: http://www.sqlserver...1.aspx#bm637276
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1