Viewing 15 posts - 3,481 through 3,495 (of 8,731 total)
I've heard that legislation might be an issue for some industries.
In Mexico, banks can't have their information outside of their physical locations.
January 25, 2016 at 10:19 am
ben.brugman (1/25/2016)
ChrisM@Work (1/25/2016)
How can the code return incorrect results, Ben? Am I missing something here?
The name of the month is language dependend. This often leads to trouble.
When storing a date...
January 25, 2016 at 10:14 am
ben.brugman (1/25/2016)
Luis Cazares (1/25/2016)
the problem often relies on keeping the default (us_english)
I do strongly object to the notion that the default language is English.
I know in almost all science...
January 25, 2016 at 10:08 am
You can use the sys.index_columns view.
Select i.name AS index_name,
c.name AS column_name
FROM sys.indexes i
JOIN sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id
JOIN sys.columns c...
January 25, 2016 at 9:51 am
Certainly Ben, language settings can be a problem. However, the problem often relies on keeping the default (us_english) rather than setting a foreign and unexpected language.
The code might need...
January 25, 2016 at 9:08 am
ChrisM@Work (1/25/2016)
jcachado (1/25/2016)
Dim SQLStringtempprd123 As String = "SELECT CAST([create_dtim],'dd-mm-yyyy'),COUNT(*) AS tot FROM Back_ickpt_prd1 WHERE CAST([create_dtim],'dd-mm-yyyy')...
January 25, 2016 at 8:23 am
Of course, there's a syntax error as you're following the FORMAT syntax instead of the CAST syntax.
January 25, 2016 at 8:09 am
Please, post the statement using CAST that won't work. Also, post DDL and sample data to know the data types and be able to test with data close to reality.
January 25, 2016 at 7:58 am
We wouldn't insist if it didn't work. Here's an example:
SELECT create_dtim = ABS(CHECKSUM(NEWID())) % 7 + CAST( '20160117' AS datetime)
INTO #Back_ickpt_prd1
FROM sys.all_columns...
January 25, 2016 at 7:56 am
The order is working fine, because you're ordering strings not dates. That's why 05 comes before 04 and so on.
Take our advice, replace FORMAT with CAST and you'll solve your...
January 25, 2016 at 7:48 am
You should also alias your columns and use the alias in the ORDER BY.
SELECT CAST(create_dtim AS DATE) AS create_date,
COUNT(*) AS tot
FROM Back_ickpt_prd1
WHERE CAST(create_dtim AS DATE) BETWEEN '20160121'...
January 25, 2016 at 7:27 am
Another option:
SELECT UPPER( REPLACE( CONVERT(char(11), GETDATE(), 106), ' ', '-'))
January 25, 2016 at 7:20 am
The sysname columns are defined as not nullable.
January 22, 2016 at 11:12 am
Brandie Tarvin (1/22/2016)
Luis Cazares (1/22/2016)
You're effectively not inserting any null values explicitly, but you were missing the...
January 22, 2016 at 10:41 am
A view is nothing else than a saved query. It has no compilation by itself and it's not aware of the values stored in the underlying tables.
That said, somewhere in...
January 22, 2016 at 9:56 am
Viewing 15 posts - 3,481 through 3,495 (of 8,731 total)