all groups > sql server programming > august 2007 > threads for wednesday august 29
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
Selecting first X consecutive integers
Posted by Bill at 8/29/2007 10:55:28 PM
I have a table of various integers
How can I select the first ocurrance of a consecutive grouping of x
integers?
example, if the table contains 1, 3, 4, 7, 8, 9, 11, 22, 333
mystp (3) would return 7 because 7,8,9 is the first consecutive 3 numbers
mystp (2) would return 3 because 3,4... more >>
SP_OA create method taking much time.... pls help
Posted by Gowtham at 8/29/2007 10:52:03 PM
Procedure Long Running SP_OACreate
Hi,
WE have a procedure which uses sp_OAcreate to use COM objects
The problem is this procedure is long running, When I reboot the server the
procedure is finishing within few minutes
I have increased the SQL memory from Min: 832 MB max: 1792 MB to Mi... more >>
Calculated columns for payroll overtime dependent on hours worked & date
Posted by morleyc NO[at]SPAM gmail.com at 8/29/2007 7:33:12 PM
Hi, i am writing some queries for a payroll section of a database. An
employee has a field in their table which states their
StandardWorkingHours, typically 8 hours per day.
I also have a second table called HoursWorked, and consists of the
following fields:
EmployeeID_FK
HoursWorked
Date... more >>
odbc issue on mapping schemas ?...
Posted by keyser soze at 8/29/2007 7:21:40 PM
hi
i connect via ODBC
with a login under certain "schema_x"
if i try to execute a stored proc "myProc"
if "schema_x.myProc" don't exists
i believe sql server then should try with "dbo.myProc"
but it is not working
it seems sql always try to map to "dbo.myProc"
without trying to map "sche... more >>
Query Analyser and Execution Plan
Posted by Daniel at 8/29/2007 4:50:12 PM
I have read in a couple books about these 2 things.. and i have yet to
actually find them within our SQL2005 server...
We have a few queries we would like to view the execution plan to see the
estimated time it will take to process...
and
We woudl like to check out the query analyzer th... more >>
Two DTSX packages in a project - only one will run
Posted by doofy at 8/29/2007 3:42:12 PM
I've got two DTSX packages in one project.
When I make one the one showing in the main screen, then hit the run
button, it runs the other one. Every time.
How do I make it run the one I want?
Are there any good books on how SSIS stores its files, or what the hell
it does when you try t... more >>
Leap year fn?
Posted by David C at 8/29/2007 3:39:59 PM
Is there a system function that can tell if a given year is a leap year?
Thanks.
David
... more >>
How not to return NULL when no data exist
Posted by mitra at 8/29/2007 2:08:01 PM
Hi All,
With help from this newsgroup I got the sql query shown below to return rows
as column.
Now, I need to make a minor modification to the sql query to NOT return rows
with NULL value when no data was found for MimeDate and/or MimeSubject,
and/or MimeMessageID. When I added a WHERE ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Files and Cores
Posted by CLM at 8/29/2007 1:14:00 PM
I was just reading the following from MS regarding performance:
http://www.microsoft.com/technet/prodtechnol/sql/2005/physdbstor.mspx
In this link MS recommends the following:
"The number of data files within a single filegroup should equal to the
number of CPU cores."
What is the reas... more >>
Datetime
Posted by guztavoga at 8/29/2007 10:12:00 AM
I have field in my data base datetime data type fields they have this
information
2004-06-09 11:37:25.483
I want to write a T-SQL sentence but i need to get as a result just the date
part with out the time.
It 's possible, can you help me?
... more >>
Detect Trailing Spaces in a WHERE clause
Posted by Leslie at 8/29/2007 8:26:08 AM
I need to be able to detect the difference between '3020' and '3020 ' in a
select statement WHERE clause. I have tried "CONTAINS" but get the error
'Cannot use a CONTAINS or FREETEXT predicate on table 'SalesOrder' because it
is not full-text indexed.' I do not have the ability to change the... more >>
Set SQL permissions by group
Posted by snowburnt at 8/29/2007 8:08:21 AM
I am making an ASP webpage that requires user authentication to Active
Directory. I would like to make it so that only certain users can run
select queries on only certain tables and only certain users can run
update queries on certain tables and so on.
Is it possible to specify these permiss... more >>
Upgrade from 2000 to 2005 now very slow
Posted by David Waldock at 8/29/2007 6:34:03 AM
Hi Guys
6 months ago my predecessor (no longer working for us) upgraded a live
database from SQL2000 to SQL2005 without any planning; after a week of sheer
panic, we got it working without collapsing, but there is a marked difference
in performance between the application running on SQL2000... more >>
Appname?
Posted by Kjell Brandes at 8/29/2007 4:52:00 AM
Is there any way to get applicationname with a SELECT, I'm talking about the
param (APP=name_of_application) that you can provide in connectionstring when
connecting to SQL server. I have seen this name on "Process Info" tab in
Enterprise Manager...
reg.
Kjell Brandes... more >>
Internal SQL Server error
Posted by Himanshu at 8/29/2007 4:50:01 AM
Command being sent:
exec SiteProdRatesCalc 'RTS', 'EUR', 'Aug 9 2007 12:00:00:000AM', NULL,
140, NULL, 76
Results:
Server: Msg 8624, Level 16, State 1, Procedure SiteProdRatesCalc, Line 890
Internal SQL Server error.
DELETING ANY SITEPRODUCTRATES ENTERED TODAY FOR FC, OT, NT BY SITE GROUP... more >>
Please help me, itz an urgent
Posted by pal at 8/29/2007 4:18:12 AM
Hi guys,
I have two tables, let me say Table1 , Table2
both table have a field "Table_code"
I need a query to retrieve the Table_codes from Table2 which
Table_codes are not present in
Table1.
Please help me.
... more >>
Reset @@DBTS
Posted by Bob at 8/29/2007 3:56:01 AM
Is there a way to reset the @@DBTS value?
I realise there may be some "Why do you want to do that ?" answers - we're
working on that one.
Thanks... more >>
SQL-DMO for SQL Server 2005 in Windows 98 SE
Posted by Sergio Martins at 8/29/2007 3:12:01 AM
Hi.
It´s possible to install the SQL-DMO for SQL Server 2005 in a machine with
Windows 98 SE?
My problem is when I try to register the "sqldmo.dll" for SQL Server 2005 I
allways get the error LoadLibrary("C:\Programas\Microsoft SQL
Server\80\Tools\Binn\sqldmo.dll")failed. GetLastError retur... more >>
Pass a parameter from a bat/cmd file to a SQL Script
Posted by morrell at 8/29/2007 2:54:26 AM
I have the following Batch file:-
rem script to create Basic Structure
del output.log
CALL :load "Database.sql" %1 %2
CALL :load "tables.sql" %1 %2
CALL :load "PK and FK.sql" %1 %2
GOTO :end
:load
echo FILE: %1
echo. >> output.log
echo FILE: %1 >> output.log
osql -S %2 -E -d %3 -... more >>
Wierd Substring Argument Error
Posted by TheSQLGuru at 8/29/2007 12:15:52 AM
/*
Hey guys. It is waaayy too late and I am just missing something here. A
query that works if I use a temp table throws an error if I write it using a
derived table. Hopefully someone can quickly spot whatever the heck I am
missing. Thanks in advance!! Oh, and don't even get me started ... more >>
Debugging Stored Procedures in SQL 2005
Posted by Waldy at 8/29/2007 12:00:00 AM
Hi there,
how do I debug a stored procedure in SQL 2005?
... more >>
Query very slow
Posted by Robin Tucker at 8/29/2007 12:00:00 AM
Hi,
the following query:
USE MYDB
DECLARE @Constant_IP INTEGER
DECLARE @Constant_Image INTEGER
SET @Constant_IP = dbo.Constant ( 'ip')
SET @Constant_Image = dbo.Constant ( 'image' )
SELECT Adjacency1.ID,
(SELECT TOP 1 Condition
FROM
... more >>
Reseting identities
Posted by Roy Goldhammer at 8/29/2007 12:00:00 AM
Hello there
Is there a simple way to reset identity Starting point and Increment for
entire database?
Instead of creating huge script with alter table for that
... more >>
@@identity - SQL Server 2005
Posted by AF at 8/29/2007 12:00:00 AM
I was told there is a hotfix available from Microsoft to 'enable' the
@@identity function in SQL Server 2005. Could someone here confirm /
deny?
Cheers
... more >>
Check Data Exists
Posted by Chris at 8/29/2007 12:00:00 AM
In our system users can create custom reports. Before they run the report I
like to run an EXISTS check to see if any data will be returned and if
nothing is found I display a message box instead of running a blank report.
The query I am doing is this...
IF EXISTS (SELECT * FROM vwAgentSt... more >>
Need for separate [encrypted] database for tiny subset of Encrypted fields required?
Posted by at 8/29/2007 12:00:00 AM
I am building a web application (.NET) with E-Commerce functionality.
One piece of data that we have to store is social security number, and
credit card number for the shopping customer. This is literally the
only
data that requires encryption, and being doubly defended throgh
firewalls,
an... more >>
|