SQL Server Freeze And Thaw Functions

Aug 20, 2007

Hi,
I saw in some websites that there are functions freeze and thaw in SQL server.I want to freeze the SQL server for some time and then use the thaw to unfreeze.I want to know how it could be done in SQL server 2005

Thanks in Advance

View 5 Replies


ADVERTISEMENT

Sql Server 2005 Machine Lockup/freeze Up

Mar 25, 2008


Our HP Proliant ML 330 G5 (3.0 Duo Core Xeon, 4 GBs RAM) server is running Windows 2003 R2 Standard 32 bit ( Win SP2) and SQL Server 2005 Standard (SQL SP2 €“ version 9.00.3054.00(Intel X86)). At random times every 1-14 days, our server will lock up. While the Windows Login screen or the standard Windows screen saver is viewable on the server still, the computer becomes completely non-responsive. The keyboard and mouse do not work and we can no longer connect to the server via a Terminal Service connection. We are able to ping the server while it is locked up though. The only way to get the server back up and running is by doing a hard power down and then power it back up.

Upon getting the server back up and running, everything goes back to working as normal with both Windows and SQL. There is nothing in any of the event logs indicating any type of issue prior to the server locking up. We are really at a loss on where to start troubleshooting this. We have no reason to think it is a hardware issue at this point but are not ruling that out.
Any ideas what we can do to start tracking down the cause of this problem?

View 3 Replies View Related

SQL Server 2005: CLR Functions Vs SQL Functions

May 26, 2006

I was playing around with the new SQL 2005 CLR functionality andremembered this discussion that I had with Erland Sommarskog concerningperformance of scalar UDFs some time ago (See "Calling sp_oa* infunction" in this newsgroup). In that discussion, Erland made thefollowing comment about UDFs in SQL 2005:[color=blue][color=green]>>The good news is that in SQL 2005, Microsoft has addressed several of[/color][/color]these issues, and the cost of a UDF is not as severe there. In fact fora complex expression, a UDF in written a CLR language may be fasterthanthe corresponding expression using built-in T-SQL functions.<<I thought the I would put this to the test using some of the same SQLas before, but adding a simple scalar CLR UDF into the mix. The testinvolved querying a simple table with about 300,000 rows. Thescenarios are as follows:(A) Use a simple CASE function to calculate a column(B) Use a simple CASE function to calculate a column and as a criterionin the WHERE clause(C) Use a scalar UDF to calculate a column(D) Use a scalar UDF to calculate a column and as a criterion in theWHERE clause(E) Use a scalar CLR UDF to calculate a column(F) Use a scalar CLR UDF to calculate a column and as a criterion inthe WHERE clauseA sample of the results is as follows (time in milliseconds):(295310 row(s) affected)A: 1563(150003 row(s) affected)B: 906(295310 row(s) affected)C: 2703(150003 row(s) affected)D: 2533(295310 row(s) affected)E: 2060(150003 row(s) affected)F: 2190The scalar CLR UDF function was significantly faster than the classicscalar UDF, even for this very simple function. Perhaps a more complexfunction would have shown even a greater difference. Based on this, Imust conclude that Erland was right. Of course, it's still faster tostick with basic built-in functions like CASE.In another test, I decided to run some queries to compare built-inaggregates vs. a couple of simple CLR aggregates as follows:(G) Calculate averages by group using the built-in AVG aggregate(H) Calculate averages by group using a CLR aggregate that similatesthe built-in AVG aggregate(I) Calculate a "trimmed" average by group (average excluding highestand lowest values) using built-in aggregates(J) Calculate a "trimmed" average by group using a CLR aggregatespecially designed for this purposeA sample of the results is as follows (time in milliseconds):(59 row(s) affected)G: 313(59 row(s) affected)H: 890(59 row(s) affected)I: 216(59 row(s) affected)J: 846It seems that the CLR aggregates came with a significant performancepenalty over the built-in aggregates. Perhaps they would pay off if Iwere attempting a very complex type of aggregation. However, at thispoint I'm going to shy away from using these unless I can't find a wayto do the calculation with standard SQL.In a way, I'm happy that basic SQL still seems to be the fastest way toget things done. With the addition of the new CLR functionality, Isuspect that MS may be giving us developers enough rope to comfortablyhang ourselves if we're not careful.Bill E.Hollywood, FL------------------------------------------------------------------------- table TestAssignment, about 300,000 rowsCREATE TABLE [dbo].[TestAssignment]([TestAssignmentID] [int] NOT NULL,[ProductID] [int] NULL,[PercentPassed] [int] NULL,CONSTRAINT [PK_TestAssignment] PRIMARY KEY CLUSTERED([TestAssignmentID] ASC)--Scalar UDF in SQLCREATE FUNCTION [dbo].[fnIsEven](@intValue int)RETURNS bitASBEGINDeclare @bitReturnValue bitIf @intValue % 2 = 0Set @bitReturnValue=1ElseSet @bitReturnValue=0RETURN @bitReturnValueEND--Scalar CLR UDF/*using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;public partial class UserDefinedFunctions{[Microsoft.SqlServer.Server.SqlFunction(IsDetermini stic=true,IsPrecise=true)]public static SqlBoolean IsEven(SqlInt32 value){if(value % 2 == 0){return true;}else{return false;}}};*/--Test #1--Scenario A - Query with calculated column--SELECT TestAssignmentID,CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END ASCalcColumnFROM TestAssignment--Scenario B - Query with calculated column as criterion--SELECT TestAssignmentID,CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END ASCalcColumnFROM TestAssignmentWHERE CASE WHEN TestAssignmentID % 2=0 THEN 1 ELSE 0 END=1--Scenario C - Query using scalar UDF--SELECT TestAssignmentID,dbo.fnIsEven(TestAssignmentID) AS CalcColumnFROM TestAssignment--Scenario D - Query using scalar UDF as crierion--SELECT TestAssignmentID,dbo.fnIsEven(TestAssignmentID) AS CalcColumnFROM TestAssignmentWHERE dbo.fnIsEven(TestAssignmentID)=1--Scenario E - Query using CLR scalar UDF--SELECT TestAssignmentID,dbo.fnIsEven_CLR(TestAssignmentID) AS CalcColumnFROM TestAssignment--Scenario F - Query using CLR scalar UDF as crierion--SELECT TestAssignmentID,dbo.fnIsEven_CLR(TestAssignmentID) AS CalcColumnFROM TestAssignmentWHERE dbo.fnIsEven(TestAssignmentID)=1--CLR Aggregate functions/*using System;using System.Data;using System.Data.SqlClient;using System.Data.SqlTypes;using Microsoft.SqlServer.Server;[Serializable][Microsoft.SqlServer.Server.SqlUserDefinedAggregate (Format.Native)]public struct Avg{public void Init(){this.numValues = 0;this.totalValue = 0;}public void Accumulate(SqlDouble Value){if (!Value.IsNull){this.numValues++;this.totalValue += Value;}}public void Merge(Avg Group){if (Group.numValues > 0){this.numValues += Group.numValues;this.totalValue += Group.totalValue;}}public SqlDouble Terminate(){if (numValues == 0){return SqlDouble.Null;}else{return (this.totalValue / this.numValues);}}// private accumulatorsprivate int numValues;private SqlDouble totalValue;}[Serializable][Microsoft.SqlServer.Server.SqlUserDefinedAggregate (Format.Native)]public struct TrimmedAvg{public void Init(){this.numValues = 0;this.totalValue = 0;this.minValue = SqlDouble.MaxValue;this.maxValue = SqlDouble.MinValue;}public void Accumulate(SqlDouble Value){if (!Value.IsNull){this.numValues++;this.totalValue += Value;if (Value < this.minValue)this.minValue = Value;if (Value > this.maxValue)this.maxValue = Value;}}public void Merge(TrimmedAvg Group){if (Group.numValues > 0){this.numValues += Group.numValues;this.totalValue += Group.totalValue;if (Group.minValue < this.minValue)this.minValue = Group.minValue;if (Group.maxValue > this.maxValue)this.maxValue = Group.maxValue;}}public SqlDouble Terminate(){if (this.numValues < 3)return SqlDouble.Null;else{this.numValues -= 2;this.totalValue -= this.minValue;this.totalValue -= this.maxValue;return (this.totalValue / this.numValues);}}// private accumulatorsprivate int numValues;private SqlDouble totalValue;private SqlDouble minValue;private SqlDouble maxValue;}*/--Test #2--Scenario G - Average Query using built-in aggregate--SELECT ProductID, Avg(Cast(PercentPassed AS float))FROM TestAssignmentGROUP BY ProductIDORDER BY ProductID--Scenario H - Average Query using CLR aggregate--SELECT ProductID, dbo.Avg_CLR(Cast(PercentPassed AS float)) AS AverageFROM TestAssignmentGROUP BY ProductIDORDER BY ProductID--Scenario I - Trimmed Average Query using built in aggregates/setoperations--SELECT A.ProductID,CaseWhen B.CountValues<3 Then NullElse Cast(A.Total-B.MaxValue-B.MinValue ASfloat)/Cast(B.CountValues-2 As float)End AS AverageFROM(SELECT ProductID, Sum(PercentPassed) AS TotalFROM TestAssignmentGROUP BY ProductID) ALEFT JOIN(SELECT ProductID,Max(PercentPassed) AS MaxValue,Min(PercentPassed) AS MinValue,Count(*) AS CountValuesFROM TestAssignmentWHERE PercentPassed Is Not NullGROUP BY ProductID) BON A.ProductID=B.ProductIDORDER BY A.ProductID--Scenario J - Trimmed Average Query using CLR aggregate--SELECT ProductID, dbo.TrimmedAvg_CLR(Cast(PercentPassed AS real)) ASAverageFROM TestAssignmentGROUP BY ProductIDORDER BY ProductID

View 9 Replies View Related

Why Does SQL Freeze When I Run This Trigger???

Jun 13, 2002

CREATE TRIGGER accountI ON [dbo].[account]
FOR UPDATE
AS
declare @a decimal
declare @b varchar
declare @c varchar
declare @d decimal
declare @e decimal
declare @f decimal
declare @g decimal
declare @h decimal
declare @i decimal
declare @j decimal
declare @k decimal
declare @l decimal
declare @m decimal
declare @n decimal
declare @o decimal
declare @p decimal

Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Cash' or accountType = 'Accounts Receivable' or accountType = 'Inventory' or accountType = 'Other Current Asset'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @d = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c

Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Fixed Asset' or accountType = 'Accumulated Depreciation'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @e = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c


Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Other Asset'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @f = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c


Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Accounts Payable' or accountType = 'Other Current Liabilities'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @g = @d + @a
end
Fetch Next From tblCursorr INTO @a,@b,@c

Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Long-Term Liabilities'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @h = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c

Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'Equity-Retained Earnings' or accountType = 'Equity-Not Closed' or accountType = 'Equity-For Closure' or accountType = 'Income'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @i = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c


Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'cogs'
open tblCursor
Fetch Next From tblCursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @j = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c


Declare tblCursor Cursor for
select begBalance,accountDescription, accountType from account
where accountType = 'expenses'
open tblCursor
Fetch Next From Stock_Cursor INTO @a,@b,@c
While (@@Fetch_STATUS = 0)
begin
select @k = @d + @a
end
Fetch Next From tblCursor INTO @a,@b,@c


insert dbo.financials (totalCurrentAssets, totalPropEquip, totalOtherAssets, totalCurrentLiabilities, totalLongTermLiabilities, totalEquity, totalIncome, totalCogs, totalExpenses, totalAssets, totalLiabilitiesEquity, totalNetSales, totalNetIncome)values (@d, @e, @f, @g, @h, @i, @j, @k, @l, @m, @n, @o, @p)

View 4 Replies View Related

System Freeze

Jan 2, 2000

I am running NT4.0 with sp6 and SQL server 6.5 with sp3 and my system periodically freeze. The CPU shows 100% and Sql does not respond. In the NT event viewer I get a message SQLCTR60 DB-LIBRARY error - SQL Server connection timed out. How do I go about finding out what is wrong.

Thanks in advance!

Betty

View 2 Replies View Related

Freeze Panes

Apr 23, 2008

Good Morning,

I want to freeze my colum headings which are in the table header section, can this be done?

Thanks,
Rhonda

View 1 Replies View Related

Freeze Panes?

Jan 30, 2006

Is there functionality within the Table or Matrix objects to freeze columns or row headers when you scroll thru a wide or long report? Similay to the freeze panes functionality in Excel.



Thanks

View 12 Replies View Related

All 32bit Connections Freeze...

Mar 2, 1999

I'm very new to SQL servers. We're running SQL 6.5-SP4 and have three applications using different databases on the server (NT4-SP3).

App 1. Written in PowerBuilder using 32bit DB_LIB, NWLink IPX/SPX.
App 2. Written in VFP 5.0a using ODBC32, NWLink IPX/SPX
App 3. Written in VB using ODBC16, NWLink IPX/SPX

Something happens, which freezes all 32bit connections and prevents any other 32bit connects. Which means I can't get Enterprise Manager to connect! This does not affect the ODBC16 clients?!?!

So far the only way, I have found, to clear and fix is to get all 32bit users out of their apps and the server becomes available again. There's got to be something to prevent this, any ideas? Is there a way to trace this to find the culprit?

Thank you for any and all help,

Jim
<jpeppercorn@jhcb.com>

View 3 Replies View Related

Freeze An Index While Updating

Sep 20, 2007

Her is what I'd like to do:

- Create and populate a table
- Index it on a 'reference' field
- Then update the table by using the index but WITHOUT updating the index (I'd like to have it available for the WHERE clause but I don't need to updtae it)
- Eventually, i'd like to re-index the whole table

Is that possible?

Thank you for your help...

View 2 Replies View Related

Validating Sequence Container Freeze

Feb 16, 2007

I am attempting to open up my ssis integration project but when I try to open up packages it says @ the bottom "Validating Sequence Container" and it just stays there. I cannot click on anything and nothing is responsive. Does anyone know why this is happening?

View 9 Replies View Related

Can I Freeze The Leftmost 2 Columns When Scrolling Horizontally?

Mar 26, 2007

Hello,

I have a very wide report that uses a table control. I would like to "freeze" the two leftmost columns so that they remain visible when the user is scrolling horizontally (sideways). Is this possibe?

Thanks,

BCB

View 8 Replies View Related

Reporting Services :: Freeze Header Browser

Apr 22, 2015

I want the header to be visible while scrolling. After changing on the static Properties FixedData=True, it is working on BIDS and Internet Explorer 11 . But is does not work in Chrome. Most of my users are using Chrome. Is there any way to fix it for google Chrome.

View 2 Replies View Related

Count Up Based On Unique Value -- Brain Freeze

Apr 17, 2008



Ok... I know this is something that I've seen and probably done before....

I have a value that will show up multiple times in a table. I want to order the table by that value and then count up from 1 to however many items that it shows up as.

The example below shows the results I want. Value1 and Value2 are in the table, LineNumber is what I need to generate.








Value1
Value2
LineNumber

1
Hey
1

1
Can
2

1
Someone
3

1
Help
4

1
With
5

1
This
6

2
Very
1

2
Simple
2

2
Issue
3

2
As
4

2
I
5

3
Have
1

3
A
2

3
Brain
3

3
Freeze
4



--Thanks--

View 4 Replies View Related

I Need Help With Cleaning A Phone Number Column, Brain Freeze

Feb 26, 2002

For anyone who can help me resolve this minor data issue. I am trying to clean a phone number column so that all numbers are reflected in the same way. I have phone numbers in my column in this this format:

(123)123-1234
123-123-1234
(123) 123-1234

How can I clean this column so that the numbers are reflected in this way: 1231231234

I'm having brain freez right now. Help me please!!! Thanks in Advance

View 2 Replies View Related

Reporting Services :: Freeze Headers While Exporting Report To Excel?

Sep 17, 2010

How can i freeze the headers while exporting the report to excel? will this works in ssrs 2008 / 2008 r2?

View 2 Replies View Related

Transact SQL :: Adding Database - Single User Mode Freeze

Oct 5, 2015

I would like to add database to single user mode to enable broker. So, i have tried this:

ALTER DATABASE myDb SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE myDb SET ENABLE_BROKER
ALTER DATABASE myDb SET MULTI_USER

But the query works more than half an hour then i have stopped it. i guess it has infinite loop, I get also many of this messages:

Nonqualified transactions are being rolled back. Estimated rollback completion: 0%.

There is no other transaction also there is no other user connections. So, what happens?

View 5 Replies View Related

Need Help On SQL Server Functions

Sep 6, 2001

Hello all,

