.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 1st, 2003, 06:55 AM
seebo seebo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 seebo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sql/vb statement help

Heres my vb code
Dim sql As String = "SELECT P_Name, C_PeriodTo from PROPOSER, POLICY where DATEDIFF(DD, GETDATE(), C_PeriodTo)>1 AND DATEDIFF(DD, GETDATE(), C_PeriodTo)<28 AND P_RegnNo=C_RegnNo"

However, the result is different from what I get using Sql Query Analyzser. May I know if there is any special characters in the code that might be causing the difference?

Reply With Quote
  #2  
Old October 1st, 2003, 09:49 AM
emladris emladris is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: SC
Posts: 26 emladris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Just a Guess... But I'll Try.....

I originally wrote a bunch more, but now that I'm looking:

======================
AND P_RegnNo=C_RegnNo"
======================

These are not in the select statement. So the numbers are not going to match I believe. There will never be an equals? Do you not have to select these to be able to parse them?

Hope it helps!

Last edited by emladris : October 1st, 2003 at 09:54 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > sql/vb statement help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT