Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 27th, 2003, 12:18 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default COMPLEX QUERY PROBLEM

Hello all

Bellow you see a rather complex query which I run against SQL Server 2000 against my ASP pages.

SELECT welcome_page.title, welcome_page.body, welcome_page.displ_date, welcome_page.img_id, welcome_page.pos, welcome_page.border, welcome_page.url, welcome_page.snd_id, welcome_page.embed, welcome_page.vid_id, users_imgs.img_file, users_imgs.img_width, users_imgs.img_height, users_imgs.img_alt, users_sounds.snd_file, users_sounds.snd_name, users_vids.vid_file, users_vids.vid_name FROM users_vids RIGHT JOIN (users_sounds RIGHT JOIN (users_imgs RIGHT JOIN welcome_page ON users_imgs.img_id = welcome_page.img_id) ON users_sounds.snd_id = welcome_page.snd_id) ON users_vids.vid_id = welcome_page.vid_id where welcome_page.site_id = @siteid

It does not "give me" back the value of "welcome_page.img_id" field. It returns it null. When i execute the same query directly through the Query Analyzer of SQL Server, it sends back all values as it should.

When I execute it against an Access db (through my ASP page), it also works fine. The problem appears only when it runs against SQL Server.

One more detail: If I add the "users_imgs.img_id" field it gives me its value fine, but it send blank the value of "welcome_page.snd_id" field this time.

Strange. Can anybody explain this?

Thanks in advance

Nick
Reply With Quote
  #2 (permalink)  
Old July 28th, 2003, 03:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

It would be much easier to see what's going on if you made this query into a view, and then queried the view instead...

hth
Phil
Reply With Quote
  #3 (permalink)  
Old July 28th, 2003, 02:13 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I already have it in a stored procedure and the result is the same.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
complex query g_vamsi_krish SQL Language 3 February 27th, 2006 09:48 AM
Help need with designing this complex query method Access 2 July 1st, 2005 05:29 AM
query too complex liz@trinityholdings.co.za Access 3 August 28th, 2003 09:01 AM
COMPLEX QUERY PROBLEM nikosdra SQL Server ASP 15 August 4th, 2003 06:17 PM



All times are GMT -4. The time now is 08:00 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.