PDA

View Full Version : Need a hand!


Noleader
04-07-2004, 03:56 PM
Can someone tell me whats wrong with this...

strSQL = "SELECT PO_Requisition_Lines_All.Line_Num as intLineNum, " _
& "PO_Requisition_Lines_All.Item_Description as strReqItem, " _
& "PO_Requisition_Lines_All.Quantity as intReqQty, " _
& "PO_Requisition_Lines_All.Unit_Meas_Lookup_Code as strUnit, " _
& "PO_Requisition_Lines_All.Creation_Date as dtmReq, " _
& "PO_Requisition_Lines_All.Need_By_Date as dtmDue, " _
& "RCV_Transactions.Transaction_Date as dtmArr, " _
& "RCV_Shipment_Lines.Quantity_Received as intRecQty, " _
& "RCV_Shipment_Lines.Item_Description as strRecItem, " _
& "RCV_Shipment_Lines.Creation_Date as dtmAct, " _
& "RCV_Shipment_Headers.Receipt_Num as strRecNum "

strSQL = strSQL & "FROM PO_Requisition_Lines_All, " _
& "RCV_Transactions, " _
& "RCV_Shipment_Lines, " _
& "RCV_Shipment_Headers, " _
& "PO_Headers_All "
strSQL = strSQL & "WHERE ((PO_Headers_All.Segment1 = " _
& dVnt2SQLStr(txtBar(idxTXTPONUM).Text) & ") " _
& "AND (RCV_Shipment_Headers.Receipt_Num = " _
& dVnt2SQLStr(txtBar(idxTXTRECNUM).Text) & ") " _
& "AND (RCV_Shipment_Lines.Line_Num = " _
& dVnt2SQLStr(txtBar(idxTXTLINE).Text) & ") "

strSQL = strSQL & "AND RCV_Transactions.PO_Header_ID = " _
& "PO_Headers_All.PO_Header_ID " _
& "AND RCV_Shipment_Headers.Shipment_Header_ID = " _
& "RCV_Transactions.Shipment_Header_ID " _
& "AND RCV_Shipment_Lines.PO_Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID " _
& "AND PO_Requisition_Lines_All.Line_Location_ID = " _
& "RCV_Transactions.PO_Line_Location_ID)"

:)

Rooster
04-07-2004, 04:14 PM
Looks good to me.

What is it? (it appears to be order/bill of lading/invoice form that's generated from a SQL database)

I assume you don't need a space between these: & "PO_Headers_All "
strSQL = strSQL & "WHERE ((PO_Headers_All.Segment1 = " _

Noleader
04-07-2004, 04:27 PM
I was just sick of looking at SQL (been doing it all day) so I figured I would subject someone else to my hell :)

Rooster
04-07-2004, 04:34 PM
Well, I'm not a programmer by any stretch of the imagination.

I'm a hardware/Windows guy. :)

UglyWolf
04-07-2004, 04:36 PM
Noleader, get back to work or I'll fire your ass!!!

:fuct:

spyder913
04-07-2004, 05:25 PM
I can't see anything wrong with the syntax at least

Noleader
04-09-2004, 04:01 AM
It works fine :)

I just wanted to share the small pit of hell I am in reading/writing a # of those statments for a app I can not test because the database is behind a firewall that we can not get access to :)

PoxTheSmall
04-09-2004, 05:17 PM
Noleader, don't ever post your SQL here again, or I'll be forced to share some of my PL/SQL hell/nightmare with you!

Noleader
04-11-2004, 05:29 AM
Noleader, don't ever post your SQL here again, or I'll be forced to share some of my PL/SQL hell/nightmare with you!lol

Noleader
04-11-2004, 05:30 AM
Noleader, get back to work or I'll fire your ass!!!

:fuct:
You already did... I just keep showing up till they fix the gilch in accounting :)

PoxTheSmall
04-11-2004, 02:20 PM
Or until he gets his stapler back!

Dape
04-11-2004, 04:37 PM
Wolf you CAN"T fire NL, he's a designated driver.
:hump:

Noleader
04-12-2004, 01:44 AM
Wolf you CAN"T fire NL, he's a designated driver.
:hump:hahahahahah!!!!!!!!!!!!!!

Noleader
04-12-2004, 01:45 AM
Or until he gets his stapler back!

lol

PoxTheSmall
04-13-2004, 02:19 AM
I'm touched that you got the Office Space reference. I'm actually touching myself...

Noleader
04-13-2004, 02:55 AM
I'm touched that you got the Office Space reference. I'm actually touching myself...
umm... you will go blind!!!!!

feril
04-14-2004, 05:28 PM
Red Stapler!!

UglyWolf
04-16-2004, 01:39 PM
Wolf you CAN"T fire NL, he's a designated driver.
:hump:

Good point...Damn!!! :bang:

IceFire
04-16-2004, 11:30 PM
Heh, until i saw where u just wanted us to look it over for mistakes, couldnt see none but was going to suggest a semi-coln at the end....

But whatever you make, it seems to run diffrent on the Live server then a test server. Atleast from my experiance =)