Viewing 15 posts - 31 through 45 (of 187 total)
Exactly a scenario that happens in our environments. Thanks for the question!
February 7, 2011 at 1:20 am
All WHEN clauses need logical statements, though CASE statements deliver typically a value. To solve this, change the script this way:
ship year = CASE ship month()
WHEN ...
January 19, 2011 at 8:46 am
Copying just the entire SQL query text without any table desc often won't result in many replies, like this time.
However, I see State is in this query an alias, in...
January 19, 2011 at 8:40 am
28 views, no replies... I think that shows you probably should explain a bit better your question, with an example if possible.
December 17, 2010 at 2:58 am
I did the right guess! 🙂
10 Years ago I wasn't SQL Server aware, since then I upgraded myself a few times to what I am now...
August 13, 2010 at 12:57 am
Nice question! I got it wrong, because I misinterpreted the HAVING clause; I read it as WHERE Col >= 5, and that leads to a value of 2. I knew...
June 7, 2010 at 4:17 am
Carlo Romagnano (5/28/2010)
Try this:select*from sysobjects order by 1desc
No space in 1desc
I've seen that too before, same like this:
declare @a int set @a=1select @a
However, select1...
May 28, 2010 at 2:18 am
Arto Kainu (5/27/2010)
I'm having quite a strange problem, in every other sql server version it works, but this one version throws an error when I'm trying to run a...
May 27, 2010 at 4:49 am
I got the answer correct for the wrong reason... This really surprises me and definitely learned a lot from this! Shows how important it is to always convert your data...
May 4, 2010 at 5:04 am
Great question!
Amazing how many people said 1859... Only halfway through WWII computers were really programmable (and used for military reasons) and the word was used as such... BTW programmers...
April 23, 2010 at 4:44 am
I changed your code, so it works. I also added ordinal_position, so the order of the columns is slightly more logical. You might need to improvie this code a bit...
April 22, 2010 at 5:17 am
DECIMAL(37,12) will have a precision of 37 digits, of which 12 are decimal.
So 10,000,000,000,000,000,000,000,000.000000000001 will be accepted and not truncated (and also negatives). If you need a column for my...
April 13, 2010 at 10:55 am
Another thing, convert dates into datetime like 04/01/2008 could lead into even more unexpected results. All in all, I would use this approach:
INSERT #rt_planTMP (departman, planlanangun)
SELECT 1, gunler
FROM #p_calismagunleri
WHERE gunler...
April 13, 2010 at 10:08 am
You could use float, but I wouldn't recommend that. If you use an insane high precision/scale (like DECIMAL(37,12)), it shouldn't give you problems?
April 13, 2010 at 9:15 am
After all, the code worked. But if you're going to post more questions, it will be very appreciated if you post DDL as in the link below, on which server(s)...
April 13, 2010 at 9:11 am
Viewing 15 posts - 31 through 45 (of 187 total)