Recently I changed over a ASP script from our old Access 97 database to our new SQL database. When I changed it over, some of my SQL pulls on my Active Server Page started to give me erros. One of them is the function
date(). When I used it pulling from Access like this :

strSQLQ = "SELECT * FROM cocoitem WHERE CustNum = '" & strcustnum & "' AND stat = 'C' AND [due-date] > DateAdd('yyyy', -1, Date()) Order By [cust-po], [due-date] ASC ;"

Then it worked fine. When I redirected the ASP to the new SQL server I recieved an error like this:

Microsoft OLE DB Provider for SQL Server error '80040e14'

'Date' is not a recognized function name.

/scripts/order/shippingstatsclose.asp, line 45


So my question is, what is the SQL server equivalent of the function Date()?

View 2 Replies View Related

Sql Server 2000 Functions

Feb 4, 2007

Hi I have a problem which I’m not sure how to resolve!
I have a aspx with two drop down list;
1st one has (annual salary, daily salary, hourly rate)
2nd one has ( 0-4999, 5000-9999......)
 
The second one is generated by the value selected in the first one.
I have stored the values in a table (as nvarchar) and used sqldatasource  to run a query, which matches the entry in the first box and fill the second drop down list accordingly.
 
How ever I have a problem, when I want some one to search for example; an average salary of 5000-9999, it should output entry's that have a similar daily rate, and hourly rate...
But I’m not sure how I can accomplish this, does any one have any ideas!
Many thanks 
 

View 5 Replies View Related

MS SQL Server Searching Functions

Jun 22, 2005

Hi,the Soundex search words that sounds similar.Does MS SQL Server has some function to make some intuitive search?For example, for search term database, it should return rows that contains: "database" word, but also rows that contains "Oracle", "MySQL", "MS SQL" etc. terms.

View 1 Replies View Related

Serious SQL Server Datetime Functions Bug...

Jan 7, 2002

Can someone tell me if this is a SQL Server bug? I tried this in both
version 7 and 2000, the results are the same.

DECLARE @timeA DATETIME
DECLARE @timeB DATETIME
DECLARE @msDiff INT

SET @timeA = GETDATE()
SET @msDiff = 0

WHILE @msDiff <= 10
BEGIN
SET @timeB = DATEADD(ms,@msDiff,@timeA)
PRINT 'If adding ' + CONVERT(VARCHAR,@msDiff) + ' milliseconds to Time
B, then Time B is ' + CONVERT(VARCHAR,DATEDIFF(ms,@timeA,@timeB)) + '
millisecond greater than Time A'
SET @msDiff = @msDiff + 1
END

This seems like a serious bug if an application depends heavily on
milliseconds comparison.

Thanks,
Aiden

View 3 Replies View Related

Need Help On SQL Server Functions Part 2

Sep 6, 2001

I am sorry to continue bothering this forum with the
continuation of this question but here it is. And thank you to Craig for
giving me the equivalent of the function Date() in SQL. Now when I pull from
the SQl Server with the old ASP pull with this statement using GETDATE()

strSQLQuery1 = "SELECT * FROM cocoitem WHERE CustNum = '" & strcustnum & "' AND (stat = 'O' OR stat = 'F') AND [due-date] > DateAdd('yyyy', -1, GETDATE()) Order By [cust-item], [due-date] ASC;"

I get this:
Microsoft OLE DB Provider for SQL Server error '80040e14'

Invalid parameter 1 specified for dateadd.

/scripts/order/shippingstatsopen.asp, line 28

So I guess I need to also know the equivalent of DateAdd . Also, does anyone
know of a Access Function to Sql 7 function comparison chart so I can write
for the new database comprehendingly?

Thank you very much for your help in advance.

View 1 Replies View Related

Is It Packages Or Functions Available In SQL Server?

Jul 26, 2000

Hi,

I am new to this, SQL Server. I hv worked in Oracle. Now I am learning 'SQL Server'. In Oracle, it has features like Packages and functions (PL/SQL), like that in SQL Server, is there any facility available?.

thanks in advance.
srini

View 1 Replies View Related

Financial Functions In SQL Server

Apr 10, 2002

Do we have any builtin functions in SQL Server for certain financial calculations. For eg., like the PV, FV functions in VB

If not, how else do we achieve this thru' a SQL Server stored procedure?

Thanks in advance,

