Viewing 15 posts - 14,116 through 14,130 (of 15,381 total)
How about:
SELECT ISNUMERIC(DataValue), DataValue
FROM (Select datavalue = 'l999999999999999') a
If you need to get actual int data and varchar data depending on the contents of a varchar field you...
August 30, 2011 at 12:55 pm
You are going to have to join this table back to itself. This is pretty basic. give it a try and post back what you tried. Yes, I could write...
August 30, 2011 at 12:35 pm
wolfkillj (8/30/2011)
Francis McFaul (8/29/2011)
I think that most of their Developers are application developers who know some Transact-SQL. I haven't heard of any dedicated SQL Server database developers, only...
August 30, 2011 at 12:13 pm
I will admit to using lmgtfy a few times. This is typically in response to questions like "What is the largest number an integer can hold?". Something so pathetic as...
August 30, 2011 at 11:55 am
Well it seem pretty obvious that one of your queries is taking too long and timing out. You have several procs calls in this. You should probably start by isolating...
August 30, 2011 at 10:41 am
How about some ddl and a few sample rows with expected output? It should be pretty simple but it is a LOT easier on us if we have something to...
August 30, 2011 at 9:42 am
So don't convert to varchar at all and let your front end handle the formatting.
SELECT *
FROM (SELECT ID, Amt, Dt
FROM @Budget) AS B
PIVOT ( SUM(Amt)
FOR Dt IN ( [08/30/2011],
[08/31/2011],
[09/01/2011],
[09/02/2011],
[09/03/2011])) as...
August 30, 2011 at 9:29 am
For that matter you could probably just skip the temp table like this:
update CurrentCategoryList set CurrentCategoryList.TotalUnitSoldNational = SUM(ProductSales.UnitsSold)
FROM CurrentCategoryList INNER JOIN
CategoryProductRel ON CurrentCategoryList.CategoryID = CategoryProductRel.CategoryID INNER JOIN
ProductSales ON CategoryProductRel.ProductID...
August 30, 2011 at 9:24 am
Can you format it in the front end? That is the preferred location to handle formatting.
August 30, 2011 at 9:18 am
Correct me if I am wrong but wouldn't this code make your data pretty useless if you run it more than once? You are updating a column in a table...
August 30, 2011 at 9:16 am
That is a service pack link. Of course that will not contain SSMS. Google SQL Server Download and click the first link. It will take you to the MS sql...
August 30, 2011 at 9:11 am
Krasavita (8/30/2011)
Thank you, the code is working but not 100%Here is my data 794546,794548,794549
Results I get:4 794546,794548,7945
So given that input what are you looking for as output? You first example...
August 30, 2011 at 8:54 am
MID is not a sql function either. You will have to use substring instead.
August 30, 2011 at 8:29 am
TheSQLGuru (8/30/2011)
August 30, 2011 at 7:40 am
If you noticed in my example my type is a table with a single integer column. That allows the flexibility to be used anytime I need a list of integers....
August 30, 2011 at 7:36 am
Viewing 15 posts - 14,116 through 14,130 (of 15,381 total)