Viewing 15 posts - 6,046 through 6,060 (of 8,731 total)
I'm not sure if this is what you're looking for.
DECLARE @Table1 TABLE(
Id char(1))
INSERT @Table1 VALUES('A'), ('B')
DECLARE @Table2 TABLE(
Id char(1),
...
July 30, 2014 at 4:05 pm
Something like this?
SELECT STUFF(( SELECT ', ' + '$' + STUFF( svalue, LEN( svalue) - 1, 0, '.') FROM (VALUES('1299'),('397'),('1500'),('11001'))x(svalue)
FOR
XML PATH('')
), 1, 2, ' ')
July 30, 2014 at 3:53 pm
mjuarezh36 (7/30/2014)
Actually we have an Enterprise based applications with MS-SQL2000 , we have microsoft Dinamycs (6.5) and several applications (vb.net 2005, 2010 y 2012), .
But now we plan to migrate...
July 30, 2014 at 3:26 pm
If you're receiving the values as a comma-separated list, then you should format them in the back-end. In other words, you need to format the values before the concatenation.
July 30, 2014 at 3:18 pm
The common way is to use ROW_NUMBER() within a CTE or subquery.
WITH CTE AS(
SELECT a.id,
a.first_name,
...
July 30, 2014 at 3:13 pm
Eirikur Eiriksson (7/30/2014)
Luis Cazares (7/30/2014)
Alvin Ramard (7/30/2014)
WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:The one that is shrinked regularly?
Guess shrinked is the simple mode and shrunken...
July 30, 2014 at 3:01 pm
Alvin Ramard (7/30/2014)
WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:
The one that is shrinked regularly?
July 30, 2014 at 2:47 pm
Don't forget to use NOLOCK hints on all your queries and never ever run DBCC CHECKD, update statistics or rebuild indexes. You might encounter a lot of objects locked during...
July 30, 2014 at 2:46 pm
You're missing the last 2 columns in your insert statement. You need to modify it to include those values.
July 30, 2014 at 12:47 pm
Xavon (7/30/2014)
patrickmcginnis59 10839 (7/30/2014)
Xavon (7/30/2014)
But you still can't use a variable before you declare it...This 'logic' makes my head hurt.
When that error is picked up, its actually checking to see...
July 30, 2014 at 11:57 am
July 30, 2014 at 11:04 am
And that's why it is considered best practice to include the column list of the destination table. Something like the following, but I don't know how the real structure of...
July 30, 2014 at 10:38 am
Why don't you use some TRY...CATCH... blocks?
Here's an example:
DECLARE @i int, @Error varchar(100) = ''
BEGIN TRY
SET @i = 'a'
END TRY
BEGIN CATCH
SET @Error...
July 29, 2014 at 4:25 pm
I often think of APPLY as a JOIN on steroids. 😀
Apply will allow you to use correlated subqueries as tables/views or columns from other tables as parameters of functions. I...
July 29, 2014 at 9:43 am
Viewing 15 posts - 6,046 through 6,060 (of 8,731 total)