473,394 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Setting a variable equal to the "size" of my database

HI everyone,

I have an SQL database that tracks workorders for my company. Each
workorder is ID'ed by a number, i.e.: 1234. The next would be 1235,
1236, etc. I need a loop to go through EVERY workorder in the database.
How do I set a variable = to the largest WorkorderID in the database?
i.e.: That would be 1500 if there were 1500 workorders in the database.
Don't worry, there are other checks in place so that it won't always
loop through every single workorder (I thought about that already).

Thanks in advance,
Andrew

Mar 15 '06 #1
1 1007
Gazing into my crystal ball I observed "va***************@gmail.com"
<va***************@gmail.com> writing in news:1142376391.654465.138280
@j33g2000cwa.googlegroups.com:
HI everyone,

I have an SQL database that tracks workorders for my company. Each
workorder is ID'ed by a number, i.e.: 1234. The next would be 1235,
1236, etc. I need a loop to go through EVERY workorder in the database.
How do I set a variable = to the largest WorkorderID in the database?
i.e.: That would be 1500 if there were 1500 workorders in the database.
Don't worry, there are other checks in place so that it won't always
loop through every single workorder (I thought about that already).

Thanks in advance,
Andrew


SELECT MAX(WordorderID) FROM tablename

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Mar 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: qe_Cui | last post by:
Hello everyone: I am using vb.net 2003, sqlserver2000 database, and windows 2000 professional OS. In the program, I encrypt the login user's userid and passed with RSACryptoServiceProvider....
24
by: jrefactors | last post by:
I have an upload file operation in the web application. UploadForm.jsp is the form, and UploadAction.jsp is the form processing. The web server is Websphere. //UploadForm.jsp <FORM...
4
by: JMUApache | last post by:
Hi, A have a problem with Inhreit Control. I try to Change its Size in Construct Function, And it works. Code Here: -------------------------------------------------- public class...
2
by: rowe_newsgroups | last post by:
Hello all, When the user clicks the Restore button on the taskbar, how can I set what size the form restores to? I would like to have it "remember" what the last size was, like most windows apps...
2
by: Alan | last post by:
Hi, IE lets the user set the "Text Size" to use when viewing pages. That sizing works fine when I view my pages directly in the IE browser, but the changes don't seem to carry over to VS 2005's...
17
by: teser3 | last post by:
I can put out a Word Doc from PHP but if I try and manipulate the font size in the PHP part it outputs a blank Word Document. Here is what I have: <?php $fname="report.doc"; $handle = fopen(...
3
by: Tom | last post by:
Can someone please explain the non-working aspect of binding to Width? See code below. Thanks !! -- Tom =================================================== using System; using...
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
7
by: Luna Moon | last post by:
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { string cc(31, 'c'); string bb=cc.assign(3, 'dd');
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.