all groups > sql server programming > september 2007 > threads for monday september 10
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
Paramatized SP's
Posted by Robert Bravery at 9/10/2007 9:13:00 PM
HI all,
I have a query which takes a few prameters, at the moment they are all of
type int.
Which works great, filtering the data as I want it.
But now the client has asked that at times he also wants all the data, ie
unfiltered. Is there a way to achieve this, without changing the sp
sig... more >>
GETDATE in a function, run in another coutry than the client
Posted by Savvoulidis Iordanis at 9/10/2007 5:54:26 PM
how can i create a function to return the current date in my country, when
the server is hosted for free in another country with a time difference?
So far i created the following:
-----------------------------------
-- created the procedure because
-- I can't use GETDATE() inside a function... more >>
Re: getdate in a function, run in another coutry than the client
Posted by Savvoulidis Iordanis at 9/10/2007 5:47:27 PM
how can i create a function to return the current date in my country, when
the server is hosted for free in another country with a time difference?
So far i created the following:
-----------------------------------
-- created the procedure because
-- I can't use GETDATE() inside a function... more >>
Does a Cursor create an implicit transaction?
Posted by John Kotuby at 9/10/2007 5:41:32 PM
Hi all,
I am trying to improve concurrency in a multiuser application. Orignally
during a Check Run commit of data, I was wrapping each check...the actual
Check info itself and all the invoices associated with it (20 to 40) in an
explicit transaction. Since the a single run of multiple chec... more >>
COUNT(*)
Posted by Jay at 9/10/2007 5:20:09 PM
I heard that using COUNT(*) uses more resources than using COUNT(1), or
COUNT(col1).
Is this true?
Has it ever been true in any version of SQL Server?
The argument was that a * has to be parsed by the engine, as in 'SELECT *',
but I just can't see how that could be true.
Please enlig... more >>
SQLSelect
Posted by brandon at 9/10/2007 5:10:03 PM
I have a Customer table. I am writing a Select for Search.
Select * from Customer where Deleted<>1 AND ((DateCreated BETWEEN
@FromDate AND @ToDate) AND (FirstName = @FirstName)
AND (LastName = @LastName) AND (Email = @Email))
I want only the values in WHERE clause when the variable <>"".
Su... more >>
unable to set SELECT into ....
Posted by npb.sas NO[at]SPAM googlemail.com at 9/10/2007 2:24:39 PM
Dear Group
I am trying to set two options on my MS SQL Database:
sp_dboption userDB, 'trunc. log on chkpt.', 'TRUE'
go
sp_dboption userDB, 'select into/bulkcopy', 'TRUE'
go
however i get only
trunc. log on chkpt.
auto create statistics
auto update statistics
any ideas why... more >>
SMO : Using ManagedComputer to change TCP/IP ports
Posted by Keith at 9/10/2007 2:22:22 PM
Hello,
2nd try...
I'm trying to use SMO to programatically change the default tcp ports of a
SQL Express named instance. This is the code I'm using and while it
compiles and runs, nothing actually happens. If I check using Configuration
Manager the port values haven't changed. I'm stoppi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Unable to Set select into...
Posted by npb.sas NO[at]SPAM googlemail.com at 9/10/2007 2:16:43 PM
Dear Group
I am trying to set two options on my MS SQL Database:
sp_dboption MASTER_V521, 'trunc. log on chkpt.', 'TRUE'
go
sp_dboption MASTER_V521, 'select into/bulkcopy', 'TRUE'
go
however i get only
trunc. log on chkpt.
auto create statistics
auto update statistics
any ideas... more >>
Migration from SQL 2000 to 2005 T-SQL guide
Posted by Chuck at 9/10/2007 2:04:01 PM
I'm looking for reference materials that discuss SQL 2000 T-SQL statements
that are not compatible with SQL 2005. I'm upgrading from SQL 2000 to 2005
(and then onto 2008).... more >>
How to merge/join 2 cursor
Posted by Mehbs at 9/10/2007 11:18:47 AM
I have 2 tables. Table one has part number and its total quantity. Table
two has detail.
I want to select all records from table one which has quantity more than 0
and save it in cursor1.
I have so many transactions in table two and selecting records and summing
the qty by using group ... more >>
what is 2^3 (ask sql server)
Posted by d at 9/10/2007 10:37:59 AM
well, tonight i found some weired behavior of sql server, i think its
a bug in POWER function
if you know what is 2^3 (two to the power of three)
hold on ... there is is twist...
SELECT POWER(CAST(2 AS DECIMAL(38,34)),3)
see the result
and try it in the sql server (i tested in sql se... more >>
DML Trigger
Posted by Samson at 9/10/2007 10:04:03 AM
I m looking to create a trigger that monitors my AccessRequest Table for any
new records. Basically when a record gets created or inserted I want an
event to send an email to a specific user. I need to utilize the
sp_send_dbmail which I have configured and ready to go.
This is what I ... more >>
Is this the right place to ask SMO questions?
Posted by Keith at 9/10/2007 9:52:04 AM
Hello,
I'm having an SMO problem and am wondering if this is the right NG to ask
about it.
Thanks!
Keith
... more >>
How to create SQL 2005 jobs using packages built in SSIS
Posted by at 9/10/2007 7:26:57 AM
Hi,
I create a package in SSIS which imports a flat file to one of the
tables in the database.
When I execute the package manually, everything runs fine. But for
some reason, when I create a new job, job fails and it invokes
following error.
Date,Source,Severity,Step ID,Server,Job Name,... more >>
Synchronization. How to solve this?
Posted by shapper at 9/10/2007 6:39:28 AM
Hello,
I have 3 tables with their columns:
[Articles] > ArticleId, ArticleText
[Categories] > CategoryId, CategoryText
[CategoriesInArticles] > ArticleId, CategoryId
I created a stored procedure that has the following inputs:
ArticleId, ArticleCategories
ArticleCategories is of ... more >>
Tail log backups
Posted by Sammy at 9/10/2007 5:08:01 AM
Hi I have tried to restore a sql 2000 backup file on sql 2005 as part of a
move database and received an error ' The tail of the log for the database
has not been backed up'
I was looking on the MS site:
When you restore an existing database, SQL Server 2005 requires that you
back up t... more >>
making app understand countryid without changing sourcecode in app
Posted by Kjell Brandes at 9/10/2007 1:46:08 AM
I'm in for making an application understand countrycodes without changing
sourcecode.
What I mean is that I want the application to stay intact regarding
sourcecode, I can get a value in the connectionstring to the database so by
using the function appname() serverside (SQL) i can resolve wic... more >>
Testing/Trapping for binding errors
Posted by Paddy at 9/10/2007 12:58:08 AM
I have a problem, where having just started with a new company, I have
come across some bad practices. Users are directly accessing databases
for reporting and uploading data. Now some of this I have to live
with, but as a first step of moving them away from this practice, I am
creating new data... more >>
SQL Query Editor shows junk characters
Posted by Nj at 9/10/2007 12:06:02 AM
I have Vista and SQL 2005 installed. While using the query editor from SQL
management studio, it behaves in a weird way. It shows up junk characters for
the query which is being edited.
Please advise.... more >>
How to Get "Name of Person Who Has Highest Salary in a Group"
Posted by Charles Law at 9/10/2007 12:00:00 AM
If there is a better group for this question please shout.
I have a table of people with salaries and want to return the name of each
person with the highest salary in a group. What I would like to write is
SELECT Name, Department, MAX(Salary) AS Salary,
FROM Salaries
GROUP BY Department
... more >>
Update Column based on sorting of another column
Posted by Matt Bolton at 9/10/2007 12:00:00 AM
I have a problem that I'd have thought would be not uncommon, but
can't seem to find a solution anywhere.
I have data that looks basically like this
PK FK SortOrder Value_1 Value_2
1 1 4 4
2 1 2 3
3 1 3 7
4 1 1 3
5 2 2 2
6 2 4 3
7 3 8 2
8 3 6 4
9 3 6 5
10... more >>
|