Hello Tamar. Thank you kindly for replying to my post this quick!
Unfortunately I cannot create the additional table you suggested. The data comes from an application I need to produce reports from. Additionally, the table is very large for trying to find a solution with case statements :(...
--I have two Sql Server 2012 tables with data similar to these:
-- Table 1
Declare @Product_Sales Table (Suggested_Products varchar(max) null);
Insert Into @Product_Sales
Values
('({1421,1} OR {1422,2}) AND NOT ({1426,2},({1698,0} OR {1699,1} OR {1700,0})'),
('{1698,0} OR {1699,1} OR {1700,0}')...
Hi again Andy,
Yes, there is already a table with those values (take a look at my initial request please:
Quote
Greetings,
We have a MS Sql Server table which outputs data like this:
(1000 OR 1001 OR 1002 OR 1003 OR 1004) And Not (2000, 2001)
I need to report the data this way:
(Alfred...
Andy,
The answer is Yes to your last posting:
Quote
Are you saying the data in one of the fields in your table looks something like this?
Field_X
(1000 OR 1001 OR 1002 OR 1003 OR 1004) And Not (2000, 2001)
(123 OR 456 OR 345 OR 6223 OR 9098) And Not (2022, 2451)
(1045 OR 1076 OR 1042 OR 1363...
Hi Andy. Thank you very much for your quick response.
I know it does looks weird, but the example that I submitted reflects correctly how the data is stored in the column on the table. In reality, instead of the person's names I used in my example, the data corresponds to sales product codes...
Greetings,
We have a MS Sql Server table which outputs data like this:
(1000 OR 1001 OR 1002 OR 1003 OR 1004) And Not (2000, 2001)
I need to report the data this way:
(Alfred OR Bruce OR Crystal OR David OR Esperanza) AND NOT (Monica, Ruben)
There is already a table with the user data. The...
Thank you for responding so quickly to my post SQLBill. You're absolutely correct. Most of the names in my table actually contain just first name and last name. However there are some names with Jr. and II/III suffixes. The typical data in my table will be:
Andrew O'Brien. I need the data to...
Hello everybody,
I'm new to MS T SQL. I'd like to request your help with name formatting. My data comes from one single table and contains employee names like this:
ANDREW J. O'BRIEN JR.
I need to format the names as follows:
O'Brien, Jr. Andrew J
Thank you in advance for your assistance...
It works very well!. Thank you lbass very much for sharing your knowledge with me.
Just wondering. Is there a way that this formula could be saved as a "function" so it can be used in multiple reports?
Merry Christmas.
Molkas Guevara
How do you calculate the previous business day from today (excluding Saturdays and Sundays)?
Thank you sincerely for your help.
Merry Christmas.
Molkas Guevara
Thank you very much for your assistance LB. The example does contain a typo; the solution to my field is actually the rounded values you provided. My report is working great!. Thank you again.
Molkas
How can I format a field to show currency value this way:
$1 (instead of 1,250)
$125 (instead of 125,078)
$1,125 (instead of 1,125.345)
Thank you. - Molkas
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.