This site is no longer active and is available for archival purposes only. Registration and login is disabled.

SQL Statment?


SQL Statment?

Postby RwGast » Nov 15, 2001 @ 8:32pm

Lets say your database is full of invoice line items and the invoice properties, so there for each line would look like<br><br>InvcNo Item             [Additonal Invc info]<br>366    Blah             [Additonal Invc info]<br>366    somthing         [Additonal Invc info]<br>366    not the same     [Additonal Invc info]<br>367    Whatever         [Additonal Invc info]<br>367    Blah             [Additonal Invc info]<br><br>Does anyone know to add to a SELECT to only i of each item by it InvcNo. So the query would ony return<br><br>InvcNo Item             [Additonal Invc info]<br>366    Blah             [Additonal Invc info]<br>367    Whatever         [Additonal Invc info]<br><br><br>
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby RwGast » Nov 15, 2001 @ 8:38pm

I tried "SELECT DISTINCT * FROM InvcData" But it seemed to crash any ideas?
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby RwGast » Nov 15, 2001 @ 8:46pm

Damn it all! It seams that Distinct makes sure that all the data in the record is unique, So you cant use it to select all the data, and make it "DISTINCT" or unique by just one field. Any ideas?
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby Chris Edwards » Nov 16, 2001 @ 12:11am

ok... don't really understand what you are trying to do.<br><br>you want it to return the first of each record #?<br><br>nevermind... i understand now :)<br><br>SELECT DISTINCT InvcNo, * FROM InvcData<br><br>selecting the distinct from * is probably where it's dying.. you can't tell it to eliminated duplicated entries in all the columns... just one.. so than we add a * later on...<br><br>tell me how that works.
Chris Edwards
Founder
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Re: SQL Statment?

Postby RICoder » Nov 16, 2001 @ 4:26pm

<iframe src="http://gamercard.xbox.com/RICoder.card" scrolling="no" frameBorder="0" height="140" width="204">RICoder</iframe>
User avatar
RICoder
FOX News Correspondent
 
Posts: 3948
Joined: Jul 10, 2001 @ 1:48pm
Location: the matrix has me


Re: SQL Statment?

Postby RwGast » Nov 16, 2001 @ 5:12pm

http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby Chris Edwards » Nov 16, 2001 @ 6:32pm

Chris Edwards
Founder
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Re: SQL Statment?

Postby RwGast » Nov 16, 2001 @ 6:38pm

http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby Paul » Nov 16, 2001 @ 6:59pm

Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: SQL Statment?

Postby RwGast » Nov 16, 2001 @ 7:00pm

http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby Paul » Nov 16, 2001 @ 7:09pm

Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: SQL Statment?

Postby Paul » Nov 16, 2001 @ 7:26pm

SELECT DISTINCT InvcNo, Item, [Additonal Invc info]<br>FROM InvcData;<br><br>nah, thats rubbish, but i'll post it anyway because i'm bored waiting for my vid to download.<br><br>*voices in pauls head*<br>library girl!<br>library giiirrrll!!!<br><br>what? huh?!? ARRRRRRGGGGGGH!!!!!!<br><br>*drools*<br>
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: SQL Statment?

Postby RwGast » Nov 16, 2001 @ 7:34pm

Hmm i saw your modifaction of your post with that access thing. I dont know how to use access acually, i only use sql and vb. Maybe you could do it in access with a some made up data and show me the code it generates?
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Re: SQL Statment?

Postby Paul » Nov 16, 2001 @ 7:39pm

i have access 97 - doesnt work at the mo - i have access 2000 - not installed - cant be bothered right now, can you wait until tomorrow?<br><br>unless i suddenly can be bothered, in which case i'll do it soon.
Paul
pm Insider
 
Posts: 9835
Joined: Apr 2, 2001 @ 3:15pm
Location: California


Re: SQL Statment?

Postby RwGast » Nov 16, 2001 @ 7:42pm

O thats cool, if you get aroud to it let me know. For now im just gonna do this all with vb code althought thats a horribly slow ass way.
http://www.angelfire.com/ego/esoteric if you like to play quake3 keep your eye on this site
User avatar
RwGast
pm Member
 
Posts: 1123
Joined: Jun 28, 2001 @ 7:36pm
Location: California, USA


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron