Inserts create new records in reporting table

2022-12-30 Thread Bret Stern
Love the forum, I'm bringing 100k - 200k of AR transactions into a table from several separate ERP companies. As I insert the records, does it make sense to run a trigger event to build or insert data into a reporting table (to save generating a query to build the reporting table later.)

Re: The tragedy of SQL

2021-09-14 Thread Bret Stern
I didn't start in 1967, but 1984, I'm in agreement with the bad programmers premise. Since the beginning there have always been lots of languages. It is my opinion, the more languages and concepts you know the better your success on the project. Heck I didn't use triggers till late 90's,

Re: Sort question - Fractions, Metric etc

2021-08-14 Thread Bret Stern
On 8/14/2021 2:13 PM, Adrian Klaver wrote: On 8/14/21 2:04 PM, Bret Stern wrote: Yep, I provide the UI for the user to select the vendor supplied unit value from the list. I should have been more specific, does the vendor do all the conversions and supply them to you? Vendors supply

Re: Sort question - Fractions, Metric etc

2021-08-14 Thread Bret Stern
(floor, shower etc), not the tightest tolerance of dimensions, so it's not catastrophic if it's off a 32nd or so. cheers On 8/14/2021 1:43 PM, Adrian Klaver wrote: On 8/14/21 1:24 PM, Bret Stern wrote: Here's the clip of the UI. The user selects whatever value the vendor provides

Re: Sort question - Fractions, Metric etc

2021-08-14 Thread Bret Stern
I like that idea On 8/14/2021 9:46 AM, Adrian Klaver wrote: On 8/14/21 9:37 AM, Bret Stern wrote: Strings; I haven't explored doing this with numeric types, but some columns needed alpha chars eg 13mm. Two columns: data_val(numeric)    data_unit(varchar) 13    mm Although I

Re: Sort question - Fractions, Metric etc

2021-08-14 Thread Bret Stern
AM, Adrian Klaver wrote: On 8/14/21 9:14 AM, Bret Stern wrote: I have a table with metric, imperial, fraction columns. Is there a way to sort correctly using imperial (eg; .125, .375, .437 -> 1., 1.125) Alright how is this different from metric or fraction? I can sort of see fraction if

Sort question - Fractions, Metric etc

2021-08-14 Thread Bret Stern
I have a table with metric, imperial, fraction columns. Is there a way to sort correctly using imperial (eg; .125, .375, .437 -> 1., 1.125) Couldn't handle it with ORDER BY ASC, DESC args so I added a sort_column and sorted based on those values eg; 1,2,3,4,5,6 indicating the value I need

Re: Like Query help

2021-01-14 Thread Bret Stern
Works. Thanks for the help. I will read the docs Best On 1/14/2021 4:37 PM, aNullValue (Drew Stemen) wrote: At 2021-01-14T19:27:23-05:00, Bret Stern sent: query select company_code, item_code, item_description, product_line, udf_item_width, udf_item_length, sales_unit_measure

Like Query help

2021-01-14 Thread Bret Stern
query select company_code, item_code, item_description, product_line, udf_item_width, udf_item_length, sales_unit_measure, ''as mat_type from mas_combined_item_master where company_code='BUR' or company_code='SNJ' or company_code='EBC' and udf_edb_managed='' and item_code LIKE 'S-%' order by

Re: Format an Update with calculation

2018-12-18 Thread Bret Stern
Thanks again, I don't remember ever using a select in an update. Not sure how to use a select in an update, I'll google around. On Tue, 2018-12-18 at 08:18 +0100, Pavel Stehule wrote: > > > > út 18. 12. 2018 v 8:15 odesílatel Bret Stern > napsal: > > My st

Format an Update with calculation

2018-12-17 Thread Bret Stern
My statement below updates the pricing no problem, but I want it to be formatted with 2 dec points eg (43.23). Started playing with to_numeric but can't figure it out. Lots of examples with to_char in the manual, but still searching for answer. Can it be done? I want suggested_retail_price to