Jump to content

halfsparrow

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

halfsparrow's Achievements

Member

Member (2/5)

0

Reputation

  1. This is not helping me to store value in variable, What i want is for eg lets take 2nd query where gpm match and ewt does not. so ffor that i will get 2 values for totcool so i want to store that in variable where totcool1 = xxxx and totcool2 = xxxx OR The method you show gives me array i have attached the ss of it, so basically what want is the value of totcool from array[0] should be stored in variable totcool1 and the value of totcool from array[1] should be stored in totcool2
  2. there's no mathematical connectio between them. it the value that is universally proven and i have a excel sheet for it
  3. No, such data is not possible. If gpm is increasing ewt will also follows the same trend, lets forget about the case when bpth are not present i will write it down myself, can you just provide me with the other query I can make query for neither case myself by referring to query you will provide me for when either of the gpm or ewt matches
  4. yeah but the issue here will be i will have to hard code for every value for gpm, because the uniluxmodel we are using here is the name of table and i have total 15 tables and the difference between each gpm varies according to table and its not something that follows a particular trend. So the best query will be the one that @Psycho suggested.
  5. oh now i got it, So what i want is if, Gpm is 1.75 and ewt is 45 then i want totcool value for: 1) The record with lower value for gpm and lower value for ewt. for this example, totcool for 1.5 gpm and 40 ewt 2) The record with higher value for gpm and higher value for ewt. for this example, totcool for 2.0 gpm and 50 ewt And for @Barand solution, i appreciate his solution but i am in search of solution that does not require me to create another table, because i just have upload a small snippet of my database,it is really large and i will not be able to create a range table for that many entries.
  6. By lower i meant next lowest, and by higher i meant next highest, so for example if ewt is anywhere between 30-40, lets say 36 then lowest ewt should be 30 and highest ewt should be 40. We can get this by using max and min statement, like select * from table where ewt =(select max ewt from table where ewt<entered ewt) : this is for the lower ewt . so its like GPM LOWER GPM HIGHER GPM 1.2 1 1.25 1.3 1.25 1.5 Same for EWT EWT LOWER EWT HIGHER EWT 35 30 40 38 30 40 46 40 50 Hope it makes clear now
  7. If user enters gpm, = 1.75 and ewt as 35 i will have to do calculation for totCool for 1.5 gpm and 2 gpm and 30 and 40 ewt Basically the value below and the value above
  8. This looks perfect to me but just a few changes instead of getting getting average in query i want simple query to select * from table and then will do maths in if statement, also for when neither records are matched can you help me with query, i want that query to be treated same as before like when we did'nt found gpm we took one value below or above it so same way we want one value up and one value down for both gpm and ewt
  9. 1) If neither GPM or EWR match any records in that case i will do average of both of them, also i dont want average in query i will execute query and then add maths in that by saving the things i want in a variable 2) It will not be possible as user will never enter value that low or that high, to clear things out it is a real world situation web page where GPM is gallons per minute and ewt is entering water temperature so user will only enter from desired range
  10. i Cant do this, because user will also demand to enter value that are not in the database
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.