Viewing 15 posts - 3,886 through 3,900 (of 59,087 total)
Thank you for the readily consumable data. This should do it for you and it contains some protection from "Divide by Zero" issues...
SELECT companyid...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 10:43 pm
I would like to match this source table: CREATE TABLE [dbo].['TMI Sites $']( [Advertiser] [nvarchar](255) NULL, [Designated Market Area (DMA)] [nvarchar](255) NULL, [DV360 Site] [nvarchar](255) NULL, [Impressions] [float] NULL,...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 10:14 pm
Can you post the CREATE TABLE statement for the table, please? I might have a time-saving idea for you if the structure is right for it.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 10:11 pm
[EDIT] I just noticed that this is almost identical to @kaj's good code.
This should help and it will also help prevent mistakes with spaces (like ratbak also helped prevent in...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 9:05 pm
Attached excel sheet
See above.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 8:23 pm
Table is attached in excel sheet due to format issue
Please see the article at the first link in my signature line below for how to post "readily consumable" data...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 8:15 pm
Can you elaborate?
Thx.
Sure. Do a search for SQL Injection and try some of the methods for the way you're using @Table2 and @ColName. @Table1 may not have the same...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 8:07 pm
In my case, I had to right click the icon in the actual windows menu, then click on "More", and then click on "Open File Location" and that took me...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 8:01 pm
Please see the following article if you want to know more about CROSSTAB queries and how they work.
https://www.sqlservercentral.com/articles/cross-tabs-and-pivots-part-1-converting-rows-to-columns-1
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 9:30 am
Check the page density on the Clustered Index for your big table that you deleted images from. Because you used the IMAGE datatype, they should have gone "out-of-row" but it's...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 9:26 am
This is a recurring pain for many regardless of the version of SSMS! After struggling with this inconvenience for too long and striking out in Google, I found a...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 1:19 am
Please consider the possibility of SQL Injection, especially on @Table2.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 21, 2022 at 1:03 am
It looks to me like you're forming a ton of accidental cross joins in the form of many-to-many joins because of the insufficient join criteria of partid = partid.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 18, 2022 at 7:34 pm
Oh, great. So you found someone else's work to turn in as your own for a school assignment.
Heh... he's late. The document says that it was due in October...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 17, 2022 at 9:20 pm
I think what concerns me most about the IoT is security. They have lightbulbs and thermostats that connect to your wireless network. They call to their home server and...
--Jeff Moden
Change is inevitable... Change for the better is not.
February 17, 2022 at 9:10 pm
Viewing 15 posts - 3,886 through 3,900 (of 59,087 total)