Viewing 15 posts - 31 through 45 (of 2,893 total)
What about some change makes it to be 7-parts? Then, few months later, 8-parts?
If you want to be dynamic and a bit more simpler, do this:
SELECT TOP 1...
January 21, 2015 at 6:33 am
Tex-166085 (1/21/2015)
wow, thanks for all the replies, I will work through them in my lunch hour. Yes, I cannot say how high each of the digits will go. It...
January 21, 2015 at 5:11 am
...
Elementary;-)
😎
Not quite so, try ('1.0.100')
😉
January 21, 2015 at 4:53 am
If your data always three-parts you can do:
SELECT TOP 1 THREE_PART_NUM
FROM @SAMPLE_DATA SD
ORDER BY CAST(PARSENAME(THREE_PART_NUM,3) AS INT) DESC
,CAST(PARSENAME(THREE_PART_NUM,2) AS INT) DESC
...
January 21, 2015 at 4:46 am
Eirikur Eiriksson (1/21/2015)
Tex-166085 (1/21/2015)
I need to return the max value from a fieldwhich contains a three part numeric, stored as a varchar. For example
1.0.0
1.0.1
1.1.0
1.2.1
2.0.0
2.1.1
etc
These represent processes, and sub...
January 21, 2015 at 4:39 am
...
Why not just skip the process altogether and simply calculate the current user account balance directly when needed( thus normalizing your data model in the process)?
Edit: Unless of course...
January 21, 2015 at 3:28 am
Both are good to me, plus:
product_id
... as per column name convention in system tables ...
January 20, 2015 at 5:33 am
John Mitchell-245523 (1/20/2015)
January 20, 2015 at 5:20 am
I would not advice doing that, but I think it is possible by altering the error message template in sys.messages
eg:
select * from bucs.sys.messages where text like '%constraint%'
Just remember, it...
January 20, 2015 at 3:54 am
@hr is just the name of the variable to store result of the sp_OACreate proc.
As per BoL (http://msdn.microsoft.com/en-us/library/ms189763.aspx), this proc returns HRESULT, so @hr is just choosen as it...
January 20, 2015 at 3:36 am
looks like home work to me...
Please try your best, post what you manage to come up with and we will be able to give you guidance to make it better.
January 19, 2015 at 10:14 am
sonchoix (1/19/2015)
select datediff(wk, '2015-01-11', '2015-01-19') returns 1 (shouldn't it return 2?)select datediff(wk, '2015-01-10', '2015-01-19') returns 2
Thanks
As per BoL: "DATEDIFF ... Returns the count (signed integer) of the specified datepart boundaries...
January 19, 2015 at 10:12 am
You can use PIVOT if you wish:
;WITH YourQuery
AS
( -- Put your query here:
SELECT *
FROM (VALUES (1,'Low',8137),
...
January 19, 2015 at 8:52 am
BrainDonor (1/19/2015)
Mauricio_ (1/19/2015)
I have a question regarding performance. I need to alter several tables, changing columns from decimal(18,4) to decimal(19,8). Some of the tables...
January 19, 2015 at 4:33 am
Just to make it clear:
Q: If there is an update occurred on Employees, does it create an inserted table with 10 columns as well, having an exact column structure as...
January 19, 2015 at 4:29 am
Viewing 15 posts - 31 through 45 (of 2,893 total)