To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

HOME News MS SQL Oracle DB2 Access MySQL PHP Scripts Books Links DBA Talk


Go Back   Database Journal Forums > Related Sites > SQL Course

SQL Course SQL Course > Ask questions about the lessons on SQL Course 1 and 2. If you have problems > with the interface, please post in the Feedback forum

Reply Post New Thread
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-13-2002, 10:32 AM
Stacey Stacey is offline
Junior Member
 
Join Date: Nov 2002
Posts: 1
Question help.. converting query from MS Access to SQL

Please help. I have the following query that runs in access and I need to make it run directly on SQL Server 2K. I did not build this access query and I have never used a join quite like this. Any help would be appreciated.

UPDATE tblItm
INNER JOIN (ItmStr INNER JOIN StrReqRvw ON
(StrReqRvw.StNo = ItmStr.StrNo) AND
(ItmStr.UPC = StrReqRvw.UPC)) ON tblItm.UPC = StrReqRvw.UPC
SET ItmStr.StrReqQty = 0
WHERE (((StrReqRvw.ReqDt) Like '11/04/02')
AND ((tblItm.StckFlg)<>"SQ" And (tblItm.StckFlg)<>"PR"));

Thanks
Reply With Quote
  #2  
Old 11-18-2002, 07:04 PM
bamcorp bamcorp is offline
Junior Member
 
Join Date: Nov 2002
Posts: 8
I am not sure if this is exactly what you need because the update query is so out of order. Is this part of VBA code? If it is just a stand alone update query then this should replace it for SQL Server:

update itmstr

set strreqqty = 0

from
itmstr a inner join strreqrvw b
on a.stno = b.strno and
a.upc = b.upc
inner join tblitm c
on c.upc = b.upc

where
b.reqdt like '11/04/02'
and c.stckflg <> 'sq'
and c.stckflg <> 'pr'
Reply With Quote
Reply Post New Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:19 PM.


DatabaseJournal Recent Articles


 » Searching and Sorting Strings in Oracle

 » Preparing To Upgrade Access Tables to SQL ...

 » Sun Expands MySQL With Closed Source

 » Microsoft Demos New SQL Server Features at...

 » Wipro and Oracle Launch First Joint Innova...

Search Database Journal:
 





Acceptable Use Policy

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.