all groups > sql server programming > december 2006 > threads for thursday december 28
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
UDF Question
Posted by Steve Harp at 12/28/2006 8:30:48 PM
Hi Guys,
When I try to create the following UDF I get an error "The last
statement included within a function must be a return statement.".
create function dbo.udfItExists(@that int)
RETURNS bit
AS
Begin
if (Exists(select ID
from my_table
where this_col = @that))
re... more >>
How can I achieve this
Posted by Chris at 12/28/2006 8:21:00 PM
Hi,
How can I get the current Thursday of the week date if I run a query from
Sunday to Saturday?
i.e...If i run the query on Mon,Tue,...or Fri,Sat, I should display the
current week's Thusday date.
I don't have a calender table at the moment.
Thanks... more >>
SSIS expression script language?
Posted by Christophe Leroquais at 12/28/2006 6:50:40 PM
Hey there!
does anyone know a good site/documentation about the SSIS expression script
language (e.g.: used in Derived Columns)?
Thx,
Chris
... more >>
Unique index/constraint
Posted by Ant at 12/28/2006 6:20:00 PM
Hi,
I am wonderning what the difference is betweem using a unique index Vs. a
unique constraint, seeing as though a constraint creates an index by default.
Should I just only ever use a unique constraint & forget about using the
index?
Thanks for any suggestions.
ant... more >>
SqlTransaction and SqlCommand question
Posted by Jason Huang at 12/28/2006 5:04:16 PM
Hi,
In my SQL Server 2000 + C#, does the SqlTransaction has a limit on a
SqlCommand?
Thanks for help.
Jason
... more >>
Who invented MUCK when and where?
Posted by --CELKO-- at 12/28/2006 5:00:45 PM
I am working on SQL book #7 and I cannot find who invented "MUCK" fopr
Massive Unified Code Keys" (aka OTLT -- "One True Lookup Table") much
less when and where? Help! Google failed me!
... more >>
Who invented MUCK when and where?
Posted by --CELKO-- at 12/28/2006 4:59:46 PM
I am working on SQL book #7 and I cannot find who invented "MUCK" fopr
Massive Unified Code Keys" (aka OTLT -- "One True Lookup Table") much
less when and where? Help! Google failed me!
... more >>
nested loops vs merge joins
Posted by Derek at 12/28/2006 4:53:00 PM
trying to confirm my understanding of this topic
nested loops occur when both tables are indexed but the contents of one
result set is
larger than the other.
merge joins when both result sets are clustered and are the same size
do i have this understood correctly.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
to delete own post.
Posted by Sugandh Jain at 12/28/2006 4:19:18 PM
hi,
How to delete my own post from a news group?
this is not related to sqlserver programming, but generally i use this NG
the most, so asking the more skilled Ng users...
regards,
Sugandh
... more >>
Data type for Date/Time
Posted by Emily at 12/28/2006 2:22:45 PM
Hi,
I have a stored procedure that contains the following SQL statement:
CREATE TABLE #PrintReconcilication (
AccountID int,
PackageName varchar(40),
ClientName varchar(80),
Location varchar(80),
AccountName varchar(80),
ReportInstanceID int,
Status varchar(20),
Scanne... more >>
Caching Stored Procedure Output
Posted by Ben at 12/28/2006 2:18:54 PM
I've been asked to cache the output of a stored procedure. My first thought
is the new xml column. I'm thinking it would be pretty slick to take the
multiple resultsets from the stored procedure and convert them to xml and
place them into an Xml column and at a later point in time, query the... more >>
SQL 2005 Common Table Expression question
Posted by Kevin S. Goff at 12/28/2006 2:16:38 PM
Hi, all...here's my question....here's what I'd LIKE to do...
WITH CustListCTE AS
(SELECT some stuff from some tables)
SELECT @@RowCount -- or SELECT COUNT(*) FROM CustListCTE
-- might be 200
SELECT * FROM CustListCTE WHERE (additional stuff)
-- might return 50... more >>
Error: is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Posted by Emily at 12/28/2006 1:05:42 PM
Hi,
I have a stored procedure and when I execute it, I always get the
following error:
"Column 'DistributionPrintReceiptInstance.DistributionCommonInstanceID'
is invalid in the select list because it is not contained in either an
aggregate function or the GROUP BY clause."
Could anyone t... more >>
Storing International Telephone Numbers
Posted by Fred Mertz at 12/28/2006 11:03:45 AM
I am designing a database that will need to store telephone numbers from -
potentially - any country.
Is there some well-recognized or generally recommended column definition
that I can use in my PhoneNumbers table? I'm thinking at least (1) country
code; (2) area code; and (3) phone number... more >>
What's the purpose of a Job Category?
Posted by Eric Bragas at 12/28/2006 10:47:50 AM
Hi, people.
I am setting up several jobs in SQL Server, all related to the same
task. I see in my Job Properties window that I can put this Job into a
category, and Books Online tells me I can "use job categories to
organize jobs for easy filtering and grouping."
Is that ALL that categorie... more >>
How to rename a constraint
Posted by dbuchanan at 12/28/2006 9:50:38 AM
SQLS 2005
How do I rename a constraint?
I can't change the constraint name with either sp_rename or directly
with management studio!
Exec sp_rename
@objname = 'DF_tblGeneralCalendar_Done'
,@newname = 'DF_Calendar_IsCompleted'
,@objtype = 'OBJECT';
The error with sp_rename is:
Msg ... more >>
Group by on date time column
Posted by Jami at 12/28/2006 5:38:27 AM
Hi
i have a date time column date_read in which date as well as time also
stores. iwant to group by on that column but due to date in that column
it returns me more rows than it should for each day. how can i group by
only on date
thanx
Jami
*** Sent via Developersdex http://www.d... more >>
SQLMORERES ignores cursor name
Posted by anteperkovic NO[at]SPAM vip.hr at 12/28/2006 4:27:22 AM
Hi, all
I spent 3 hours debugging these 2 lines of code:
----
lnExec = SQLExec(lnHandle,lcSql,'curDataSql') && First result set
SQLMORERES(lnHandle, 'curDataSql2') && Second result set
----
The code above worked perfectly when I changed 'curDataSql2' to
'curDataSql1'
At last, I f... more >>
query cost
Posted by Nassa at 12/28/2006 1:58:02 AM
Hi Everyone,
How can I find out that which query is the best for specific plan?
Thanks all,
Nassa
... more >>
Year To Date (SQL Statement)
Posted by magix at 12/28/2006 12:50:52 AM
Hi,
I got a field called salesmonth as data type "numeric(18, 0)"
the entries for this field will be <yyyy><mm> format.
i.e
200601
200608
I need to make an sql statement that find the Year-To-Date volume
For example: Let say I have following entries in table tblA
salesmonth ... more >>
Declare Cursor error while implementing SCROLL CURSOR
Posted by invy at 12/28/2006 12:45:55 AM
Hi,
I'm experiencing a problem while declaring scroll cursor. I'm
using Embeded SQL with C. my code is given below.
#ifdef SQLSRVR_RDBMS
EXEC SQL DECLARE CUR_DWNLD SCROLL CURSOR FOR SCURS;
EXEC SQL PREPARE SCURS FROM :S_QRY;
#endif
When i compile with nsqlprep, The error ... more >>
|