Viewing 15 posts - 31 through 45 (of 395 total)
What format would you prefer the data?
December 13, 2021 at 6:30 pm
The ConvoHrs table is coming from a vendor we have no control over.
December 13, 2021 at 6:29 pm
-- here are the basic DDLs for my two tables:
CREATE TABLE [portman].[dbo].[AgentHours](
[LoginEntryID] [int] IDENTITY(1,1) NOT NULL,
[DOMAIN] [varchar](4) NOT NULL,
[DATE] [date] NOT NULL,
[LOGIN TIMESTAMP] [datetime2](0) NULL,
[LOGOUT TIMESTAMP] [datetime2](0)...
December 13, 2021 at 5:53 pm
I think we may be on the right track but my data isn't presenting correctly. I'm getting (although the seconds are not visible, they are incorrect):
December 10, 2021 at 9:44 pm
Sorry... I see now and tried MAX and that took care of it... thanks!!
December 6, 2021 at 4:04 pm
This does not seem to work, the data returns like before:
SELECT [user_name], [created_at],
SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM'
FROM [Charter].[dbo].[ConvoHrs]
group by [user_name],[created_at]
order by [user_name]
December 6, 2021 at 3:41 pm
Thanks! One thing what if I need to add a field like [Date] (which I may want to do grouping on later)? It wants this added to the 'group by'...
December 6, 2021 at 3:33 pm
I can get the full name with this:
,LTRIM(RTRIM(SUBSTRING([user_name], CHARINDEX(')', [user_name]) + 1,
PATINDEX('%[+-][0-9]%', [user_name]) - (CHARINDEX(')', [user_name]) + 1)))) December 2, 2021 at 7:57 pm
That works and makes sense! Thanks!
November 23, 2021 at 5:59 pm
This is working:
SELECT * FROM (SELECT
c.clientname as 'Client',
c.BillingRateA as 'Rate',
b.BillingTypeA as 'Unit',
...
November 18, 2021 at 10:07 pm
Both BillingRateA and BillingRateB are decimal
CREATE TABLE [dbo].[Client](
[ClientID] [int] IDENTITY(1,1) NOT NULL,
[ClientName] [varchar](50) NOT NULL,
[MarketSegmentID] [int] NULL,
[BillingTypeA] [int] NULL,
[BillingRateA] [decimal](8, 2) NULL,
[BillingTypeB] [int] NULL,
[BillingRateB] [decimal](8, 2) NULL,
November 18, 2021 at 9:35 pm
November 18, 2021 at 9:20 pm
BillingRateB and BillinRateA are decimal. 49 rows are returned and there are 41 records in the table of which 8 in question do have a BillingRateB (and BillingRateA), but all...
November 18, 2021 at 8:56 pm
How can I pass in the date as a variable in the dynamic part of the SQL?:
--below is close but not working:
declare
@ColumnNames nvarchar(max),
...
November 3, 2021 at 7:11 pm
What is the code for the function DelimitedSplit8K?
October 29, 2021 at 7:34 pm
Viewing 15 posts - 31 through 45 (of 395 total)