Viewing 15 posts - 76 through 90 (of 417 total)
I couldn't see the code until I quoted the post for reply, then my post was also hard to see. I pasted it in regular text as I couldnt make...
November 22, 2023 at 9:46 pm
duplicate
November 21, 2023 at 11:35 pm
Here's an example with an artificial column. I did try COUNT(ID), but it said invalid column.
DROP TABLE IF EXISTS dbo.Activities;
CREATE TABLE dbo.Activities
( ID INT,
...
November 21, 2023 at 11:32 pm
You could use sp_MSforeachtable to avoid writing a loop, but it will only work in the database it's run from, so you couldn't query two databases at the same time...
November 15, 2023 at 7:46 pm
Are the dimension columns you need unique without Company Code and is Company Code irrelevant? If so, can you join to a distinct query of the columns you need?
It appears...
November 15, 2023 at 5:15 pm
Since you're not using SQL Server (based on the INT4 datatypes you used), it may be that the RDBMS you're using doesn't allow CTEs (Common Table Expressions), which is...
September 12, 2023 at 8:56 pm
Does this give you what you need? It sounds like General Purpose tier serverless autoscaling databases will turn off automatically after a certain period of inactivity and they can be...
September 11, 2023 at 5:40 pm
I know you solved it already, but I think the issue only happens when the milliseconds of GETDATE() end in a 3, which is why it was unpredictable.
SQL considers DATETIME...
August 25, 2023 at 11:10 pm
Do you want the devices with the max syncdate, or the max syncdate per device ? Your test data returns the same either way.
The max syncdate is 2023-08-23. If you...
August 23, 2023 at 5:14 pm
Identify the ins_nums, then join/semi join back to the table.
SELECT i.ins_num
, i.pat_id
, i.bp_id
...
July 17, 2023 at 3:06 pm
Does this work?
DROP TABLE IF EXISTS #tb_pat_ins
CREATE TABLE #tb_pat_ins
( pat_ID INT,
ins_num VARCHAR(20)
)
INSERT #tb_pat_ins (pat_ID,ins_num)
VALUES (111807 , '100449401H'),
(461261, '100449401H'),
(106820,...
July 13, 2023 at 7:13 pm
sql server is very old uses query analyzer , i attache also my code , any help suggestion more than welcome and appreciated.
Do you mean Query Analyzer that came...
April 21, 2023 at 2:55 pm
I still don't understand why an AWS server that costs more per month to rent than the entire cost of buying my laptop new should take 10 times longer...
March 31, 2023 at 11:45 pm
The explicit cast to varchar(15) is potentially truncating longer values, with either normal or special characters after the 15th position.
If the Tenant_ID is always supposed to be a number, you...
March 29, 2023 at 5:44 pm
Edit. Solution above
March 21, 2023 at 2:57 pm
Viewing 15 posts - 76 through 90 (of 417 total)