Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Scan Order Of User Defined Aggregates


Hi all!

I have created (in CLR) a user defined aggregate. The scan order of this aggregate is important, because it return different results for different orders.

When i use it with a single group (using order by and where) is working fine.

For example

select id, dbo.cmp(myclolumn) as myres from (select top 100 percent * from mytable order by id,clmdate) where id=10 group by id

This works correctly. Now lets expand it by removing where id=10 clause

select id, dbo.cmp(myclolumn) as myres from (select top 100 percent * from mytable order by id,clmdate) group by id

I get slightly different results from what the right result must be.

Any idea?




View Complete Forum Thread with Replies

Related Forum Messages:
User-Defined Aggregates With Parameters
I have to write an aggregate which accumulates values in a relation to a parameter. Therefore I tried to create an aggregate with an additional input parameter.

While creating the aggregate, I get the following error message:
CREATE AGGREGATE failed because type 'MKT' does not conform to UDAGG specification due to method 'Accumulate'.

Does anybody know, how I could solve this?



     Public Sub Accumulate(ByVal value As SQLDouble, ByVal param1 as SQLDouble)
        Const uGK as double = 0.008

result = result + Math.Exp(-param1/(uGK *value) )
     End Sub

View Replies !
User-defined Fun Or The System-defined Fun
hai,

how can i identify the function is user defined or the system defined function....................

View Replies !
Login Failed: Reason: User '_' Not Defined As A Valid User Of Trusted
Our server has integrated security setup, upon startup of the server,
we have a continuous flow of error msg:
Login Failed: Reason: User '_' not defined as a valid user of trusted
connection.
The timing of these messages only around 30 seconds apart
The only incident from Technet I can find is Q186314, but we don't have replication setup, anyone knows where I can look into ?
I recycle the server but didn't help.
I appreciate any help I can get ..
Thanks.

View Replies !
Login Failed- User: Reason: Not Defined As A Valid User Of A Trusted SQL Server Connection.
Hi,

i'm a newbie in SQL. I can't connect to SQL 6.5 server using ASP ADO. Below is the program code

<%
set conn=server.createobject("adodb.connection")
conn.open "dsn=Central;uid=sa;pwd="
%>

An error message appears
Login failed- User: Reason: Not defined as a valid user of a trusted SQL Server connection.

I've already created a ODBC System DSN named Central
parameter Server Local and used Trusted connection checked.

Then under sql Manager there is a sa with a blank password.

Please help.

View Replies !
CROSSTAB Query In Defined Order
Taken from another post, the sql listed further below creates/uses the input table
ID ITEM
1 a
1 b
2 a
2 c
2 d
3 b
3 z


and with the SELECT statement returns
ID items
1 a, b
2 a, c, d
3 b, z

The items are sorted in alphab. order (using Min) but I HAVE A 3RD FIELD IN THE INPUT TABLE THAT ORDERS THE ITEMS SO INPUT TABLE NOW IS:
ID ITEM ORDER
1 a 32
1 b 15
2 a 32
2 c 11
2 d 45
3 b 15
3 z 99

SO THE OUTPUT TABLE LOOKS SHOULD BE (items with smaller Order no are added first):
ID items
1 b, a
2 c, a, d
3 b, z

ANY IDEAS on HOW TO CHANGE THE FOLLOWING SQL TO DO THAT?
I've tried ordering the input table on ID, ORDER fields and then using the SELECT statement listed below but it adds the items in alphab. order which I guess it should do since it's using Min. I also tried using the ORDER field in the joins instead of the ITEM field but still didn't work. ANY IDEAS???



CREATE TABLE dbo.table00 (
id INT NOT NULL
, item CHAR(1) NOT NULL
)

INSERT INTO dbo.table00 (id, item)
SELECT 1, 'a'
UNION ALL SELECT 1, 'b'
UNION ALL SELECT 2, 'a'
UNION ALL SELECT 2, 'c'
UNION ALL SELECT 2, 'd'
UNION ALL SELECT 3, 'b'
UNION ALL SELECT 3, 'z'

SELECT a.id, Min(a.item)
+ Coalesce(', ' + Min(b.item), '')
+ Coalesce(', ' + Min(c.item), '')
FROM dbo.table00 AS a
LEFT JOIN dbo.table00 AS b
ON (b.id = a.id
AND a.item < b.item)
LEFT JOIN dbo.table00 AS c
ON (c.id = a.id
AND b.item < c.item)
GROUP BY a.id
ORDER BY a.id

View Replies !
What Is The Difference Between Clustered Index Scan And Table Scan
How can I improve performance of my search if I am looking in a table with more than ten million rows with a "like query"?

Does putting an index mean only telling the computer to start in a particular order?

if I index all the coloums does my search get faster ?

how can I decide on an indexing strategy?

View Replies !
How To Use ORDER BY Clause In An SELECT DISTINCT Sql Query When AS SINGLECOLUMN Is Defined?
Hi,
I wonder if its possible to perform a ORDER BY clause in an SELECT DISTINCT sql query whereby the AS SINGLECOLUMN is used. At present I am recieving error: ORDER BY items must appear in the select list if SELECT DISTINCT is specified. My guess is that I cant perform the Order By clauses because it cant find the columns individually. It is essentail I get this to work somehow...
Can anyone help? Thanks in advance
Gemma

View Replies !
Is User Defined Changes Possible?
I have installed to our server win2003 MSSQL Reporting service and client version on my pc together with visul studio. Everyting works well.

My questions are several.

1. When we use subscription by email. RS sends report by email as we selected.But i couldnt find the way to change the email layout.



2. Is it possible to change web layout. I couldnt find the cs source codes of the report server.

3. I want to remove refresh button from the users view. Is there any configuration for the layout where we can change it?

View Replies !
SQL User Defined View
I've a view in which one of the fields were  DATEDIFF(day,contract date,received) AS AgeOfAccount. I changed it to DATEDIFF(day, m.received, CASE WHEN m.clidlp > m.clidlc THEN m.clidlp ELSE m.clidlc END) * - 1 AS AgeOfAccount. When I execute the view  I'm getting an error. But the results are getting displayed properly. That's what's puzzling me. Could someone tell me what the error is.
 
The following errors were encountered while parsing the contents of the sql pane. 
Your entry cannot be converted to a valid date time value.