Siva

View 1 Replies View Related

Triggers Using SQL Server Functions

Apr 12, 2007

Hi,
I am still learning the bells and whistles of SQL Server and was wondering if I can find out the query that caused my trigger to fire, so that I can log this in another audit table.
I have an If Update ( My_Column ) trigger set up, where once an update happens to My_Column much information from the updated row along with , Host_Name and App_Name is sent. I also want to send the exact query used to update it, any ideas?
Any comments, suggestions will be greatly appreciated.
Thanks,
Kartik

View 2 Replies View Related

Any Functions To Replace NZ In SQL Server?

Apr 20, 2006

I'm moving some queries out of an Access front end and creating views out ofthem in SQL Server 2005 express. In some of the numeric fields, I use nzquite often, ( i.e. nz([MyField],0)) to return a zero if the field is null.Is there anything equivalent to this in SQL Server? Right now I'm usingCASE WHEN ... but it seems like an awful lot of script to write just toreplace null with a zero.Any help would be greatly appreciated.Thanks!

View 16 Replies View Related

Writing Functions In SQL Server

Jul 20, 2005

I would like to know how to write a function that will go through datain a column and change it. For example, I have a column of ISBN's forbooks, and the ISBN's have a period in them randomly distributed. I'dlike to pull the period out.Any help I can get will be appriciated.Thanks,Bill

View 1 Replies View Related

Does SQL Server Support XML Functions

Jul 20, 2005

Hi,Do any versions of SQL Server support the following functions, asthey appear in the Oracle Database:-1) XMLElement2) XMLAttributes3) XMLForestThanks in Advance for your replyByeAmardeep Verma

View 4 Replies View Related

Financial Functions For SQL Server

Aug 17, 2006

Hi everybody,

Does anyone have financial functions to be run in SQL Server 2000? For example, future value, interest rate, payments, and so on. Or where can I find them on Internet?

Thanks in advance

Jaime

View 3 Replies View Related

Access Functions To SQL Server

Nov 15, 2006

I'm upsizing MS-Access to SQL Server 2005.
I need to convert the following functions:
TRANSFORM
PIVOT
FORMAT
MID

Are there any similar functions in SQL Server?

Also I have a query as follows:




SELECT Mid$([AccountNumber],3,8) AS [Account#], Format([checkamount]*100,"000000000") AS Amount, IIf(IsNull([statusdate])," ",Format([statusdate],"yyyymmdd")) AS [Date]
FROM tblResult;

How do I convert this in SQL Server query?

View 6 Replies View Related

User Defined Functions In SQL Server 7.0

Nov 4, 2004

hai,

I have 3 fields in my table say (F1, F2, F3). I want to get the max value out of the three fields for each row. I can create a user-defined function which accepts 3 arguments and then return the max value if i am using SQL Server 2000. But now i am using only SQL Server 7.0 (it does not support user-defined functions :confused: )

So any one could kindly let me know how could i do it in SQL Server 7.0

Thnks in advance

View 3 Replies View Related

User Defined Functions In SQL Server 7.0

Jul 20, 2005

Hi all!!Does anybody know how I can create a function in SQL 7.0?? I have tocreate functions that return a value that can be used in a selectstatement. I think SQL Server version 7.0 doesn't support CREATEFUNCTION, does it?Ex:Select MyFunction(Parameter)From MyTableThanks a lot,

View 2 Replies View Related

Enumerate SQL Server Built-in Functions

Oct 4, 2006

Hi

I am trying to build a tree similar to the one in SQL Server Management Studio for the system functions in the SQL language.

I would like to group them by type (e.g. string functions) and display information about the parameters and return types, etc.

Is there a way to get these programmatically? I would like to avoid typing them out by hand.

Thanks

Chris

View 6 Replies View Related

Calling Functions In SQL Server 2005

Apr 23, 2008

Hi ,
I have a question about calling functions in SQl Server 2005.

Let's say that I have created as a dbo a function called Calculations.

If I want to call it from T-SQL I will write Select dbo.Calculations (arguments if any) etc.

My question is If I can skip the "dbo" part. Call the function without using the dbo .
Can I do that ?
Should I create the function as supervisor ? Does Sql Server has a property or something which will allow me to call the function without using the "dbo." ?

Thank you
zkar

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved