Viewing 15 posts - 1,576 through 1,590 (of 1,923 total)
Again, without seeing your BREED table and K9 table how are we to assume what data is in, where you are going wrong and what we can do for you.
Please...
May 11, 2010 at 3:28 am
I din't understand your requirement clearly; But stil, as far as i understood, here is a piece of cdoe that might interest you.
Look at how i am posting the data...
May 11, 2010 at 3:21 am
Chris Morris-439714 (5/11/2010)
Can you post a sample table script...
May 11, 2010 at 3:06 am
Subhro,
There is a REPLACE operation followed by the CAST in my code.
REPLACE will replace a set of characters , with a replacement value , on the string in which...
May 10, 2010 at 11:06 pm
Subhro, you probably have not used my edited code.. please run my code in my prevoius post (i have updated it) and check with your dsired result! THe first image...
May 10, 2010 at 7:51 am
Subhro, you need to first strip the occurence "cnt" using string functions like "STUFF" or "REPLACE" or "SUBSTRING" and then type-cast. Here is a code that will produce the result...
May 10, 2010 at 7:23 am
Manju, as i promised, here is the script ; U can run this from Query Editor itself
SET NOCOUNT ON;
DECLARE @SCRIPTS TABLE (SCRIPT_NAME_LOCATION VARCHAR(100))
INSERT INTO @SCRIPTS
EXEC master..xp_cmdshell 'dir /b /s...
May 10, 2010 at 5:19 am
manjushree.nimbalkar (5/10/2010)
Hey,Thanks for such quick reply. If in case some error occurs in one of the script, where will it get logged?
Manju, replace %LOG% location with something like "C:\Temp\Logfile.log"; This...
May 10, 2010 at 4:04 am
Hi, there is something called OSQL utility which allows us to run .sql files from the command prompt. So , what you can do is,
1. Do a "DIR" on...
May 10, 2010 at 3:43 am
To add to Mark's reply, you have to use ISNULL with NULLIF to get that replacement of 0 to 1; like
ISNULL( NULLIF(oe_line.unit_price,0) , 1)
Cheers!
May 10, 2010 at 3:03 am
Jeff Moden (5/9/2010)
it still takes me too long to write good SQL. 😛
Modesty is your virtue!:-)
May 9, 2010 at 11:16 pm
Nagesh S-432384 (5/7/2010)
May 7, 2010 at 9:04 am
This will get you there!
;WITH CTE AS
(
SELECT ROW_NUMBER() OVER(PARTITION BY SIZE ORDER BY ID) RN , ID, SIZE FROM @table
)
DELETE FROM CTE WHERE RN <> 1
Hope this helps!
Cheers!
May 7, 2010 at 6:56 am
Gian's code is fast and furios 🙂 that should do!
May 7, 2010 at 6:32 am
Viewing 15 posts - 1,576 through 1,590 (of 1,923 total)