.NET Development
Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

SOQL Questions
Options    Options  
DeL
Regular Contributor
Posts: 17


DeL

Message 1 of 7

Viewed 10,564 times


Does anyone know an easy way to simulate a SELECT DISTINCT operation in SOQL?

Also, how do you check for NULL in a WHERE clause.  I know IS NULL does not work?

Thanks...

 

 

08-09-2005 09:16 AM
 
  Reply   Reply  

Re: SOQL Questions
Options    Options  
GrantM
Regular Contributor
Posts: 70


GrantM

Message 2 of 7

Viewed 10,735 times


SELECT Id FROM CASE WHERE Id <> null
or
SELECT Id FROM CASE WHERE Id = null

 

don't think there's anything like distinct though

08-09-2005 09:21 AM
 
  Reply   Reply  

Re: SOQL Questions
Options    Options  
DeL
Regular Contributor
Posts: 17


DeL

Message 3 of 7

Viewed 10,534 times


Thanks once again...

08-09-2005 09:23 AM
 
  Reply   Reply  

Re: SOQL Questions
Options    Options  
GrantM
Regular Contributor
Posts: 70


GrantM

Message 4 of 7

Viewed 10,690 times


np

if you haven't got it yet, go grab the sforce explorer. It really helps with these queries

http://sforce.sourceforge.net/

08-09-2005 09:29 AM
 
  Reply   Reply  

Re: SOQL Questions
Options    Options  
DeL
Regular Contributor
Posts: 17


DeL

Message 5 of 7

Viewed 10,550 times


I do have it and yes, it is definitely a MUST HAVE !!!

 

08-09-2005 09:36 AM
 
  Reply   Reply  

SForce Explorer
Options    Options  
DeL
Regular Contributor
Posts: 17


DeL

Message 6 of 7

Viewed 10,499 times


Although, can you ever get the more... button to work.  I always get a .NET exception :

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Specified cast is not valid.
   at sforceExplorer.frmMain.GetNextSet()
   at sforceExplorer.frmMain.btnMore_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
sforceExplorer
    Assembly Version: 1.0.1851.18391
    Win32 Version: 1.0.1851.18391
    CodeBase: file:///C:/Program%20Files/salesforce.com/sforce%20Explorer/sforceExplorer.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Web.Services
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system.web.services/1.0.5000.0__b03f5f7f11d50a3a/system.web.services.dll
----------------------------------------
DocumentControl
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/salesforce.com/sforce%20Explorer/DocumentControl.DLL
----------------------------------------
System.Web
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2037
    CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
b4psdrnj
    Assembly Version: 0.0.0.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
l5b00_vs
    Assembly Version: 0.0.0.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 0.5.0.0
    Win32 Version: 0.5.0.0
    CodeBase: file:///C:/Program%20Files/salesforce.com/sforce%20Explorer/ICSharpCode.SharpZipLib.DLL
----------------------------------------
f8mgee-i
    Assembly Version: 0.0.0.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 7.0.5000.0
    Win32 Version: 7.10.6001.4
    CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


 

08-09-2005 09:39 AM
 
  Reply   Reply  

Re: SForce Explorer
Options    Options  
GrantM
Regular Contributor
Posts: 70


GrantM

Message 7 of 7

Viewed 10,987 times


yeah, i get the same thing.

you see the api is limited to returning 2000 results.
You have to use the QueryMore option to get the next 2000 results.

So there must be some mistake in the code at that step.
Haven't had the time to check it out properly

08-09-2005 09:44 AM
 
Jump to Page:   1