View Replies !
Help With User Defined Function
I have a UDF that takes my input and returns the next valid business day date. My valid date excludes weekends and holidays.
It works perfect except for one issue. It doesn't check to see if today's date  is a holiday.
I pass a query to sql server like so " select dbo.getstartdate('01/ 10/2007',2)"
It then moves ahead two business days and returns that date.
Here is the current code. Hopefully someone can tell me how to do the holiday check on the current date.
I really don't want to rewrite the whole script .
Code---------------------------------------------------------
SET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS OFF GO
--DROP FUNCTION GetStartDate
--declare function receiving two parameters ---the date we start counting and the number of business days
CREATE  FUNCTION GetStartDate (@startdate datetime, @days int)   RETURNS datetimeASBEGIN
--declare a counter to keep track of how many days are passingdeclare @counter int
/*Check your business rules.  If 4 business days means you count starting tomorrow, set counter to 0.  If you start counting today, set counter to 1*/set @counter = 1
--declare a variable to hold the ending datedeclare @enddate datetime
--set the end date to the start date.  we'll be -- incrementing it for each passing business dayset @enddate = @startdate
/*Start your loop.While your counter (which was set to 1), is less than or equal to the number of business days increment your end date*/WHILE @counter <= @days
BEGIN
--for each day, we'll add one to the end dateset @enddate = DATEADD(dd, 1, @enddate)
   --If the day is between 2 and 6 (meaning it's a week   --day and the day is not in the holiday table, we'll    --increment the counter   IF (DATEPART(dw, @enddate) between 2 and 6) AND       (@enddate not in           (           select HolidayDate            from tFederalHoliday            where [HolidayYear] = datepart(yyyy,@enddate)         )       )   BEGIN      set @counter = @counter + 1   END
--end the while loopEND
--return the end dateRETURN @enddate
--end the functionEND
GOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GO
---------------------------------------------------------------------------------------------

View Replies !
User Defined Function
Hi everyone,
    I am tring to pass acomma delimited string to a function  and this function is parsing the string so that I can see individual values so for example I am passing 1,2,3,4,5 as a parameter to my function and I am parsing this string so that I can write something like this
Select * from tableA where userID in(1,2,3,4)
It is working fine. Only problem is if the user passes word 'all' instead of 1,2,3,4 then I have to doSelect * from tableA
My function looks like this.  How can I modify this function if I pass 'all' as a paramater. Any help will be appreciated.CREATE FUNCTION [dbo].[ParseText2File] (@p_text varchar(4000), @p_Delimeter char(1))
RETURNS @results TABLE (id varchar(100))
AS
BEGIN
declare @i1 varchar(200)
declare @i2 varchar(200)
declare @tempResults Table (id varchar(100))
while len(@p_text) > 0 and charindex
(@p_Delimeter, @p_text) <> 0
begin
select @i1 = left(@p_text, charindex(@p_Delimeter, @p_text) - 1)
insert @tempResults select @i1
select @p_text = right(@p_text, len(@p_text) - charindex(@p_Delimeter,@p_text))
end
insert @tempResults select @p_text
insert @results
select *
from @tempResults
return
END
Thanks

View Replies !
User-defined Functions - Help!
Hi,

I have a search returning many 'car' records (regno, mileage, color, etc)

In a seperate table I have two columns: accessory and regno. This can have many rows for each regnumber.

Within the storedprocedure that returns the 'car' records I need to also return the relevant accessories for that car as one column.

I have written a function as such (with some help!):

ALTER Function getAccs(@regNo varChar(20))
RETURNS varChar
AS
BEGIN
Declare @List varchar(1000)
SELECT @List = COALESCE(@List + ', ', '') + accessory
FROM frxrep2.dbo.usedaccessories WHERE regnumber = @regno
return @List
END

I was hoping that I could simply use this in the 'car' SELECT statement.

ie:

SELECT regNo, color, mileage, dob.getAccs(regno) as AccessoryList
FROM tableBla etc


I'm not even sure if the function works - How can I test in SQL analyzer?

any help much appreciated,

Pete

View Replies !
User-Defined Functions In DTS
Is there a way to call a SQL user-defined function in a DTS, perhapsin an ActiveX transformation? I want the destination table to have avalue that was modified by a pre-defined function.-Noelle

View Replies !
User Defined Function Help!
I am trying to compare the data from one table (shipments) with the data from a view. The point of the function is to match the correct territory with the account depending on the data. Basically, I this deals with accounts that are transfering from one territory to another. The transfers take effect on the first day of the month, retroactive, therefore we need to allocate the sales data to the correct territory in the shipments table. Here is my function. Can someone tell me how I can get this to work and insert a territory ID for the account that has transfered into the shipments table?

CREATE FUNCTION fnShipments ()
RETURNS @Shipments TABLE (AccountID CHAR(10), DateInvoice DateTime, DollarShipments Money, TerritoryID CHAR(10))
AS
BEGIN
INSERT @Shipments (AccountID, DateInvoice, DollarShipments, TerritoryID)
SELECT Shipments.AccountID, Shipments.DateInvoice, DollarShipments, ISNULL((SELECT TerritoryID FROM vwAccountTransfers

WHERE Shipments.AccountID = vwAccountTransfers.AccountID

AND vwAccountTransfers.EffectiveMonth =

(SELECT MIN(EffectiveMonth)
FROM vwAccountTransfers

WHERE Shipments.AccountID = vwAccountTransfers.AccountID
AND DatePart(m,Shipments.DateInvoice) < vwAccountTransfers.EffectiveMonth)),
(SELECT TerritoryID FROM vwAccountTransfers
WHERE Shipments.AccountID = vwAccountTransfers.AccountID
AND vwAccountTransfers.EffectiveMonth Is Null )
) AS Territory
FROM Shipments

ORDER BY Shipments.AccountID, Shipments.DateInvoice;
RETURN
END

View Replies !
User Defined Function
I need a UDF that will do the following:

User: Will be sending me a datetime e.g '9 Nov 2004 15:00:00'
I want the UDF to do the following for me
Return in hours the difference between what the user has send and now (lets say now = '10 Nov 2004 11:00:00')
So the UDF will return to me 20.
But I dont want 20, I want the UDF to avoid any all hours which are not work related (any time after 16h00
until 8h00 in the morning), so I want this UDF to return 4. That means from '9 Nov 2004 15:00:00' I have calculated
1hr until 16h00 and 3hrs from 8 until 11h00 on '10 Nov 2004 11:00:00'

AGAIN IT MUST NOT CALCULATE WEEKENDS. Lets say '12 Nov 2004 15:00:00' was Friday and now = '15 Nov 2004 11:00:00', I must still
get 4 as a return from UDF

I would also like now to be my getdate(), but it seems like you can't use it in UDF

View Replies !
RE-User Defined Function (2nd)
Can someone help me please, I have this function and it returns hours between 8h00 and 16h00 during the week

The help I need is, I need to return minutes instead of hours and it must not return any minutes in the following holiday table since we are not working
Holiday
2004-08-09 00:00:00.000
2004-09-24 00:00:00.000
2004-12-16 00:00:00.000
2004-12-26 00:00:00.000
2004-12-25 00:00:00.000
2005-01-01 00:00:00.000


CREATE FUNCTION dbo.fn_CalculateHours
(@DateFrom datetime, @DateTo datetime)
RETURNS int
AS
BEGIN
DECLARE @hFrom int, @hTo int
SET @DateFrom = (CASE DATEPART(weekday,@DateFrom)
WHEN 1 THEN CONVERT(varchar(10),DATEADD(day,1,@DateFrom),120) + ' 08:00:00'
WHEN 7 THEN CONVERT(varchar(10),DATEADD(day,2,@DateFrom),120) + ' 08:00:00'
ELSE @DateFrom
END)
SET @DateTo = (CASE DATEPART(weekday,@DateFrom)
WHEN 1 THEN CONVERT(varchar(10),DATEADD(day,-2,@DateTo),120) + ' 16:00:00'
WHEN 7 THEN CONVERT(varchar(10),DATEADD(day,-1,@DateTo),120) + ' 16:00:00'
ELSE @DateTo
END)
SELECT @hFrom = DATEPART(hour,@DateFrom)
SELECT @hTo = DATEPART(hour,@DateTo)
RETURN ((DATEDIFF(day,@DateFrom,@DateTo) - (DATEDIFF(week,@DateFrom,@DateTo) * 2) - 1) * 8) +
(CASE WHEN @hFrom < 8 THEN 8
WHEN @hFrom > 16 THEN 0
ELSE 16 - @hFrom
END) +
(CASE WHEN @hTo < 8 THEN 0
WHEN @hTo > 16 THEN 8
ELSE @hTo - 8
END)
END

View Replies !
User Defined Functions And OLE
Hi everyone

I am implementing an encrypted data system whereby captured data is encrypted using MS CAPICOM when written to DB and decrypted when displayed. It works well. However, each time you write the data back on update the encryption is different from the previous time.

I have a search screen that allows users to enter text data and submit it looking for matches. Of course, the user is entering unencrypted text and the DB data is encrypted.

This means that you can't encrypt the input data before you try to match because the encryption alogorithm used on the input data will not match that which was used to encrypt the DB data.

Are you with me so far?

So, you have to compare the uncencrypted input data with DECRYPTED DB data - in other words, decrypt the DB data on the fly within the where clause of your query.

I have accomplished this by writing a UDF that instantiates an instance of the CAPICOM encryption module and calling the UDF when applying the query
eg where udf(columnname1) = 'inputtext' or udf(columnname1) = 'inputtext'.

It works, I get the results that I want.

But, alas, the performance has taken a search severe hit.

Has anyone else ventured down this road?

Is there a better way of doing this?

Thanks

Ray

View Replies !
User Defined Variables
I am running a procedure that declares a table with a user defined variable called ZipCodes8000. This datatype is on the systypes table as a valid datatype that we created. Here is the code and the error that is returned. Can anyone help me understand why I receive the error that I do.

Code:

DECLARE @SortPlanBinZipCodeRanges TABLE
(
SortPlanBinZipCodeRangeIDINT IDENTITY (1, 1) NOT NULL,
SortPlanBinID INT NULL,
SortPlanID INT NULL,
BinTypeID TINYINT NULL,
BinFlagTypeID TINYINT NULL,
BinNumber INT NULL,
ZipCodeRanges ZipCodes8000 NULL
)


error:
Msg 2715, Level 16, State 7, Line 1
Column or parameter #7: Cannot find data type ZipCodes8000.

Thank you in advance.

Todd

View Replies !
User Defined Types
I've been doing some reading on UDT's and have a question...

It was suggested in one of the pieces I read that you could create a UDT for, in their example, cities. And every table that had a reference to city could share this datatype. Now, my initial thought was "wow, what a great idea! I wouldn't have to remember the exact datatype for my primary keys (was it a char(5) or char(6)?) and have a "central depository" for my key datatypes.

So the first question is; what are the disadvantages of such a design?

And the second is; How do you update a UDT? If business requirements change and udt_city needs to be changed from varchar(30) to varchar(60), for example, what would be the way of echoing the change thoughout your database?

My gut reaction for the answers are
1) performance will decrease as effectively the dbms has to "parse" every insert/update to a UDT field in a different method.

