Click here to Skip to main content
15,918,243 members
Home / Discussions / Database
   

Database

 
GeneralUsing TOP operator within a WHERE clause Pin
OBRon3-Feb-04 10:33
OBRon3-Feb-04 10:33 
GeneralRe: Using TOP operator within a WHERE clause Pin
David Llamas3-Feb-04 10:39
David Llamas3-Feb-04 10:39 
GeneralRe: Using TOP operator within a WHERE clause Pin
OBRon3-Feb-04 10:45
OBRon3-Feb-04 10:45 
Generaladvanced ADO.NET and Oracle Database Pin
koo93-Feb-04 9:33
koo93-Feb-04 9:33 
GeneralRe: advanced ADO.NET and Oracle Database Pin
Guillermo Rivero3-Feb-04 10:40
Guillermo Rivero3-Feb-04 10:40 
GeneralRe: advanced ADO.NET and Oracle Database Pin
koo93-Feb-04 11:15
koo93-Feb-04 11:15 
GeneralRe: advanced ADO.NET and Oracle Database Pin
Mike Dimmick4-Feb-04 2:39
Mike Dimmick4-Feb-04 2:39 
GeneralUsing UDFs in a SELECT Pin
Colin Angus Mackay3-Feb-04 5:28
Colin Angus Mackay3-Feb-04 5:28 
Hello,

I am trying to generate some statistics from my SQL Server 2000 database. I have two UDFs, one which determines which days have complete data for a range of dates, and the other generates the statistics for a particular day.

I am fustrated because SQL Server doesn't seem to want to allow me to use these functions as I would like.

I even dumped the contents of the dates function into a table variable so I do something like:
DECLARE @dates TABLE([date] smalldatetime)
INSERT INTO @dates
SELECT [date] FROM dbo.dates_with_complete_data(@start_date, @end_date)


The above works fine, but if I try an use that as input to the other function I get errors.
SELECT calc.*
FROM @dates as fd
INNER JOIN (dbo.calculation(fd.[date])) as calc
ON cc.[date] = fd.[date]


Can anyone shed some light on how I might tackle this? If I remain stuck I might have to do the unthinkable and create my first ever cursor! Eek! | :eek:

--Colin Mackay--

EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar


GeneralRe: Using UDFs in a SELECT Pin
michanne4-Feb-04 3:02
michanne4-Feb-04 3:02 
GeneralRe: Using UDFs in a SELECT Pin
Colin Angus Mackay4-Feb-04 4:28
Colin Angus Mackay4-Feb-04 4:28 
GeneralRe: Using UDFs in a SELECT Pin
michanne4-Feb-04 8:38
michanne4-Feb-04 8:38 
GeneralRe: Using UDFs in a SELECT Pin
Mike Dimmick9-Feb-04 3:51
Mike Dimmick9-Feb-04 3:51 
Generaltabledef access using ADO.NET Pin
kcharney2-Feb-04 12:03
kcharney2-Feb-04 12:03 
GeneralProblems with Access and Odbc Pin
jan larsen1-Feb-04 23:18
jan larsen1-Feb-04 23:18 
Questionedit value from datagrid but can't update database-how? Pin
Member 5754691-Feb-04 15:42
Member 5754691-Feb-04 15:42 
GeneralMicrosoft SQL 2 tables alias GROUP BY questions Pin
Member 57510430-Jan-04 15:59
Member 57510430-Jan-04 15:59 
GeneralRe: Microsoft SQL 2 tables alias GROUP BY questions Pin
Edbert P3-Feb-04 11:50
Edbert P3-Feb-04 11:50 
GeneralReading in an XML File into a DataSet Pin
Member 64401630-Jan-04 7:55
Member 64401630-Jan-04 7:55 
GeneralRe: Reading in an XML File into a DataSet Pin
Mazdak31-Jan-04 5:36
Mazdak31-Jan-04 5:36 
GeneralADO.NET,C#, and MS:Access Pin
Nick Jacobs30-Jan-04 5:38
Nick Jacobs30-Jan-04 5:38 
GeneralCDao MFC classes and a Access 97 DB Pin
Phil.Benson29-Jan-04 21:46
professionalPhil.Benson29-Jan-04 21:46 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Steve S10-Feb-04 6:27
Steve S10-Feb-04 6:27 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Phil.Benson10-Feb-04 20:27
professionalPhil.Benson10-Feb-04 20:27 
GeneralRe: CDao MFC classes and a Access 97 DB Pin
Phil.Benson11-Feb-04 1:40
professionalPhil.Benson11-Feb-04 1:40 
GeneralC++ and Database Pin
vin29-Jan-04 19:07
vin29-Jan-04 19:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.