I am creating a BAQ. I have two issues/questions in regards to it.
I am having difficulty locating the following display columns: Ship To Name (not ID) & Assembly Description.
I am also need to set it up such that it is searchable by date, which I know how to do, but prior to date search is there a way to search by Part Number first?
Good morning,
The Ship To Name is in the Customer table. You will have to join it on ShipToNum (Which is customer num). Assembly description is in the JobAsmbl table. You will have to join it on Job number. If you want to search by part number and date. just enter them both as criteria in the BAQ. If you need the part to search first, you may have to use subqueries.
Good luck!
Nate
I have that set up, but going through the display columns in Customer I can’t find Ship To Name. There’s Customer Name and Ship To Number, just no Ship To Name. Unless I am missing something.
When I ask it to Analyze, it says the Syntax is okay. But when I go to test/run, even setting rows to return at 10, it doesn’t load. I have to cancel the query, then it loads. It says “Severity: Error, Text: Bad SQL statement.” I have a feeling my joins are wonky.
A user of mine has requested to see the following: Part Number, Part Description, Serial Number, Serial Number Creation Date, Serial Number Modified Date, Serial Number’s Job, Job Assembly Description, Sales Order associated with the serial number, Customer Name, Customer Ship To Name, and Requested Ship Date of the Sales Order.
select
[Part].[PartNum] as [Part_PartNum],
[Part].[PartDescription] as [Part_PartDescription],
[SerialNo].[CreateDate] as [SerialNo_CreateDate],
[SerialNo].[ModifiedDate] as [SerialNo_ModifiedDate],
[SerialNo].[SerialNumber] as [SerialNo_SerialNumber],
[SerialNo].[OrderNum] as [SerialNo_OrderNum],
[Customer].[Name] as [Customer_Name],
[OrderDtl].[RequestDate] as [OrderDtl_RequestDate],
[SerialNo].[JobNum] as [SerialNo_JobNum],
[JobAsmbl].[Description] as [JobAsmbl_Description],
[ShipTo].[Name] as [ShipTo_Name]
from Erp.SerialNo as SerialNo
inner join Erp.Part as Part on
SerialNo.Company = Part.Company
and SerialNo.PartNum = Part.PartNum
inner join Erp.OrderDtl as OrderDtl on
Part.Company = OrderDtl.Company
and Part.PartNum = OrderDtl.PartNum
inner join Erp.Customer as Customer on
OrderDtl.Company = Customer.Company
and OrderDtl.CustNum = Customer.CustNum
inner join Erp.ShipDtl as ShipDtl on
Customer.Company = ShipDtl.Company
and Customer.CustNum = ShipDtl.CustNum
inner join Erp.ShipTo as ShipTo on
ShipDtl.Company = ShipTo.Company
and ShipDtl.CustNum = ShipTo.CustNum
inner join Erp.JobAsmbl as JobAsmbl on
ShipTo.Company = JobAsmbl.Company
where (SerialNo.CreateDate >= @pStartDate and SerialNo.CreateDate <= @pEndDate)
Yes. Well… Sort of. It runs but never fills out, I have to hit the X to cancel it after a minute or so, then it populates. Even if I set it to a mere 10 rows. Does the same thing with or without the date parameters.
I’d remove all the tables you connected and set a parameter for one particular part number or one serial number. Add fields from the SerialNo table and run the query to see what you get. Once you’re getting data then add another table, add fields from that table and run the query and see what you get. Continue adding tables and fields until you add a table and fields and it breaks. Once you have all the fields you need, then put your date parameter in place and see how it goes.
Also, when you add the OrderDtl table, link that to the SerialNum order number and order line
Link the ShipDtl table to the SerialNum packnum and pack line