Viewing 15 posts - 1 through 15 (of 51 total)
Lynn Pettis (12/9/2009)
Would help if you posted your code. Not much help otherwise.
I have worked on .NET a little so tried to provide a solution to the OP. I...
December 9, 2009 at 2:09 pm
Do you always have to check for StageID=0 OR StageID=1??
If yes, then I would make your StageID parameter passed to the SP as int and change the SP to look...
December 9, 2009 at 2:01 pm
What is the output you are getting when you run this in SSMS? I am thinking 12 rows affected is 12 line of errors not the number of rows from...
December 4, 2009 at 9:53 am
As per BOL syntax for xp_cmshell is
xp_cmdshell { 'command_string' } [ , no_output ]
Try putting your bcp command in quotes like this:
EXEC master..xp_cmdshell 'bcp "SELECT * FROM menus.dbo.ri_res WHERE...
December 3, 2009 at 5:04 pm
Exec @Result = p_myproc1
running this code executes the SP p_myproc1 and gets the status of the SP p_myproc1 in the @Result. 0 means p_myproc1 executed successfully. If you want...
December 2, 2009 at 4:16 pm
Slick84 (11/24/2009)
I get all zeroes.CHARINDEX(CHAR(9), ItemNo, 0)
Btw.. do I change the 9?
Is "ItemNo" the right column name? Just wanted to make sure. 🙂
November 24, 2009 at 2:45 pm
yes, change 9 to 10 and change 9 to 13. do you get zeroes for both?
November 24, 2009 at 2:09 pm
Can you pls. run the below query?
SELECT CHARINDEX(CHAR(9),Column4, 0) FROM [server].[db].[dbo].[view]
Do you get values other than 0 in the result set? If yes than you don't have trailing spaces...
November 24, 2009 at 1:33 pm
Slick84 (11/24/2009)
I'm trying to trim the trailing spaces in my column data using below t-sql.
MAX(LTRIM(RTRIM(column_Name)))
Addt'l info, I use the max keyword to successfully group my data. Could the max be...
November 24, 2009 at 9:48 am
Thanks for taking the time out to explain Lutz, appreciate it.
Thanks,
Supriya
November 13, 2009 at 1:58 pm
lmu92 (11/12/2009)
It covers the issue of having code is null and location is not null.
Comparing the two row_number solutions will result in almost identical...
November 12, 2009 at 3:00 pm
@Lamprey13: Nice trick using Row_Number(); going in my file of "SQL tips and tricks" 🙂 It had one issue though, your script ignores the row say when code...
November 12, 2009 at 1:09 pm
How about something like this:
SELECT * FROM #tmp A
WHERE code IS NOT NULL
OR location IS NOT NULL
...
November 12, 2009 at 10:10 am
Lessons learned on my part too..I just wasted my precious time :pinch: advocating for someone who can't acknowledge his mistake and appreciate a good deed.
I also checked the other...
November 2, 2009 at 10:58 am
Viewing 15 posts - 1 through 15 (of 51 total)