Viewing 15 posts - 12,916 through 12,930 (of 13,460 total)
might be a better way, i did it this way because of the decimal point:
declare @SomeValue money
Set @SomeValue=740002.64
select right( '0000000000000' + CONVERT(varchar,convert(int,(@SomeValue * 100))),13) AS FinalAnswer
select right(REPLICATE('0', 13) + CONVERT(varchar,convert(int,(@SomeValue...
Lowell
November 8, 2006 at 12:42 pm
does this work?
change the last statement at the end to the following:
set @myAreaCode ='SELECT top 5 @myAreaCode = @myAreaCode + ISNULL(AreaCode,'') + ',' from @stage'
set @myAreaCode ='''
SELECT...
Lowell
November 8, 2006 at 12:28 pm
the normal Caveats for this question: you should do this at the presentation layer, whether it is an app or a web page, because it's easier.
here's one way to do...
Lowell
November 8, 2006 at 11:41 am
I was under the impression that you could exec any size command like this:
DECLARE @sql1 nvarchar(4000),
@sql2 nvarchar(4000),
@sql3 nvarchar(4000),
EXEC sp_executesql @sql1 + @sql2 + @sql3, N'@hDoc int, @p_blnTracking bit,...
Lowell
November 8, 2006 at 9:10 am
hope what i posted was helpful.
Lowell
November 7, 2006 at 9:04 pm
assuming that one machine can run as many instances as you want, but only 5 users, this might get you started:
in my poor example below, you can see that the...
Lowell
November 7, 2006 at 7:34 pm
yould want to use something like this:OBJECTPROPERTY(OBJECT_ID(OBJNAME), 'IsSchemaBound')=0 means false, and OBJECTPROPERTY(OBJECT_ID(OBJNAME), 'IsSchemaBound')=1 means true
so i'd use something like this for the cursor:
select name from sysobjects where xtype='V' and OBJECTPROPERTY(OBJECT_ID(NAME), 'IsSchemaBound')=0...
Lowell
November 7, 2006 at 10:05 am
It kind of sounds like he wants a limit for an application, to prevent more than 5 instances, instead of 5 users to the sql database.... am i right?
you'd still...
Lowell
November 7, 2006 at 9:03 am
i was originally going to post about the wonders of sp_recompile, but it didn't work as expected. I thought it recompiled dependant objects as well, causing a chain reaction, but...
Lowell
November 7, 2006 at 6:50 am
in SQL 2000 you can run sp_MSdependencies with no parameters to get the list of objects in a order of hierarchy, but it's not perfect if you have a circular ...
Lowell
November 6, 2006 at 1:57 pm
According to the Microsoft DLL search db (below)
File sqlsrv32.dll is released
2000.85.1117.00 for XP sp2
2000.85.1022.00 for Mdac2.8 or Windows 2003
same dll, two different...
Lowell
November 6, 2006 at 1:40 pm
here is a script i use to change collation for a db that is different than what i usually use.
note that the sample below has TOP 5 limitation to see...
Lowell
November 6, 2006 at 1:11 pm
SELECT
SYSOBJECTS.NAME AS TBLNAME,
SYSCOLUMNS.NAME AS COLNAME,
TYPE_NAME(SYSCOLUMNS.XTYPE) AS DATATYPE
FROM SYSOBJECTS
INNER JOIN SYSCOLUMNS ON SYSOBJECTS.ID=SYSCOLUMNS.ID
WHERE SYSOBJECTS.XTYPE='U'
AND TYPE_NAME(SYSCOLUMNS.XTYPE) IN ('VARCHAR','NVARCHAR','CHAR','NCHAR')
ORDER BY TBLNAME,COLNAME
Lowell
November 6, 2006 at 1:04 pm
i prefer to simply catch the results of sp_helptext PROCNAME into a recordset, and print hte results from that;
Sub a()
Dim sql As String
Dim rs5 As ADODB.Recordset
Set rs5...
Lowell
November 3, 2006 at 6:42 am
can't you just create a view and make the owner INFORMATION_SCHEMAS, so it shows up/is available everywhere? there's several articles and posts that mention doing that.
Lowell
November 3, 2006 at 6:15 am
Viewing 15 posts - 12,916 through 12,930 (of 13,460 total)