Jump to content
Jambands.ca

Ollie or Bouche ACCESS query question


Groove Fetish
 Share

Recommended Posts

can anyone tell me where the extra ) is in this query....I thought I had it right but its tell me there is an extra )

SELECT ['C].[Faculty Co-Investigators], ['C].[Faculty_Co_PI], ['C].[PI- LastName], ['C].[Co-Inves 1- LastName], ['C].[Co-Inves 2- LastName], ['C].[Co-Inves 3- LastName], ['C].[Co-Inves 4- LastName], ['C].[Co-Inves 5- LastName], ['C].[Co-Inves 6- LastName], ['C].[Co-Inves 8- LastName], ['C].[Co-Inves 7- LastName], ['C].[Co-Inves 9- LastName], ['C].[Co-Inves 10- LastName], ['C].[Co-Inves 11- LastName], ['C].[Co-Inves 13- LastName], ['C].[Co-Inves 12- LastName], ['C].[Co-Inves 14- LastName], ['C].[Co-inves 15- LastName], ['C].[Co-Inves 16- LastName], ['C].[Co-Inves 17- LastName], ['C].[Co-Inves 18- LastName], ['C].[Co-Inves 19- LastName], ['C].[Co-Inves 20- LastName], ['C].[Co-Inves 21- LastName], ['C].[Co-Inves 22- LastName], ['C].[Co-Inves 23- LastName], ['C].[Co-Inves 24- LastName], ['C].[Co-Inves 25- LastName], ['C].[Co-Inves 26- LastName], ['C].[Grant Agency], ['C].[Grant Title], ['C].[$ Amount], ['C].[submitted Date], ['C].[Awarded date], ['C].[End Date], ['C].Status, ['C].[PI- FirstName]

FROM ['C]

WHERE (((['C].[PI- LastName])="Hanna") AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 1- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 2- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 3- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 4- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 5- LastName])="Hanna"))) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 6- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 8- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 7- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 9- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 10- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S")) OR (((['C].[Co-Inves 11- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S")) OR (((['C].[Co-Inves 13- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 12- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 14- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-inves 15- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 16- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 17- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 18- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 19- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 20- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 21- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 22- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 23- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 24- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 25- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 26- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S")));

Edited by Guest
Link to comment
Share on other sites

ok- I missed a few ) in it but it is still telling me its wrong

SELECT ['C].[Faculty Co-Investigators], ['C].[Faculty_Co_PI], ['C].[PI- LastName], ['C].[Co-Inves 1- LastName], ['C].[Co-Inves 2- LastName], ['C].[Co-Inves 3- LastName], ['C].[Co-Inves 4- LastName], ['C].[Co-Inves 5- LastName], ['C].[Co-Inves 6- LastName], ['C].[Co-Inves 8- LastName], ['C].[Co-Inves 7- LastName], ['C].[Co-Inves 9- LastName], ['C].[Co-Inves 10- LastName], ['C].[Co-Inves 11- LastName], ['C].[Co-Inves 13- LastName], ['C].[Co-Inves 12- LastName], ['C].[Co-Inves 14- LastName], ['C].[Co-inves 15- LastName], ['C].[Co-Inves 16- LastName], ['C].[Co-Inves 17- LastName], ['C].[Co-Inves 18- LastName], ['C].[Co-Inves 19- LastName], ['C].[Co-Inves 20- LastName], ['C].[Co-Inves 21- LastName], ['C].[Co-Inves 22- LastName], ['C].[Co-Inves 23- LastName], ['C].[Co-Inves 24- LastName], ['C].[Co-Inves 25- LastName], ['C].[Co-Inves 26- LastName], ['C].[Grant Agency], ['C].[Grant Title], ['C].[$ Amount], ['C].[submitted Date], ['C].[Awarded date], ['C].[End Date], ['C].Status, ['C].[PI- FirstName]

FROM ['C]

WHERE (((['C].[PI- LastName])="Hanna") AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 1- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 2- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 3- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 4- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 5- LastName])="Hanna"))) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 6- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 8- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 7- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 9- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 10- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 11- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 13- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 12- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 14- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-inves 15- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 16- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 17- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 18- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 19- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 20- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 21- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 22- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 23- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 24- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 25- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S"))) OR (((['C].[Co-Inves 26- LastName])="Hanna")) AND ((['C].[PI- FirstName])="S")));

Ollie??? Bouche???

Link to comment
Share on other sites

I became obsessed for about 3 minutes with this problem and I found that you could use regular expressions to match your brackets using wild cards for the interiors...but that would take too long to figure out, so then I just started counting and subtracting from the left.

As I count 1 left bracket, I increment my count, and as I encounter a right bracket, I increment my count by -1. I blew my threshold with this line...

WHERE (((['C].[PI- LastName])="Hanna") AND ((['C].[PI- FirstName])="S"))) OR .... 3 minutes passed and I got distracted.

5 Left Brackets + -6 left brackets is -1.

Do you need all them brackets for that huge statement?

Link to comment
Share on other sites

5 Left Brackets + -6 left brackets is -1

Right .. and we found it in the same clause, so we must be on to something.

and I found that you could use regular expressions to match your brackets using wild cards for the interiors

Crap, that would be handy. I certainly wouldn't envy that guy that writes/wrote it, though. Regex = super-handiness of everything wonderful and great but also all that is painful in this world :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...