2) create a new udt and alter any tables referencing the old one before dropping it.

What do we think?

View Replies !
User Defined Variable
Hello

Is there a way that I can create a user defined variable in my database? I have a fairly large chunk of xml that I would like to store in the database that can be updated by clients ( in rare cases ). I could use other mechinisms to allow access to it, but all other application related information is stored nicely in this one place, I hate to vary for this single piece.

Thank you for your time and thoughts.
Patrick

View Replies !
User Defined Functions
hi all,

I made myself a user defined function, it works great, but is there a way to make it available to all databases?

cheers,

alex

View Replies !
User Defined Functions
When I define a UDF in SQL 2000 I can't execute it without qualifiction. Here's the code:
CREATE FUNCTION GetLastShipDate(@DO_No CHAR(10))
RETURNS CHAR(10)
-- DROP FUNCTION GetLastShipDate
BEGIN
DECLARE @v_last_ship_date CHAR(10)

SELECT @v_last_ship_date = COALESCE(CONVERT(CHAR(10), MAX(Asn.Asn_Ship_DateTime), 110), '')
FROM Asn,Asn_Do
WHERE Asn_Do.Asn_Number=Asn.Asn_Number
AND Asn_Do.DO_Number = @DO_No
AND Asn.ASN_STATUS in ('SENT','RESENT')


RETURN @v_last_ship_date
END

So I have to execute this with:

SELECT dbo.GetLastShipDate('T010215004')

I want to execute it with

SELECT GetLastShipDate('T010215004')

What am I doing wrong?

View Replies !
User Defined Function Help?
I create the following UDF just for learning purposes and I cannot seem to get it to return a value.

Stored Procedure

REATE PROCEDURE usp_GetXSection

@fWidth float,
@fHeight float,
@fResult float OUTPUT

AS
BEGIN
set @fResult = [dbo].[XSECTION](@fWidth, @fHeight)
END
GO


Ane the following UDF


CREATE FUNCTION XSECTION
(@Width float, @Height float)
RETURNS float
AS
BEGIN
RETURN (@Width * @Height)
END


I call it using ADO in a c++ application, but all returns empty

Any ideas? C++ code to follow.

Mike B


void CFormTemplateSetup::OnCalculate()
{
_CommandPtr pCmd(__uuidof(Command));
_ParameterPtr pWidth(__uuidof(Parameter));
_ParameterPtr pHeight(__uuidof(Parameter));
_ParameterPtr pResult(__uuidof(Parameter));

try
{
pCmd->ActiveConnection = GetDocument()->GetConnection();
pCmd->CommandText = _T("usp_GetXSection");
pCmd->CommandType = adCmdStoredProc;

_variant_t vWidth, vHeight;
vWidth.vt = VT_R4;
vHeight.vt = VT_R4;

vWidth.fltVal = 10;
vHeight.fltVal = 10;

pWidth = pCmd->CreateParameter(_T("@fWidth"), adInteger, adParamInput, sizeof(int), vWidth);
pHeight = pCmd->CreateParameter(_T("@fHeight"), adInteger, adParamInput, sizeof(int), vHeight);
pResult = pCmd->CreateParameter(_T("@fResult"), adDouble, adParamOutput, sizeof(float), vtMissing);

pCmd->Parameters->Append(pWidth);
pCmd->Parameters->Append(pHeight);
pCmd->Parameters->Append(pResult);

_variant_t vResult = pResult->Value;

float fArea = pResult->Value.fltVal;
CString csArea;
csArea.Format("Area = %d", fArea);

::AfxMessageBox(csArea);
}
catch(_com_error& e)
{
::AfxMessageBox(e.Description());
}
}

View Replies !
User Defined Datatypes
Does anyone have a script or know a site that has standard datatypes already defined?
ie. datatypes for FullName, company, city, state, phone#, email...etc
If you know of any tried and true datatypes and maybe even the scripts to generate them,
I think that would be useful to anyone that visits this forum.

thanks,
Mike

View Replies !
User Defined Datatypes
Is it possible to change the owner of a User Defined Dataype? I've
recently had to change the owner of one of my databases and the
tables from a specific user to 'dbo'. The UDD's are the only objects
I am unable to change the ownership of.

Any suggestions anyone?
Thanks for any advice!
Toni Eibner

View Replies !
User Defined Function
I only just been given this job as SQL server 7 "administrator". One of the many problems I am facing is trying to find out a way to write user defined functions - one of the millions of things you can do easily with Oracle. I have heard the rumours that SQL 7 does NOT come with "User Defined Functions" as a features. Please tell me this is not true.

And if it is true, please can anyone tell me a way to get around this?

Many thanks in advance

View Replies !
Help Pls!! &#39;Not Defined As Valid User&#34;
all schedulled task on server failed for 18450 Process Exit Code 1. ...t Utility, Version 6.50.240 Copyright (C) Microsoft Corporation, 1995 - 1996 [Microsoft SQL-DMO] Error 18450: [SQL Server] Login failed- User: sqlexec Reason: Not defined as a valid user of a trusted SQL Server connection.
Any information on how to solve it

View Replies !
User Defined Function
Dear friends,

I am a new user for SQL server. Coming from an oracle background, I find it very difficult to live without user defined functions. At the moment, I urgently need to have a function returning an custom-made ID string, so that it can be used in one of my stored procedures. I have heard the rumours that SQL server 7 does NOT support user defined functions, (which SQL 6.5 does). I would be really grateful if anyone can clarify this for me, and if possible, suggest a get-around approach.

Thanks in advance!

Kai

View Replies !
User-Defined Functions
Is there any way to create procedures that will act like functions so that they can be invoked within other SQL statements? All the documentation I have been able to find suggests coding a subquery to replace what a function would do. This is inefficient, cumbersome and creates a maintenance nightmare.
Perhaps there are third party tools? Workarounds? HELP!!!

View Replies !
User Defined SQL Function
How can I create a user defined function in SQL and call it inline from a SQL statement? I need the ability to execute a statement such as:

select myFunc(x,y) from table

I need myFunc(x,y) to return a value, not a recordset and use that value in the select statement. Any and all ideas would be appreciated.

View Replies !
User Defined Datatypes
We are in the process of optimizing and setting standards for our databases.
I was told that using User Defined datatypes would help in performance as
well as standards.

Has anyone out there used these. And can you tell me how it has helped/hurt
your performance?

I trust and value everyone’s opinion on this discussion line. I have always
gotten great advice for you guys.

Thanks,
Dianne

View Replies !
User Defined Functions
Hi
I built an SQL2K database using computed columns that call user defined functions. These do either calculation based on a some fields in the table or a lookup on another table (the fields are arguments to the function)

Now I learn we are moving back to SQL7.0 for support reasons.

What is the best way to implement the above scenario in SQL7
(which means, minus the functions)

thanks
Liju

View Replies !
User Defined Functions In SQL 7.0
Hi,

I know that we cannot have User Defined Functions in SQL 7.0, but is there a work around. I am trying to standardize the date according to the time zone using a function and use it as part of a select statement.

I cannot believe that is not possible in SQL 7.0, can somebody tell me what is the work around, I am running against time. I really appreciate any help on this one.

Satish.

