
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] ASP like Perl
Thanks for all your help guys,
just for the record, if some one else comes around with a similar problem,
The reason I was pulling up the last field in the database was because
my [sql-code] field was not unique, I figured if I make all the code
fields 1
and do a query like so
[select * from table001 where code < 2]
It should work,. right?.... wrong, as with any database you need to have
an ID field which is unique and original in my case the ID was being skitzo,
So basically when I changed my code field to be the part-number (which is
unique)
I can easily pull down all the records in the database. with a query like so
[select * from table001]
at which point I dont even need matching criterial, I can just
say all the records,
-Hope this helps someone in the future
-Korey G.
At 23:07 12/5/01 +0000, you wrote:
>>* Korey Gozman wrote on Fri, Nov 30, 2001 at 15:12 -0800:
>> > I want to pull all the fields that match the criteria
>> > but it only displays the last entry in tha table.
>> > any suggestions?
>>
>>For postgres, you could order reverse and give a limit 1, i.e.:
>>
>>select sku from products where ... order by ... limit 1
>>
>>But in standard-SQL it's not really possible I think, usually SQL
>>is deterministic :)
>
>Amazing how something can trigger a long buried memory :}
>
>If your sku's are automatic, this should work:
>select sku from products where ... and sku = max(sku)
>
>syntax may be a little off as I have not tested it :}
>
>Jeff.
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users