Jump to content

need help shortening this sql statement...


Gnub

Recommended Posts

I've initiated this query, and it does what it's ment to do, however, it takes over 3 minutes to complete.  is there a way to shorten the size of this query? and hopefully shortening the processing time.

 

Need more info, just ask.

 

DELETE
FROM dbo.HOTELBEDS_DATABASE
WHERE dbo.HOTELBEDS_DATABASE.AIRPORT IN (SELECT  HA.IATA_CODE FROM 
dbo._HOTELBEDS_HOTELS AS HH JOIN  dbo._HOTELBEDS_AIRPORTS AS HA ON HH._DESTINATION_CODE
= HA.HB_CODE, dbo._HOTELBEDS_BOARDTYPE AS HB WHERE HH._BOARD_TYPE_DESCRIPTION =
HB.BOARD_TYPE GROUP BY HA.IATA_CODE
									)
AND dbo.HOTELBEDS_DATABASE.BOARD_BASIS IN  (SELECT  dbo._HOTELBEDS_BOARDTYPE.BT_SHORT
FROM dbo._HOTELBEDS_HOTELS, dbo._HOTELBEDS_BOARDTYPE WHERE
dbo._HOTELBEDS_HOTELS._BOARD_TYPE_DESCRIPTION = dbo._HOTELBEDS_BOARDTYPE.BOARD_TYPE
GROUP BY dbo._HOTELBEDS_BOARDTYPE.BT_SHORT
) 

 

Thanks in advance

 

-Gnub

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.