View Replies !
User Defined Functions In SQL 2k
I expected that a parameter in the new udf's could be used dynamically. However, I am finding out that mabey they can't.
For instance:
Select * from udf_GetElection(2001,1234,1,'')
will return the election of person 1234 made in the year 2001 for plan1.

however if i only want one value from the table and want to include the function as a return field in a select, select errors out.

ie:
select top 10 ee.num,lname,fname,ssn, (SELECT optionid FROM UDF_GETELECTION(2001,7126,1,'')) as medoc
from employee ee

gives me:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'ee'.

Yet a nested select which is what the udf really is works like this:

select top 10 num,lname,fname,ssn, (SELECT optionid FROM election where planyear =2001 and num = ee.num and planid =1 and electstatus = 'C') as medoc
from employee ee

returns valid data

Is there something I don't understand?

View Replies !
User Defined Functions
Hello,

Please help with UDF...

I have this UDF "fnEmpBirthDay", code is below:
CREATE function fnEmpBirthDay (@aFrom integer, @aTo integer)
returns table
as
Return
(
select * from vwEmpBirthDay
where Cast(substring(Convert(char(8),[emp birth date],112),5,4) as int) between @aFrom and @aTo
)

However, when i compare two queries like below:

1. select * from fnEmpBirthDay(101, 1031)

2. select * from vwEmpBirthDay
where Cast(substring(Convert(char(8),[emp birth date],112),5,4) as int) between 101 and 1031

They dont have same result. Why is it like that? is there something wrong with my query or something refresh...

However, When I edit the UDF fnEmpBirthDay and save it without any changes. Then two queries have the same results...

Please advise why is it happening like that?

Thanks in advance...

View Replies !
XML And User Defined Function
Hi,

Please answer to the following questions:
Q1. Is there any way to get text data type from a user defined function ?

Q2. How can result of a select query with "FOR XML RAW" clause be converted into a single string?

-----------
Background of the above 2 questions:

I want to execute a simple select query which besides selecting different columns also calls a user defined function which should execute a select query and return back the result as XML string to the calling select query.

View Replies !
User Defined Functions
declare @statusID varchar(100)
set @statusID = '1, 2'


--this works
select id from SplitWords(@statusID, ',')

 

--this doesn't

declare @sql nvarchar(2000)
set @sql = 'select * from Mast where ' + 'phmStatusID in ( select id from ' + 'SplitWords(@statusID, '', '')' + ') '
exec sp_executesql @sql

 

is what I'm trying to do not allowed? if so, whats the right way to do this?

any help appriciated.  thanks.

View Replies !
User Defined Functions
Hi everyone,
Today while using user defined functions, I noticed that we must write dbo. before the function name which I did not conceive why it is used like that. Why are there an exception for functions ?
Why do we not have to use the same thing while using SP or not user defined functions ?

Thanks

View Replies !
Need Help With User Defined Function
I am accustomed to doing most of my function work in Access, but the boss would really like it if I could shedule some cubes to do the stuff that takes forever when you run it live.

To that end, I have an Access function that I call to get a field value for a query.  I would like to be able to create an User Defined Function on the SQL server and call that function as a field value in a view.  I have searched the forums and have not really found anything that wants to make sense to me as to how to do this.

The access function is as follows:

Public Function BuyerDeltas(IFSDate As Date, PODate As Date) As Long

    If IFSDate < (Date + 14) Then
        BuyerDeltas = IFSDate - 3 - PODate
    ElseIf IFSDate < (Date + 29) Then
        BuyerDeltas = IFSDate - 7 - PODate
    ElseIf IFSDate > (Date + 28) Then
        BuyerDeltas = IFSDate - 10 - PODate
    Else
        MsgBox "This should not be possible!", vbOKOnly, "Fix It!!!!!!!"
    End If

End Function

The view that this is called from contains the IFSDate and PODate fields and I am able to call the function from the access query, but this is completely different than what I have seen in the help files on SQL.

I would love to be able to keep plugging away at doing this myself, but the boss also is pushing me to get it done and he doesn't want me taking forever to do it.

Any direction would be greatly appreciated!

View Replies !
Help With User Defined Functions
Dear all,
I was given a project to transfer our database into sql server database.
 
In our previous database we used the datatype int4 for some columns to create some views and in some queries that we used to build our datawindows. In SQLServer 2000 i created a user defined function named int4. I can execute it with the line select dbo.int4(poso) from employee .
 
