Viewing 15 posts - 211 through 225 (of 358 total)
September 1, 2008 at 5:47 pm
I think the problem you are facing is that an int / int produces an int. Take the following examples...
select 3/2
select 3/2.0
To fix the issue multiply one of your...
September 1, 2008 at 8:20 am
Yes. You need a Begin/End when using multiple statements.
IF (1=1)
Begin
insert...
update...
END
ELSE
Begin
...
August 31, 2008 at 11:52 am
Here is the link on how to upgrade using the attach/detach method.
http://msdn.microsoft.com/en-us/library/ms189625(SQL.90).aspx
August 30, 2008 at 12:01 pm
Try this. What is the datatype of the CCNum Column? It does not sound like a uniqueidentifier.
Select Right(stuff(CCNUM,1,12,replicate('X',12)),16)
From YourTable
August 27, 2008 at 9:56 am
The script that creates the new guid is just for example. Use the logic in the select statment on your credit card field.
Select Right(stuff(CCNUM,1,32,replicate('X',32)),16)
From YourTable
August 27, 2008 at 8:59 am
How about something like this.
Declare @tst uniqueidentifier
Set @tst = newid()
Select @tst
Select Right(stuff(@tst,1,32,replicate('X',32)),16)
August 27, 2008 at 8:36 am
I think you would have to use a case statement to achieve the same funtionality. If the datatypes are different you can convert them to a commen type in the...
August 25, 2008 at 8:28 pm
Pretty cool Jonathan. Yet another reason to upgrade to 2008.
August 14, 2008 at 7:02 am
rbarryyoung (8/12/2008)
Heh. You know, if you actually type "TPC Cursor" (with the quotes) into Google, the result is pretty funny.
That is pretty funny. (1 result to this thread)
August 12, 2008 at 2:54 pm
Here is an example of a cursor outperfoming a set based solution. I am not saying it can be done often, but I never say something can't be done.
August 12, 2008 at 2:33 pm
I was going to throw a rock at the hornets nest and run, but I will chime in. I seem to write code a lot more "loosely" when I...
August 12, 2008 at 2:03 pm
rbarryyoung (8/6/2008)
DDL statements do not usually accept a Database name.
I was able to disable a trigger on my test database using the dbname..tablename syntax. I wonder if it is...
August 6, 2008 at 9:50 pm
The syntax looks correct. Make sure you do not have the code partially highlighted or you may get this error message.
August 6, 2008 at 9:05 pm
I have altered the script to list all users in all databases that do not have a matching user in the master database.
DECLARE @Collation varchar(100)
DECLARE @sql VARCHAR(2000)
CREATE TABLE...
August 2, 2008 at 9:52 pm
Viewing 15 posts - 211 through 225 (of 358 total)