Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Filtering a recordset with ColdFusion - possibly SQL or passed parameter wierdness

Thread Tools
 
Search this Thread
 
Old 03 October 2003, 10:52 AM
  #1  
ScoobyWon't
Scooby Regular
Thread Starter
 
ScoobyWon't's Avatar
 
Join Date: May 2002
Location: Pot Belly HQ
Posts: 16,694
Likes: 0
Received 0 Likes on 0 Posts
Post

I'm attempting to filter my recordset in coldfusion to on display records which include Litter.Littername=A

It's ok if I'm only working with one table, it happily filters. But when I start joining tables it goes a bit funny and won't allow me to use the where clause. It's working fine within Access (sorry but I don't own a real SQL Server )

SELECT Litter.Littername, Litter.LitterID, Dogs.Kcname, Dogs.DogID, Dogs.Littername
FROM Dogs INNER JOIN Litter ON Dogs.Littername=Litter.Littername
WHERE Litter.Littername='#URL.Littername#'
ORDER BY Dogs.Kcname

Any ideas?
Old 03 October 2003, 04:21 PM
  #2  
Jza
Scooby Regular
 
Jza's Avatar
 
Join Date: Feb 2001
Posts: 2,959
Likes: 0
Received 0 Likes on 0 Posts
Post

Just a quickie - try dogs. rather than litter. for the URL bit?

J
Old 06 October 2003, 10:59 AM
  #3  
RichB
Scooby Regular
 
RichB's Avatar
 
Join Date: Apr 1999
Location: Bore Knee Muff
Posts: 3,666
Likes: 0
Received 0 Likes on 0 Posts
Post

Should there not be the name of the table before the name you give it i.e litter or dogs.

SELECT Litter.Littername, Litter.LitterID, Dogs.Kcname, Dogs.DogID, Dogs.Littername
FROM dogs_table Dogs INNER JOIN litter_table Litter ON Dogs.Littername=Litter.Littername
WHERE Litter.Littername='#URL.Littername#'
ORDER BY Dogs.Kcname

I'm no expert but that's how I've done it before...
Old 06 October 2003, 07:41 PM
  #4  
ScoobyWon't
Scooby Regular
Thread Starter
 
ScoobyWon't's Avatar
 
Join Date: May 2002
Location: Pot Belly HQ
Posts: 16,694
Likes: 0
Received 0 Likes on 0 Posts
Post

Hi guys,

Got it working shortly after posting. It works fine as:

SELECT Litter.Littername, Litter.LitterID, Dogs.Kcname, Dogs.DogID, Dogs.Littername
FROM Dogs INNER JOIN Litter ON Dogs.Littername=Litter.Littername
WHERE Litter.Littername='#URL.Littername#'
ORDER BY Dogs.Kcname

Thanks for looking
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
Ganz1983
Subaru
5
02 October 2015 09:22 AM
shorty87
Other Marques
0
25 September 2015 08:52 PM



Quick Reply: Filtering a recordset with ColdFusion - possibly SQL or passed parameter wierdness



All times are GMT +1. The time now is 08:45 AM.