Unfortrunately this way make me to rebuild all my datawindows and replace int4( with dbo.int4( . Is there any way to execute queries using user defined function but omitting the first part name dbo. I mean to manage execute the command select int4(poso) from employee \let int4 be a user definded function.
 
If i can€™t solve this, i thing it will decided than is impossible to move to sqlserver Database. Has anyone any suggestions?
 
Thanks in advance,
Best regards,
Hellen

View Replies !
User-defined Type
Hello!

 

     Is it possible to use UDT on SQL Server Compact Edition? How can I enable CLR?

 

Thank you!

View Replies !
User Defined Function
Hi,
Iam working on one user defined function which will take week & year as argument and returns sunday date of that particular week in that year. for example if i give (15,2007) as argument it shud give 2007-04-08 as result. Plz anybody help this on this issue.

View Replies !
User Defined Functions
Hi,
Iam new to sql server. I want to create a user defined function to get date in a year(starting day of a week-i.e sunday date) when we give week number as argument. can any body help on this issue?

View Replies !
User-defined Types
Iam trying to create a geo-database.
For that i need to have a spatial data type called polygon which takes in values as int. so it can be declared as:
POLYGON(0 0, 100 0, 100 100, 0 100, 0 0)

How do i do that.
plz help.

---
Iam not real any more
Iam just an Illusion
---

View Replies !
An Error Occurred In The Service Broker Internal Activator While Trying To Scan The User Queue '(null)' For Its Status. Error: 2
Hello - can't find any info on this error - can anyone shed some light?

 

There was a deadlock - which preceeded this message by 2 seconds.

 

 

 

04/25/2007 08:20:12,spid108,Unknown,An error occurred in the Service Broker internal activator while trying to scan the user queue '(null)' for its status. Error: 2905<c/> State: 1.
04/25/2007 08:20:12,spid108,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
04/25/2007 08:20:12,spid108,Unknown,Stack Signature for the dump is 0x1229B5AA
04/25/2007 08:20:12,spid108,Unknown,78132A36 Module(MSVCR80+00002A36)
04/25/2007 08:20:12,spid108,Unknown,781329AA Module(MSVCR80+000029AA)
04/25/2007 08:20:12,spid108,Unknown,01447720 Module(sqlservr+00447720)
04/25/2007 08:20:12,spid108,Unknown,0144789A Module(sqlservr+0044789A)
04/25/2007 08:20:12,spid108,Unknown,0144859B Module(sqlservr+0044859B)
04/25/2007 08:20:12,spid108,Unknown,01447562 Module(sqlservr+00447562)
04/25/2007 08:20:12,spid108,Unknown,01006DAB Module(sqlservr+00006DAB)
04/25/2007 08:20:12,spid108,Unknown,01006BBC Module(sqlservr+00006BBC)
04/25/2007 08:20:12,spid108,Unknown,01006A96 Module(sqlservr+00006A96)
04/25/2007 08:20:12,spid108,Unknown,0112F65C Module(sqlservr+0012F65C)
04/25/2007 08:20:12,spid108,Unknown,0112F70F Module(sqlservr+0012F70F)
04/25/2007 08:20:12,spid108,Unknown,0112CB04 Module(sqlservr+0012CB04)
04/25/2007 08:20:12,spid108,Unknown,0112D1D1 Module(sqlservr+0012D1D1)
04/25/2007 08:20:12,spid108,Unknown,0112EA61 Module(sqlservr+0012EA61)
04/25/2007 08:20:12,spid108,Unknown,0108A5CB Module(sqlservr+0008A5CB)
04/25/2007 08:20:12,spid108,Unknown,0108A56B Module(sqlservr+0008A56B)
04/25/2007 08:20:12,spid108,Unknown,01060A5A Module(sqlservr+00060A5A)
04/25/2007 08:20:12,spid108,Unknown,01476CB2 Module(sqlservr+00476CB2)
04/25/2007 08:20:12,spid108,Unknown,01476FD3 Module(sqlservr+00476FD3)
04/25/2007 08:20:12,spid108,Unknown,017FA720 Module(sqlservr+007FA720)
04/25/2007 08:20:12,spid108,Unknown,017FAADC Module(sqlservr+007FAADC)
04/25/2007 08:20:12,spid108,Unknown,01796B1B Module(sqlservr+00796B1B)
04/25/2007 08:20:12,spid108,Unknown,01793310 Module(sqlservr+00793310)
04/25/2007 08:20:12,spid108,Unknown,0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:12,spid108,Unknown,* Short Stack Dump
04/25/2007 08:20:12,spid108,Unknown,* -------------------------------------------------------------------------------
04/25/2007 08:20:12,spid108,Unknown,* *******************************************************************************
04/25/2007 08:20:12,spid108,Unknown,*      SegSs: 00000023:
04/25/2007 08:20:12,spid108,Unknown,*        Esp: 1302E584:  13025387  80C87378  80C872F0  00000000  78140001  0009D9C2
04/25/2007 08:20:12,spid108,Unknown,*     EFlags: 00010202:  00610067  00650074  0049003B  0076006E  006C0061  00640069
04/25/2007 08:20:12,spid108,Unknown,*      SegCs: 0000001B:
04/25/2007 08:20:12,spid108,Unknown,*        Ebp: 1302F67C:  1302F788  01793310  13025373  80C872F0  7093AB12  801E8B38
04/25/2007 08:20:12,spid108,Unknown,*        Eip: 0179438B:  828B118B  000000E0  C085D0FF  00B9850F  9D890000  FFFFEF8C
04/25/2007 08:20:12,spid108,Unknown,*        Edx: 00000E38:
04/25/2007 08:20:12,spid108,Unknown,*        Ecx: 00000000:
04/25/2007 08:20:12,spid108,Unknown,*        Ebx: 00000000:
04/25/2007 08:20:12,spid108,Unknown,*        Eax: A99EE598:  00000000  00000000  A99EE5B0  00000000  00000000  00000000
04/25/2007 08:20:12,spid108,Unknown,*        Esi: 00000000:
04/25/2007 08:20:12,spid108,Unknown,*        Edi: 80C872F0:  7093AB12  80C87FF0  00000007  B8A20008  7093AB15  00000000
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* dbghelp                        14200000  14312FFF  00113000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       76780000  76913FFF  00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       764A0000  76633FFF  00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       76300000  76493FFF  00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       341D0000  343AFFFF  001e0000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       33590000  33764FFF  001d5000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       333F0000  33583FFF  00194000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       14490000  1467AFFF  001eb000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       13D10000  13EFBFFF  001ec000
04/25/2007 08:20:12,spid108,Unknown,* OLEDB32R                       13770000  13780FFF  00011000
04/25/2007 08:20:12,spid108,Unknown,* MSDART                         133D0000  133E9FFF  0001a000
04/25/2007 08:20:12,spid108,Unknown,* oledb32                        13350000  133C8FFF  00079000
04/25/2007 08:20:12,spid108,Unknown,* msxml3                         11BD0000  11CE1FFF  00112000
04/25/2007 08:20:12,spid108,Unknown,* msxmlsql                       11AF0000  11BC5FFF  000d6000
04/25/2007 08:20:12,spid108,Unknown,* System.Xml                     10FA0000  11193FFF  001f4000
04/25/2007 08:20:12,spid108,Unknown,* System.Security                10F20000  10F61FFF  00042000
04/25/2007 08:20:12,spid108,Unknown,* System                         10C10000  10EF3FFF  002e4000
04/25/2007 08:20:12,spid108,Unknown,* System.Security.ni             10A90000  10B45FFF  000b6000
04/25/2007 08:20:12,spid108,Unknown,* System.Transactions            0FAD0000  0FB12FFF  00043000
04/25/2007 08:20:12,spid108,Unknown,* System.ni                      7A440000  7ABFDFFF  007be000
04/25/2007 08:20:12,spid108,Unknown,* System.Data                    102D0000  10596FFF  002c7000
04/25/2007 08:20:12,spid108,Unknown,* mscorjit                       0F910000  0F962FFF  00053000
04/25/2007 08:20:12,spid108,Unknown,* SqlAccess                      0F8A0000  0F8F5FFF  00056000
04/25/2007 08:20:12,spid108,Unknown,* SensApi                        0F880000  0F884FFF  00005000
04/25/2007 08:20:12,spid108,Unknown,* cryptnet                       0F680000  0F691FFF  00012000
04/25/2007 08:20:12,spid108,Unknown,* SOFTPUB                        0F670000  0F674FFF  00005000
04/25/2007 08:20:12,spid108,Unknown,* mscorsec                       0F640000  0F652FFF  00013000
04/25/2007 08:20:12,spid108,Unknown,* mscorlib.ni                    0EAC0000  0F5A7FFF  00ae8000
04/25/2007 08:20:12,spid108,Unknown,* mscorwks                       080E0000  08640FFF  00561000
04/25/2007 08:20:12,spid108,Unknown,* xplog70                        07CA0000  07CA2FFF  00003000
04/25/2007 08:20:12,spid108,Unknown,* xplog70                        07C80000  07C8BFFF  0000c000
04/25/2007 08:20:12,spid108,Unknown,* xpstar90                       07C50000  07C75FFF  00026000
04/25/2007 08:20:12,spid108,Unknown,* odbcint                        07C30000  07C46FFF  00017000
04/25/2007 08:20:12,spid108,Unknown,* ATL80                          7C630000  7C64AFFF  0001b000
04/25/2007 08:20:12,spid108,Unknown,* BatchParser90                  07A40000  07A5EFFF  0001f000
04/25/2007 08:20:12,spid108,Unknown,* ODBC32                         07A00000  07A3CFFF  0003d000
04/25/2007 08:20:12,spid108,Unknown,* SQLSCM90                       079E0000  079E8FFF  00009000
04/25/2007 08:20:12,spid108,Unknown,* xpstar90                       07980000  079C7FFF  00048000
04/25/2007 08:20:12,spid108,Unknown,* xpsqlbot                       07960000  07965FFF  00006000
04/25/2007 08:20:12,spid108,Unknown,* msftepxy                       07490000  074A4FFF  00015000
04/25/2007 08:20:12,spid108,Unknown,* SQLNCLIR                       007A0000  007D2FFF  00033000
04/25/2007 08:20:12,spid108,Unknown,* comdlg32                       762B0000  762F9FFF  0004a000
04/25/2007 08:20:12,spid108,Unknown,* COMCTL32                       77530000  775C6FFF  00097000
04/25/2007 08:20:12,spid108,Unknown,* sqlncli                        337A0000  339C1FFF  00222000
04/25/2007 08:20:12,spid108,Unknown,* CLBCatQ                        777B0000  77832FFF  00083000
04/25/2007 08:20:12,spid108,Unknown,* xpsp2res                       10000000  102C4FFF  002c5000
04/25/2007 08:20:12,spid108,Unknown,* ntdsapi                        766F0000  76704FFF  00015000
04/25/2007 08:20:12,spid108,Unknown,* wshtcpip                       070B0000  070B7FFF  00008000
04/25/2007 08:20:12,spid108,Unknown,* hnetcfg                        071F0000  07248FFF  00059000
04/25/2007 08:20:12,spid108,Unknown,* dssenh                         070C0000  070E3FFF  00024000
04/25/2007 08:20:12,spid108,Unknown,* imagehlp                       76C10000  76C38FFF  00029000
04/25/2007 08:20:12,spid108,Unknown,* WINTRUST                       76BB0000  76BDAFFF  0002b000
04/25/2007 08:20:12,spid108,Unknown,* dbghelp                        06C10000  06D22FFF  00113000
04/25/2007 08:20:12,spid108,Unknown,* msfte                          069B0000  06C08FFF  00259000
04/25/2007 08:20:12,spid108,Unknown,* security                       06190000  06193FFF  00004000
04/25/2007 08:20:12,spid108,Unknown,* rasadhlp                       76F80000  76F84FFF  00005000
04/25/2007 08:20:12,spid108,Unknown,* winrnr                         76F70000  76F76FFF  00007000
04/25/2007 08:20:12,spid108,Unknown,* DNSAPI                         76ED0000  76EF8FFF  00029000
04/25/2007 08:20:12,spid108,Unknown,* RESUTILS                       05D50000  05D62FFF  00013000
04/25/2007 08:20:12,spid108,Unknown,* CLUSAPI                        05D30000  05D41FFF  00012000
04/25/2007 08:20:12,spid108,Unknown,* OLEAUT32                       77D00000  77D8BFFF  0008c000
04/25/2007 08:20:12,spid108,Unknown,* WSOCK32                        71BB0000  71BB8FFF  00009000
04/25/2007 08:20:12,spid108,Unknown,* VERSION                        77B90000  77B97FFF  00008000
04/25/2007 08:20:12,spid108,Unknown,* MTXCLU                         05D10000  05D28FFF  00019000
04/25/2007 08:20:12,spid108,Unknown,* msvcp60                        780C0000  78120FFF  00061000
04/25/2007 08:20:12,spid108,Unknown,* MSDTCPRX                       05C90000  05D07FFF  00078000
04/25/2007 08:20:12,spid108,Unknown,* XOLEHLP                        05C80000  05C85FFF  00006000
04/25/2007 08:20:12,spid108,Unknown,* COMRES                         77010000  770D5FFF  000c6000
04/25/2007 08:20:12,spid108,Unknown,* schannel                       76750000  76776FFF  00027000
04/25/2007 08:20:12,spid108,Unknown,* cryptdll                       766E0000  766EBFFF  0000c000
04/25/2007 08:20:12,spid108,Unknown,* kerberos                       05BC0000  05C17FFF  00058000
04/25/2007 08:20:12,spid108,Unknown,* iphlpapi                       76CF0000  76D09FFF  0001a000
04/25/2007 08:20:12,spid108,Unknown,* msv1_0                         76C90000  76CB6FFF  00027000
04/25/2007 08:20:12,spid108,Unknown,* MSCOREE                        05950000  05994FFF  00045000
04/25/2007 08:20:12,spid108,Unknown,* AUTHZ                          76C40000  76C53FFF  00014000
04/25/2007 08:20:12,spid108,Unknown,* rsaenh                         04E90000  04EBEFFF  0002f000
04/25/2007 08:20:12,spid108,Unknown,* WLDAP32                        76F10000  76F3DFFF  0002e000
04/25/2007 08:20:12,spid108,Unknown,* SAMLIB                         5CCF0000  5CCFEFFF  0000f000
04/25/2007 08:20:12,spid108,Unknown,* ole32                          77670000  777A3FFF  00134000
04/25/2007 08:20:12,spid108,Unknown,* NTMARTA                        77E00000  77E21FFF  00022000
04/25/2007 08:20:12,spid108,Unknown,* SQLOS                          344D0000  344D4FFF  00005000
04/25/2007 08:20:12,spid108,Unknown,* sqlevn70                       4F610000  4F7A3FFF  00194000
04/25/2007 08:20:12,spid108,Unknown,* instapi                        48060000  48069FFF  0000a000
04/25/2007 08:20:12,spid108,Unknown,* psapi                          76B70000  76B7AFFF  0000b000
04/25/2007 08:20:12,spid108,Unknown,* comctl32                       77420000  77522FFF  00103000
04/25/2007 08:20:12,spid108,Unknown,* SHLWAPI                        77DA0000  77DF1FFF  00052000
04/25/2007 08:20:12,spid108,Unknown,* SHELL32                        7C8D0000  7D0D2FFF  00803000
04/25/2007 08:20:12,spid108,Unknown,* NETAPI32                       71C40000  71C97FFF  00058000
04/25/2007 08:20:12,spid108,Unknown,* opends60                       333E0000  333E6FFF  00007000
04/25/2007 08:20:12,spid108,Unknown,* USERENV                        76920000  769E3FFF  000c4000
04/25/2007 08:20:12,spid108,Unknown,* WS2HELP                        71BF0000  71BF7FFF  00008000
04/25/2007 08:20:12,spid108,Unknown,* WS2_32                         71C00000  71C16FFF  00017000
04/25/2007 08:20:12,spid108,Unknown,* MSWSOCK                        71B20000  71B60FFF  00041000
04/25/2007 08:20:12,spid108,Unknown,* Secur32                        76F50000  76F62FFF  00013000
04/25/2007 08:20:12,spid108,Unknown,* MSASN1                         76190000  761A1FFF  00012000
04/25/2007 08:20:12,spid108,Unknown,* CRYPT32                        761B0000  76242FFF  00093000
04/25/2007 08:20:12,spid108,Unknown,* GDI32                          77C00000  77C47FFF  00048000
04/25/2007 08:20:12,spid108,Unknown,* USER32                         77380000  77411FFF  00092000
04/25/2007 08:20:12,spid108,Unknown,* RPCRT4                         77C50000  77CEEFFF  0009f000
04/25/2007 08:20:12,spid108,Unknown,* ADVAPI32                       77F50000  77FEBFFF  0009c000
04/25/2007 08:20:12,spid108,Unknown,* MSVCP80                        7C420000  7C4A6FFF  00087000
04/25/2007 08:20:12,spid108,Unknown,* msvcrt                         77BA0000  77BF9FFF  0005a000
04/25/2007 08:20:12,spid108,Unknown,* MSVCR80                        78130000  781CAFFF  0009b000
04/25/2007 08:20:12,spid108,Unknown,* kernel32                       77E40000  77F41FFF  00102000
04/25/2007 08:20:12,spid108,Unknown,* ntdll                          7C800000  7C8BFFFF  000c0000
04/25/2007 08:20:12,spid108,Unknown,* sqlservr                       01000000  02BCEFFF  01bcf000
04/25/2007 08:20:12,spid108,Unknown,*  MODULE                          BASE      END       SIZE
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*   Access Violation occurred reading address 00000000
04/25/2007 08:20:12,spid108,Unknown,*   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
04/25/2007 08:20:12,spid108,Unknown,*   Exception Address = 0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,*   04/25/07 08:20:12 spid 108
04/25/2007 08:20:12,spid108,Unknown,* BEGIN STACK DUMP:
04/25/2007 08:20:12,spid108,Unknown,*
04/25/2007 08:20:12,spid108,Unknown,* *******************************************************************************
04/25/2007 08:20:12,spid108,Unknown,SqlDumpExceptionHandler: Process 108 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
04/25/2007 08:20:12,spid108,Unknown,***Stack Dump being sent to D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0007.txt
04/25/2007 08:20:12,spid108,Unknown,Using 'dbghelp.dll' version '4.0.5'
04/25/2007 08:20:12,spid60,Unknown,An error occurred in the Service Broker internal activator while trying to scan the user queue '(null)' for its status. Error: 2905<c/> State: 1.
04/25/2007 08:20:12,spid60,Unknown,External dump process return code 0x20000001.<nl/>External dump process returned no errors.
04/25/2007 08:20:10,spid60,Unknown,Stack Signature for the dump is 0x1229B5AA
04/25/2007 08:20:10,spid60,Unknown,78132A36 Module(MSVCR80+00002A36)
04/25/2007 08:20:10,spid60,Unknown,781329AA Module(MSVCR80+000029AA)
04/25/2007 08:20:10,spid60,Unknown,01447720 Module(sqlservr+00447720)
04/25/2007 08:20:10,spid60,Unknown,0144789A Module(sqlservr+0044789A)
04/25/2007 08:20:10,spid60,Unknown,0144859B Module(sqlservr+0044859B)
04/25/2007 08:20:10,spid60,Unknown,01447562 Module(sqlservr+00447562)
04/25/2007 08:20:10,spid60,Unknown,01006DAB Module(sqlservr+00006DAB)
04/25/2007 08:20:10,spid60,Unknown,01006BBC Module(sqlservr+00006BBC)
04/25/2007 08:20:10,spid60,Unknown,01006A96 Module(sqlservr+00006A96)
04/25/2007 08:20:10,spid60,Unknown,0112F65C Module(sqlservr+0012F65C)
04/25/2007 08:20:10,spid60,Unknown,0112F70F Module(sqlservr+0012F70F)
04/25/2007 08:20:10,spid60,Unknown,0112CB04 Module(sqlservr+0012CB04)
04/25/2007 08:20:10,spid60,Unknown,0112D1D1 Module(sqlservr+0012D1D1)
04/25/2007 08:20:10,spid60,Unknown,0112EA61 Module(sqlservr+0012EA61)
04/25/2007 08:20:10,spid60,Unknown,0108A5CB Module(sqlservr+0008A5CB)
04/25/2007 08:20:10,spid60,Unknown,0108A56B Module(sqlservr+0008A56B)
04/25/2007 08:20:10,spid60,Unknown,01060A5A Module(sqlservr+00060A5A)
04/25/2007 08:20:10,spid60,Unknown,01476CB2 Module(sqlservr+00476CB2)
04/25/2007 08:20:10,spid60,Unknown,01476FD3 Module(sqlservr+00476FD3)
04/25/2007 08:20:10,spid60,Unknown,017FA720 Module(sqlservr+007FA720)
04/25/2007 08:20:10,spid60,Unknown,017FAADC Module(sqlservr+007FAADC)
04/25/2007 08:20:10,spid60,Unknown,01796B1B Module(sqlservr+00796B1B)
04/25/2007 08:20:10,spid60,Unknown,01793310 Module(sqlservr+00793310)
04/25/2007 08:20:10,spid60,Unknown,0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:10,spid60,Unknown,* Short Stack Dump
04/25/2007 08:20:10,spid60,Unknown,* -------------------------------------------------------------------------------
04/25/2007 08:20:10,spid60,Unknown,* *******************************************************************************
04/25/2007 08:20:10,spid60,Unknown,*      SegSs: 00000023:
04/25/2007 08:20:10,spid60,Unknown,*        Esp: 1189E584:  11895387  80C87378  80C872F0  00000000  03E90001  00087C2D
04/25/2007 08:20:10,spid60,Unknown,*     EFlags: 00010202:  00610067  00650074  0049003B  0076006E  006C0061  00640069
04/25/2007 08:20:10,spid60,Unknown,*      SegCs: 0000001B:
04/25/2007 08:20:10,spid60,Unknown,*        Ebp: 1189F67C:  1189F788  01793310  11895373  80C872F0  7093AB12  801E8B38
04/25/2007 08:20:10,spid60,Unknown,*        Eip: 0179438B:  828B118B  000000E0  C085D0FF  00B9850F  9D890000  FFFFEF8C
04/25/2007 08:20:10,spid60,Unknown,*        Edx: 00000E38:
04/25/2007 08:20:10,spid60,Unknown,*        Ecx: 00000000:
04/25/2007 08:20:10,spid60,Unknown,*        Ebx: 00000000:
04/25/2007 08:20:10,spid60,Unknown,*        Eax: 5ADE8598:  00000000  00000000  5ADE85B0  00000000  00000000  00000000
04/25/2007 08:20:10,spid60,Unknown,*        Esi: 00000000:
04/25/2007 08:20:10,spid60,Unknown,*        Edi: 80C872F0:  7093AB12  80C87FF0  00000007  B8A20008  7093AB15  00000000
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* dbghelp                        14200000  14312FFF  00113000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       76780000  76913FFF  00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       764A0000  76633FFF  00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       76300000  76493FFF  00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       341D0000  343AFFFF  001e0000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       33590000  33764FFF  001d5000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       333F0000  33583FFF  00194000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       14490000  1467AFFF  001eb000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       13D10000  13EFBFFF  001ec000
04/25/2007 08:20:10,spid60,Unknown,* OLEDB32R                       13770000  13780FFF  00011000
04/25/2007 08:20:10,spid60,Unknown,* MSDART                         133D0000  133E9FFF  0001a000
04/25/2007 08:20:10,spid60,Unknown,* oledb32                        13350000  133C8FFF  00079000
04/25/2007 08:20:10,spid60,Unknown,* msxml3                         11BD0000  11CE1FFF  00112000
04/25/2007 08:20:10,spid60,Unknown,* msxmlsql                       11AF0000  11BC5FFF  000d6000
04/25/2007 08:20:10,spid60,Unknown,* System.Xml                     10FA0000  11193FFF  001f4000
04/25/2007 08:20:10,spid60,Unknown,* System.Security                10F20000  10F61FFF  00042000
04/25/2007 08:20:10,spid60,Unknown,* System                         10C10000  10EF3FFF  002e4000
04/25/2007 08:20:10,spid60,Unknown,* System.Security.ni             10A90000  10B45FFF  000b6000
04/25/2007 08:20:10,spid60,Unknown,* System.Transactions            0FAD0000  0FB12FFF  00043000
04/25/2007 08:20:10,spid60,Unknown,* System.ni                      7A440000  7ABFDFFF  007be000
04/25/2007 08:20:10,spid60,Unknown,* System.Data                    102D0000  10596FFF  002c7000
04/25/2007 08:20:10,spid60,Unknown,* mscorjit                       0F910000  0F962FFF  00053000
04/25/2007 08:20:10,spid60,Unknown,* SqlAccess                      0F8A0000  0F8F5FFF  00056000
04/25/2007 08:20:10,spid60,Unknown,* SensApi                        0F880000  0F884FFF  00005000
04/25/2007 08:20:10,spid60,Unknown,* cryptnet                       0F680000  0F691FFF  00012000
04/25/2007 08:20:10,spid60,Unknown,* SOFTPUB                        0F670000  0F674FFF  00005000
04/25/2007 08:20:10,spid60,Unknown,* mscorsec                       0F640000  0F652FFF  00013000
04/25/2007 08:20:10,spid60,Unknown,* mscorlib.ni                    0EAC0000  0F5A7FFF  00ae8000
04/25/2007 08:20:10,spid60,Unknown,* mscorwks                       080E0000  08640FFF  00561000
04/25/2007 08:20:10,spid60,Unknown,* xplog70                        07CA0000  07CA2FFF  00003000
04/25/2007 08:20:10,spid60,Unknown,* xplog70                        07C80000  07C8BFFF  0000c000
04/25/2007 08:20:10,spid60,Unknown,* xpstar90                       07C50000  07C75FFF  00026000
04/25/2007 08:20:10,spid60,Unknown,* odbcint                        07C30000  07C46FFF  00017000
04/25/2007 08:20:10,spid60,Unknown,* ATL80                          7C630000  7C64AFFF  0001b000
04/25/2007 08:20:10,spid60,Unknown,* BatchParser90                  07A40000  07A5EFFF  0001f000
04/25/2007 08:20:10,spid60,Unknown,* ODBC32                         07A00000  07A3CFFF  0003d000
04/25/2007 08:20:10,spid60,Unknown,* SQLSCM90                       079E0000  079E8FFF  00009000
04/25/2007 08:20:10,spid60,Unknown,* xpstar90                       07980000  079C7FFF  00048000
04/25/2007 08:20:10,spid60,Unknown,* xpsqlbot                       07960000  07965FFF  00006000
04/25/2007 08:20:10,spid60,Unknown,* msftepxy                       07490000  074A4FFF  00015000
04/25/2007 08:20:10,spid60,Unknown,* SQLNCLIR                       007A0000  007D2FFF  00033000
04/25/2007 08:20:10,spid60,Unknown,* comdlg32                       762B0000  762F9FFF  0004a000
04/25/2007 08:20:10,spid60,Unknown,* COMCTL32                       77530000  775C6FFF  00097000
04/25/2007 08:20:10,spid60,Unknown,* sqlncli                        337A0000  339C1FFF  00222000
04/25/2007 08:20:10,spid60,Unknown,* CLBCatQ                        777B0000  77832FFF  00083000
04/25/2007 08:20:10,spid60,Unknown,* xpsp2res                       10000000  102C4FFF  002c5000
04/25/2007 08:20:10,spid60,Unknown,* ntdsapi                        766F0000  76704FFF  00015000
04/25/2007 08:20:10,spid60,Unknown,* wshtcpip                       070B0000  070B7FFF  00008000
04/25/2007 08:20:10,spid60,Unknown,* hnetcfg                        071F0000  07248FFF  00059000
04/25/2007 08:20:10,spid60,Unknown,* dssenh                         070C0000  070E3FFF  00024000
04/25/2007 08:20:10,spid60,Unknown,* imagehlp                       76C10000  76C38FFF  00029000
04/25/2007 08:20:10,spid60,Unknown,* WINTRUST                       76BB0000  76BDAFFF  0002b000
04/25/2007 08:20:10,spid60,Unknown,* dbghelp                        06C10000  06D22FFF  00113000
04/25/2007 08:20:10,spid60,Unknown,* msfte                          069B0000  06C08FFF  00259000
04/25/2007 08:20:10,spid60,Unknown,* security                       06190000  06193FFF  00004000
04/25/2007 08:20:10,spid60,Unknown,* rasadhlp                       76F80000  76F84FFF  00005000
04/25/2007 08:20:10,spid60,Unknown,* winrnr                         76F70000  76F76FFF  00007000
04/25/2007 08:20:10,spid60,Unknown,* DNSAPI                         76ED0000  76EF8FFF  00029000
04/25/2007 08:20:10,spid60,Unknown,* RESUTILS                       05D50000  05D62FFF  00013000
04/25/2007 08:20:10,spid60,Unknown,* CLUSAPI                        05D30000  05D41FFF  00012000
04/25/2007 08:20:10,spid60,Unknown,* OLEAUT32                       77D00000  77D8BFFF  0008c000
04/25/2007 08:20:10,spid60,Unknown,* WSOCK32                        71BB0000  71BB8FFF  00009000
04/25/2007 08:20:10,spid60,Unknown,* VERSION                        77B90000  77B97FFF  00008000
04/25/2007 08:20:10,spid60,Unknown,* MTXCLU                         05D10000  05D28FFF  00019000
04/25/2007 08:20:10,spid60,Unknown,* msvcp60                        780C0000  78120FFF  00061000
04/25/2007 08:20:10,spid60,Unknown,* MSDTCPRX                       05C90000  05D07FFF  00078000
04/25/2007 08:20:10,spid60,Unknown,* XOLEHLP                        05C80000  05C85FFF  00006000
04/25/2007 08:20:10,spid60,Unknown,* COMRES                         77010000  770D5FFF  000c6000
04/25/2007 08:20:10,spid60,Unknown,* schannel                       76750000  76776FFF  00027000
04/25/2007 08:20:10,spid60,Unknown,* cryptdll                       766E0000  766EBFFF  0000c000
04/25/2007 08:20:10,spid60,Unknown,* kerberos                       05BC0000  05C17FFF  00058000
04/25/2007 08:20:10,spid60,Unknown,* iphlpapi                       76CF0000  76D09FFF  0001a000
04/25/2007 08:20:10,spid60,Unknown,* msv1_0                         76C90000  76CB6FFF  00027000
04/25/2007 08:20:10,spid60,Unknown,* MSCOREE                        05950000  05994FFF  00045000
04/25/2007 08:20:10,spid60,Unknown,* AUTHZ                          76C40000  76C53FFF  00014000
04/25/2007 08:20:10,spid60,Unknown,* rsaenh                         04E90000  04EBEFFF  0002f000
04/25/2007 08:20:10,spid60,Unknown,* WLDAP32                        76F10000  76F3DFFF  0002e000
04/25/2007 08:20:10,spid60,Unknown,* SAMLIB                         5CCF0000  5CCFEFFF  0000f000
04/25/2007 08:20:10,spid60,Unknown,* ole32                          77670000  777A3FFF  00134000
04/25/2007 08:20:10,spid60,Unknown,* NTMARTA                        77E00000  77E21FFF  00022000
04/25/2007 08:20:10,spid60,Unknown,* SQLOS                          344D0000  344D4FFF  00005000
04/25/2007 08:20:10,spid60,Unknown,* sqlevn70                       4F610000  4F7A3FFF  00194000
04/25/2007 08:20:10,spid60,Unknown,* instapi                        48060000  48069FFF  0000a000
04/25/2007 08:20:10,spid60,Unknown,* psapi                          76B70000  76B7AFFF  0000b000
04/25/2007 08:20:10,spid60,Unknown,* comctl32                       77420000  77522FFF  00103000
04/25/2007 08:20:10,spid60,Unknown,* SHLWAPI                        77DA0000  77DF1FFF  00052000
04/25/2007 08:20:10,spid60,Unknown,* SHELL32                        7C8D0000  7D0D2FFF  00803000
04/25/2007 08:20:10,spid60,Unknown,* NETAPI32                       71C40000  71C97FFF  00058000
04/25/2007 08:20:10,spid60,Unknown,* opends60                       333E0000  333E6FFF  00007000
04/25/2007 08:20:10,spid60,Unknown,* USERENV                        76920000  769E3FFF  000c4000
04/25/2007 08:20:10,spid60,Unknown,* WS2HELP                        71BF0000  71BF7FFF  00008000
04/25/2007 08:20:10,spid60,Unknown,* WS2_32                         71C00000  71C16FFF  00017000
04/25/2007 08:20:10,spid60,Unknown,* MSWSOCK                        71B20000  71B60FFF  00041000
04/25/2007 08:20:10,spid60,Unknown,* Secur32                        76F50000  76F62FFF  00013000
04/25/2007 08:20:10,spid60,Unknown,* MSASN1                         76190000  761A1FFF  00012000
04/25/2007 08:20:10,spid60,Unknown,* CRYPT32                        761B0000  76242FFF  00093000
04/25/2007 08:20:10,spid60,Unknown,* GDI32                          77C00000  77C47FFF  00048000
04/25/2007 08:20:10,spid60,Unknown,* USER32                         77380000  77411FFF  00092000
04/25/2007 08:20:10,spid60,Unknown,* RPCRT4                         77C50000  77CEEFFF  0009f000
04/25/2007 08:20:10,spid60,Unknown,* ADVAPI32                       77F50000  77FEBFFF  0009c000
04/25/2007 08:20:10,spid60,Unknown,* MSVCP80                        7C420000  7C4A6FFF  00087000
04/25/2007 08:20:10,spid60,Unknown,* msvcrt                         77BA0000  77BF9FFF  0005a000
04/25/2007 08:20:10,spid60,Unknown,* MSVCR80                        78130000  781CAFFF  0009b000
04/25/2007 08:20:10,spid60,Unknown,* kernel32                       77E40000  77F41FFF  00102000
04/25/2007 08:20:10,spid60,Unknown,* ntdll                          7C800000  7C8BFFFF  000c0000
04/25/2007 08:20:10,spid60,Unknown,* sqlservr                       01000000  02BCEFFF  01bcf000
04/25/2007 08:20:10,spid60,Unknown,*  MODULE                          BASE      END       SIZE
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*   Access Violation occurred reading address 00000000
04/25/2007 08:20:10,spid60,Unknown,*   Exception Code    = c0000005 EXCEPTION_ACCESS_VIOLATION
04/25/2007 08:20:10,spid60,Unknown,*   Exception Address = 0179438B Module(sqlservr+0079438B)
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,*   04/25/07 08:20:10 spid 60
04/25/2007 08:20:10,spid60,Unknown,* BEGIN STACK DUMP:
04/25/2007 08:20:10,spid60,Unknown,*
04/25/2007 08:20:10,spid60,Unknown,* *******************************************************************************
04/25/2007 08:20:10,spid60,Unknown,SqlDumpExceptionHandler: Process 60 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
04/25/2007 08:20:10,spid60,Unknown,***Stack Dump being sent to D:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0006.txt
04/25/2007 08:20:10,spid60,Unknown,Using 'dbghelp.dll' version '4.0.5'

View Replies !
CLR User Defined Type Problem
How to implement something like Oracle ref fields (i mean field which type is another userdefined type) in CLR User Defined Type and how they should be correctly initialized? Also is it possible to define constructor for user defined type?

View Replies !
User Defined SQL Data Pull With ASP
Good Afternoon,
I have recently been tasked to come up with a means by which to create SQL data pulls based on user entries.  What I mean by this is, I will have a pre defined SQL data pull set up and the user can then select the criteria upon which to pull said data.
So, say I want to display a table where one of the colums has is the "Year".  I dont however want all years of data pulled, only 2005 - 2006.  So, in form field 1, I could select start year as 2005 and in form field 2, I could select end year as 2006.  This would then give me all data from this table based on that year range, or whatever year range I select and submit.
Is there a way to do this in ASP?  I have been reading up on UDF with SQL, but I cant find anything about linking it through the use of web forms or through ASP.  Or if there is another way to accomplish this?  Any assistance is very much appreciated!

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved