Viewing 15 posts - 451 through 465 (of 485 total)
The neatest is to use a function that splits the string. (i.e like the split function in VB) Such a function can be used in lots of places in an...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 16, 2002 at 7:21 am
This is a bit neater
like replicate('[A-F0-9/-]',36)
You needed to check for the - as well, or you could replace them with nothing.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 16, 2002 at 6:56 am
I would add that when you get above 2 columns and are using FKs then you will be giving yourself alot of heartache by using composite keys, more data, more...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 16, 2002 at 6:45 am
To import image data you can you the textcopy utility. You need to populate the table with rows and then run textcopy for each jpeg you want to import
Simon Sabin
Co-author...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 16, 2002 at 4:40 am
The two options are as already mentioned both have pros and cons
user defined function
Allows security to be defined at stored procedure level not table level
dynamic sql
Is...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 15, 2002 at 3:54 pm
Further more dynamic SQL involving variables should be executed with sp_executesql
i.e select * from (@table) where column = @value.
If @table and @value are passed in then the code should...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 15, 2002 at 3:47 pm
If you just wanted one row you can use the feature of the update statement to update a local variable.
i.e
UPDATE myTable
@concat = CASE WHEN @concat iS NULL THEN col ELSE...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 15, 2002 at 8:36 am
He's right commas are only valid for money datatypes, this also applies when outputing values to strings the style property only works for money datatypes,
i.e.
select CONVERT (varchar(10),4343.00,1)
select CONVERT (varchar(10),cast(4343.00 as...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 2:30 pm
I agree that they must include some set base operations into TSQL either via TSQL or via CLR code. The need one for XML, OPENXML currently uses the MSXML parser,...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 2:20 pm
Just a serious case of deja vu.
OPENXML has been bolted on to all versions, it is probably just that in NT the memory management is better. It is nice to...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 2:05 pm
Ok the problem I think is now that the codepage of the database does not match that of the client. I believe you will have to change either one. One...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 1:39 pm
declare @i int
select @i = count(*) * rand() + 1 from mytable
select @i
select top 1 *
from myTable mt1
where @i = (select count(*) from myTable mt2 where...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 1:30 pm
You need to wrap the following code around your trigger code
Put this at the start
declare @idValue char(10)
select @idvalue = cast(@@identity as char)
And this at...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 1:02 pm
We had a Yukon demo a few months ago at the UK User group meeting by by Euan Garden and Patrick Conlan. It was stated that for standard data manipulation,...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 13, 2002 at 4:14 pm
When you create a parameter for any string variable, char, nchar, varchar, nvarchar, text of ntext you have to specify a length. The simplest solution in your case would be...
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 13, 2002 at 3:37 pm
Viewing 15 posts - 451 through 465 (of 485 total)