Viewing 15 posts - 31 through 45 (of 121 total)
There is no way to do like this but you can use sometrick like user space (or some special character) while replacing.
for example..
CREATE TABLE Asset(
AssetId INT,
AssetName)
here to replace 'Asset'...
February 26, 2009 at 2:35 am
It seems you want to loop through all records in #consultantTemp table. But I think it will not work this way. Either you have to use CURSOR for this...
February 25, 2009 at 6:05 am
🙂
Inner table(with UNION ALL) is for example only. You can use your table inplace of TmpTable..
something like this
Select SELECT SUBSTRING(yourColumnName, 1, LEN(yourColumnName) - CHARINDEX('.', REVERSE(yourColumnName)))
FROM yourTableName
February 17, 2009 at 3:52 am
Try this
SELECT SUBSTRING(s, 1, LEN(s) - CHARINDEX('.', REVERSE(s)))
FROM
(
SELECT '1' as s
UNION ALL SELECT '1.1'
UNION ALL SELECT '1.1.1'
UNION ALL SELECT '1.1.10'
UNION ALL SELECT '1.1.11'
UNION ALL SELECT '1.1.12'
)...
February 17, 2009 at 3:09 am
Use below script
DECLARE @max-2 INT, @cnt INT
DECLARE @queryString VARCHAR(MAX)
DECLARE @Query TABLE (id INT IDENTITY, queryString VARCHAR(MAX))
INSERT INTO @Query(queryString)
SELECT 'SELECT * FROM TAB1' UNION SELECT 'SELECT...
February 16, 2009 at 2:35 am
Yes it is possible using WHILE loop and temporary table (or table variable).
February 16, 2009 at 2:30 am
I am not sure what exactly you want? Do you want latest record for Id or latest record for each month? From your example it seems you want latest record...
February 11, 2009 at 2:28 am
As far as I know, DELETE frees up the pages, but it doesn't reduce the .mdf file size. It will still remain as available space in file.
February 11, 2009 at 2:05 am
I hope you have read the solution on the post which I have given...
If not then here is the solution
DECLARE @s-2 VARCHAR(100)
SET @s-2 = 'D:\backup\databasename\Backupname.bak'
SELECT SUBSTRING(@s,...
February 3, 2009 at 3:56 am
Then I think you need to do something while converting to XML. It has nothing to do with SQL statement.
I think return data as string from SQL sql and then...
February 3, 2009 at 3:54 am
Read whole post. It has your answer as well in posts.
February 3, 2009 at 3:29 am
check this post.
http://www.sqlservercentral.com/Forums/Topic635219-146-1.aspx#bm635460
It has all your answers.
February 3, 2009 at 3:15 am
Are you reading data in dataset and then converting to XML or generating XML from SQL (using FOR XML)?
February 3, 2009 at 3:09 am
February 3, 2009 at 2:51 am
Use CONVERT (data_type , expression , style) function with style=20 or 120 or 21 or 121
February 3, 2009 at 2:46 am
Viewing 15 posts - 31 through 45 (of 121 total)