Viewing 15 posts - 166 through 180 (of 346 total)
Thanks for posting the modified code Travis. This is a neater implementation and something that I'd also be re-using 🙂
August 20, 2009 at 2:15 am
It looks like you are trying to compare NULL values - and you cannot equate two NULL values...
I've put some sample code below - let me know if this is...
August 19, 2009 at 5:50 am
There is another convoluted way of getting this - http://www.sqlservercentral.com/Forums/Topic550843-145-2.aspx#bm605174
August 19, 2009 at 5:24 am
I've had this explained to me before but as usual have forgotten the reason and what causes this and am unable to find any relevant material...I think this happens because...
August 17, 2009 at 2:21 pm
Another option I use to quickly generate insert/select statements is to generate them dynamically...
Something like this:
DECLARE @TableName sysname;
DECLARE @sql nvarchar(max);
SET @TableName = 'ProductPhoto';
SET @sql = '';
SELECT...
August 17, 2009 at 11:35 am
All this information can be obtained from the system tables...the query below is one way of getting the information needed:
SELECT
OBJECT_NAME(si.object_id) TableName,
sc.name ColumnName,
si.name IndexName,
type_desc IndexType,
is_primary_key IsPrimaryKey,
st.name ColumnDataType
FROM sys.indexes si INNER...
August 17, 2009 at 11:27 am
Here's one way to go about this:
DECLARE @Values varchar(100)
SET @Values = 'Male,Female,xxx,yyy,z,a,b,c,tt'
SELECT @Values, REPLACE(QUOTENAME(@Values,''''),',',''',''')
I'd also recommend http://www.sommarskog.se/arrays-in-sql-2005.html for some very good information on how to handle arrays and lists in...
August 15, 2009 at 4:06 am
Did you put in some XML in your post? Looks like it got stripped out (or isn't rendering in my browser)...
Could you wrap your XML within the code="xml" and /code...
August 12, 2009 at 12:44 pm
I seem to understand what you are looking for...however I can't find any tables that store the schedule id from which a job is invoked...
There is a table - msdb.dbo.sysjobactivity...
August 11, 2009 at 2:34 pm
You can try the sp_help_jobschedule stored procedure(if this gives you what you were looking for)...
August 11, 2009 at 12:44 pm
Looks like some sort of connectivity issue...
a) Is SQL Browser enabled?
b) Are remote connections enabled (in SQL 2005 this is done via Surface Area Configuration Manager)
c) What happens when you...
June 8, 2009 at 1:28 pm
um....could you also let us know what error you see if you execute your xp_cmdshell script without the no_output parameter?
June 4, 2009 at 6:27 am
I agree with Florian - xp_cmdshell is useful in situations (like the example given)...
Bhuvnesh - I only suggested that you could use SQL CLR instead...samples on SQL CLR are available...
June 4, 2009 at 6:05 am
Do you get any error messages if you don't use the "no_output" parameter with xp_cmdshell? i.e. run the xp_cmdshell by omitting the no_output parameter.
It could be that the account the...
June 4, 2009 at 5:12 am
Does this help? The code below does nothing for character comparisons - it just matches integer values...
One thing to note with ISNUMERIC - it will return true for values like...
February 25, 2009 at 12:31 pm
Viewing 15 posts - 166 through 180 (of 346 total)