Viewing 15 posts - 4,666 through 4,680 (of 5,504 total)
Within SQL Server the max precision (or "length") of a number is 38.
So, you could use
SELECT convert(numeric(38,0),cast(@t AS float))
But you have to be careful for several reasons:
1) if you...
December 22, 2009 at 1:16 am
What level of experience do you have with SQL Server?
If none or limited, I recommend to either get some training or to have a 3rd party involved doing the conversion...
December 22, 2009 at 12:23 am
Did you consider BOL (BokksOnLine, the SQL Server help file) as a source?
Please see chapter "cross apply" for details. There is an example as well.
Even though the example shows the...
December 22, 2009 at 12:16 am
The beginning of the XML (<bookstore='MomnPop' ) is not considered as a well formed xml.
For two reasons:
1) you cannot assign a value to an element if you assign attributes to...
December 21, 2009 at 4:07 pm
Several questions:
1) Does "4 weeks" mean to calculate the average for full weeks or is 4 weeks = last 28 days? Based on your example: Dec. 15th is a Tuesday....
December 21, 2009 at 5:43 am
Did you read the articles I referred to in my previous post?
What help do you need exactly? If it's a "how to" in general, I would recommend you try the...
December 18, 2009 at 12:08 pm
closing bracket before the GROUP BY is missing.
AND ( [tblGL code percent cost allocation].[GL Code] = [tblGL Codes (Determine GL 2)].[GL 2] )
Note: This would be much easier to find...
December 18, 2009 at 8:31 am
Would you mind sharing some sample data for column [description] representing some input scenarios (e.g. 10 to 20) together with expected results per row?
Do you have a guaranteed order of...
December 18, 2009 at 8:13 am
Even though I still don't know why an integer column needs to be converted into a character data type... Here's how I'd do it if I'd be forced to:
Step 0:
Verify,...
December 18, 2009 at 7:51 am
Sandy,
like Chris mentioned before, we'd like to see your input data as well as your expected results. The "sample" you provided is everything but clear.
Example:
Sample1
XYZ
111,29th Main, ABCD - 10002
What does...
December 18, 2009 at 6:28 am
Update YourTable
SET YourTable.Col1 = ' '
WHERE YourTable.Col1 < 0
But there are (at least) two remaining question:
If you care about performance, why do you want to use a character (space) within...
December 18, 2009 at 6:16 am
You can receive the data from SQL Server by using the FOR XML clause. With some additional effort it's even possible to get complete html pages (but text formatting would...
December 18, 2009 at 4:41 am
Try to query as unicode data format:
like N'??????????' (or like N'%????????%' if you'd need to use wildcards)
instead of
like '??????????'
Hope that helps.
December 16, 2009 at 2:39 pm
As asked for before: table def and some sample data, please.
Preferred in a ready to use format as described in the aforementioned article.
And no, there is no function like...
December 13, 2009 at 5:08 am
Viewing 15 posts - 4,666 through 4,680 (of 5,504 total)