Query problem (1 Viewer)

kmaz79

New member
Local time
Today, 21:38
Joined
Mar 27, 2018
Messages
7
making changes with UPDATE & IIF

Please read this attachment because i want to show you the structure of my tables

query.jpg
thank you in advance
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:38
Joined
May 7, 2009
Messages
19,231
Dont use update query. Leave your table as is. Write a total query to show your result.
 

kmaz79

New member
Local time
Today, 21:38
Joined
Mar 27, 2018
Messages
7
A query of what type ? and should i use just "iif"?or add an extra function -query?
 

kmaz79

New member
Local time
Today, 21:38
Joined
Mar 27, 2018
Messages
7
in which stage i add this? in the final form?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:38
Joined
May 7, 2009
Messages
19,231
Create first a simple select query:

Select iif(hotelname="santa marina p" and instr("/dv1/drs/", "/" & roomtype & "/")<>0,"santa marina b", hotelname) as hotel, 7d_adults, 7d_inf, 14d_adults, 14d_inf from passengers500;

Save the query.


Create a TOTAL query against the above query
 

kmaz79

New member
Local time
Today, 21:38
Joined
Mar 27, 2018
Messages
7
i will test it and will let you know,
thank you in advance for your time!
 

kmaz79

New member
Local time
Today, 21:38
Joined
Mar 27, 2018
Messages
7
Sorry but it doesn't seem to work
i should get clear that the final table has been the result of consecutive queries coming from the first table "PASSENGERS500", (number of 7days-adult passengers, number of 7 day-infant passengers and so on..) and ending with the final result with a composing query of all the above ...
i just want to add an exception for the case of "Santa Marina P" and "Santa Marina B"...
 

Users who are viewing this thread

Top Bottom