Viewing 15 posts - 301 through 315 (of 430 total)
--===== A nasty fast solution to convert to the DATETIME data type. SELECT * ,ConvertedDateTime = DATETIMEFROMPARTS(IntDate/10000, IntDate/100%100, IntDate%100 --Date ,IntTime/10000, IntTime/100%100, IntTime%100 --Time ,0) --Milleseconds FROM #TestTable...
March 17, 2022 at 10:45 pm
If you store times as integers, it makes life much easier if you have a time table containing all the formats you need, however, if you need to just change...
March 17, 2022 at 6:46 pm
I think the OP's problem is the inclusion of procvaldate in the partition by. The output will be 1 for all rows. If procvaldate is removed from the partition, then...
March 11, 2022 at 5:22 pm
I strongly recommend against any and all use of FORMAT.l.
Noted. I almost didn’t suggest it, because I thought I remembered you saying something similar in the past. I only...
March 10, 2022 at 2:44 am
Can you use FORMAT? I have only ever used it in ad-hoc queries to make numbers easier to read, and I can't vouch for its performance, but it seems to...
March 9, 2022 at 8:51 pm
This is a SQL Server forum, not MySQL and I know nothing about MySQL.
At a guess I would say you are not connected to the database or service, It says...
March 9, 2022 at 8:36 pm
I found that you can include up to column c0308. Any more and the row size exceeds 8060.
If the table is empty the problem doesn't happen.
If the columns are populated...
March 8, 2022 at 8:48 pm
The values in the CSV are interest rates so they will always be of the form 0.something. I even tried [RATE_MONTH_2] [numeric](11, 9) NULL and still same issue.
Have you...
March 7, 2022 at 11:17 pm
If your code works for a specific object, can you grant the permission on a schema / all schemas, rather than specific objects?
GRANT EXECUTE ON SCHEMA::[dbo] TO...
March 4, 2022 at 6:59 pm
Yes. I just set the compatibility of a database to 2012 and ran the code in the link you supplied and it worked fine. I believe that SQL 2016 is...
March 4, 2022 at 6:10 pm
Can you create a column in your data set that is a 1 if the case is before 4:40 and a zero if after, then sum that column as your...
February 25, 2022 at 10:54 pm
I don't think any date functions return a decimal.
Either of these might work.
SELECT TOP 100 [name], create_date,
DATEPART(hour, create_date),
...
February 25, 2022 at 4:15 pm
Does the public role have read access to those tables? I don't think you can remove a user from public.
You could create a new role, add the user to the...
February 25, 2022 at 3:58 pm
You original post talked about 1's and 0's. You've now post data with only 1's and haven't posted the result that you're looking for. I don't know about anyone...
February 24, 2022 at 7:01 pm
SELECT GivenPartNumber_Non, vcompanyid, MAX(SourceType) AS 'SourceType'
FROM #notmappedsources
GROUP BY GivenPartNumber_Non, vcompanyid
HAVING MAX(SourceType) = 484456
AND MIN(SourceType) = 484456
and for fun.
DECLARE...
February 24, 2022 at 1:45 am
Viewing 15 posts - 301 through 315 (of 430 total)