all groups > sql server programming > may 2006 > threads for monday may 15
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
users; http://www.sqldev.net/xp/xpsmtp.htm
Posted by rmanchu NO[at]SPAM gmail.com at 5/15/2006 11:27:10 PM
to users of this sql server xp;
recipients are comma separated but how to specify recipents by name?
there is no field like 'fromName' like 'toName'
is there a format that can be used?
thanx
riyaz
... more >>
using text
Posted by Roy Goldhammer at 5/15/2006 8:59:16 PM
Hello there
I need to build T-sql update parse dinamicly which can be more then 8000
characters.
I can't (as far as i know) use text as varient, i can't concarent another
text to it, and so on
here is somthing i tried to run:
create table Test (
id int identity(1,1) primary key clustere... more >>
2005 BOL T-SQL reference
Posted by scott at 5/15/2006 5:31:50 PM
I searched 2005 BOL for it's T-SQL reference, but didn't find it. where is
it?
... more >>
Context connection and transactions
Posted by Grafix at 5/15/2006 4:09:01 PM
All -
Facts:
(a) SqlConnection allows only one "Context connection" to be opened at a time.
(b) SqlConnection doesnt support parallel transactions. (calling a second
BeginTransaction before committing the first BeginTransaction throws
exception)
Problem:
Lets say a piece of C# code who... more >>
question about locking
Posted by Stein Lundbeck at 5/15/2006 3:58:32 PM
Hi,
I have a table where we save loan applications.
I've created a web page for processing these applications.
Now there are up to 10 people using the site, and they sometimes end up with
the same application.
In the table there is a column called STATUS. If the value of STATUS is -1,
th... more >>
pictures in the database
Posted by Paul Pedersen at 5/15/2006 3:56:57 PM
I have a database that will be required to produce photographs for an
application. What are the relative merits of storing the photo in the
database versus storing storing the photos elsewhere on the disk and passing
only the photo's path to the application? Which method is recommended?
... more >>
Split 1 Field into 2 Column Result.
Posted by JDArsenault at 5/15/2006 3:20:01 PM
My T-Sql is suffering & anyone who can help would be greatly appreciated.
I have a name field which is populated as, "LastName ~ FirstName".
I would like to return a result set of the LastName & the FirstName
separately.
Substring won't work due to varying name length, so will LTrim & RTrim wo... more >>
Trigger Help
Posted by Lontae Jones at 5/15/2006 3:16:02 PM
Hello,
I have a table called Contact and it has 4 columns (ID,Name,Createdate and
Reason) when createdate and Reason is not empty I would like to have this
data inserted into a table called Contact2 (Createdate, Reason).
TIA... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Just need the row count of a query
Posted by John Smith at 5/15/2006 2:41:47 PM
Hello,
I have a query where I group by date and it displays a unique list of dates,
which is 3 dates.
How to create a query that just returns the number 3. I do not care for the
actual dates from the query, just the number of rows.
Currently I have the query dumping to a temp table ... more >>
addlogin into linked server
Posted by BF at 5/15/2006 2:31:01 PM
Hi,
I need to develop a stored procedure to add or drop SQL server logins into
SQL servers based on some logics users give to me. My stored procedure is on
one server. I need to add logins to other servers through linked server.
Does anybody know how to run sp_addlogin to add SQL logins in... more >>
Datetime in Where clause
Posted by Richard at 5/15/2006 2:08:02 PM
I have a simple stored procedure that updates the loggedout field, which is a
datetime field, in a table based on the user id and login date (which is also
a datetime field). Since a user can login multiple times throughout the day,
I need the Where clause to include the time, which is part of... more >>
How can I fix bad design?
Posted by Matthew Speed at 5/15/2006 1:26:03 PM
I've been asked to work on database for my employer. One field in one table
utilizes one of the worst violations of relational databases: multiple values
are stored in the same database field. Now I have a varchar(20) field with
values like ADEJG, BFGMR, GJNV etc., where each letter inidate... more >>
index tuning woes
Posted by param NO[at]SPAM community.nospam at 5/15/2006 12:41:12 PM
Hi all,
I was hoping the Index Tuning Wizard was improved in 2005, but apparently
not. Here is what I do:-
1. Start a new Profiler session and selected the Tuning template. Save it to
a file.
2. Launched the Index Tuning Wizard and selected the save file in step 1
above.
Essentially,... more >>
Performance problem
Posted by Brent White at 5/15/2006 11:53:17 AM
need help ASAP on this.
I had a stored procedure that pulls the "bookings" for our company
(sales, if you will) for the past year. Before, it looked like this:
SELECT UKDR, VANR, VMGS, VPR1, UDAT, VERA, UBLN,VMGL, ReportingGroup,
UVT1, SLNAME, UVT2, AXTXT, USL1
FROM (((bdg_view_Groupi... more >>
Job not running
Posted by Scott at 5/15/2006 11:32:27 AM
I'm trying to create a job for the first time. I only need it to execute a
"user" SPROC that imports data into table1 from linkedServer1. I'm choosing
the correct database, etc. options in the job properties, but nothing
happens when I right click the job and choose start.
The sql agent has... more >>
Syntax for passing the single-field result of a SELECT statement as an input parameter to a stored procedure?
Posted by keithb at 5/15/2006 11:01:30 AM
What is the T-SQL syntax for passing the single-field result of a SELECT
statement as an input parameter to a stored procedure?
Thanks,
Keith
... more >>
Stored procedure question
Posted by upnorth at 5/15/2006 10:52:02 AM
Hi I have a stored procedure that returns a record set such as
date result
05/may/2006 55
what I would like to do is, every time the stored procedure is run, create
the original record set but append a record to the data set with the current
date and time with a given re... more >>
Question
Posted by Chris at 5/15/2006 10:28:01 AM
Hi,
I notice in the adventureworks db and one of our act package db that there
is a rowguid, usually the last column, on almost every table. Why is that?
Thanks... more >>
Remove duplicate entries in a search
Posted by Matthew at 5/15/2006 10:24:41 AM
Is there a way to find only unique entries for a search. Currently I am
looking for jobs that a run for a give database, but the script will
return multiple job entries for the same job if the database is
reference many times in that job, (once per reference) is there a way
to weed out the dupli... more >>
Not sure how to do this query
Posted by Erich93063 at 5/15/2006 10:15:51 AM
I am not a SQL expert and I've been going in circles on this one.
I have a table that is part of a file management system. The part I am
dealing with has to do with images for some products. Each product has
three images associated with it. A thumbnail, a normal image and a
large image. The na... more >>
How to rename a database without detaching it?
Posted by Rich at 5/15/2006 10:03:03 AM
Hello,
Is there an SP for renaming a database without detaching it? Or is there a
method or feature in Enterprise Manager for doing this? How can I do this?
Thanks,
Rich
... more >>
OpenQuery & Quotes Syntax
Posted by Scott at 5/15/2006 9:33:47 AM
I'm trying to select records within a date range from a linked server. If I
don't include the WHERE part and it's variables, my sql retrieves all
records. I also can hard code the WHERE criteria like "loadID=500".
SQL returns an error on my below code saying"
Incorrect syntax near '+... more >>
NullReferenceException on an already instanciated object in SQL/C#
Posted by eljainc at 5/15/2006 9:12:02 AM
Hi, I've posted the following message in the .NET C# MSDN newsgroup, but
there really hasn't been the answer/help that I was expecting. Therefore I am
trying the thread here.
----------------------------
Hello, I have a perplexing situation. I have the following set of code, which
depends o... more >>
Help with view
Posted by Dan Shepherd at 5/15/2006 9:10:02 AM
I have a table with the following layout:
Docnumber, SlspersonA, AcctStatus, ThirdPartyName, SlspersonB, SlsManager,
SlsperACommissionRate, SlsperBCommissionRate, SlsManagerRate.
I need to create a view (or report) somehow that allows me to return
multiple rows where the Salesperson = X. Th... more >>
avoid deadlock at all cost
Posted by Zen at 5/15/2006 9:07:09 AM
Hi,
Is there a way to avoid deadlock completely, it will be ok for me if it goes
a store procedure with serializable execution (not just result via isolation
level). I can do it in my code but since we have many different servers, we
cannot easily serialize the execution in the code, so I'... more >>
reporting services print preview
Posted by Mike P at 5/15/2006 8:56:47 AM
Why whenever I create a report that is more than 1 page long, do I get a
blank page between every page of my report? In VS for example if I
create a 3 page report, I get a 6 page report and every other page is
blank on the print preview.
How do you prevent this?
Cheers,
Mike
... more >>
Junction table data integrity approaches
Posted by Ryan at 5/15/2006 8:55:25 AM
Hi group,
A database that I'm supporting has a 'super' many to many table (DDL
below) that joins any table to any other table. The business uses this
to create links between 'Vehicles', 'People', 'Groups of people',
'Places' and about ten other entities/tables.
Now I understand that this is... more >>
VS.Net Can't debug SQLEXPRESS Stored Procedure
Posted by NumbLock at 5/15/2006 8:53:02 AM
Hello all. I have done a full install of vs.net 2003 on my machine which is
working fine. I am trying to get SQL debugging to work on a default instance
of SQLEXPRESS 2005. In Vs.net, the options for debugging stored procedures
are not there. If I install an instance of MSDE 2000 then the... more >>
Installing on server - stupid question
Posted by Sandy at 5/15/2006 7:09:02 AM
Hello -
I've only installed Sql Server on my development machines. I now need to
install it on the server. I've always installed it in the default Program
Files. Do I do the same thing on the server?
Any help will be greatly appreciated!
--
Sandy... more >>
service broker query
Posted by Mana at 5/15/2006 6:42:29 AM
Hi,
I am writing an application using sql server 2005 service broker.
When a message arrives in a queue a mail has to be sent out. For this
purpose i have created a stored procedure using managed code and
registered it using "create procedure statement".
When I send a message for the firs... more >>
Insert query problem
Posted by amjad at 5/15/2006 6:29:01 AM
I am getting this message
"Msg 128, Level 15, State 1, Line 2
The name 'A0000000000 B00C3124901 C00200603071' is not permitted in this
context. Only constants, expressions, or variables allowed here. Column names
are not permitted."
when i execute below query in store procedure which ... more >>
Setup SQL Jobs to run programs
Posted by rax at 5/15/2006 6:26:01 AM
Hi,
I have a SQL 2000 SP3 server runnning on Windows 2003 Server, I have
recently installed MOM 2005, the reporting aspect og MOM uses a task
scheduler run executables for DTS.
the following are the comands it runs
Run: MOM.Datawarehousing.DTSPackageGenerator.exe /silent
/srcserver:MOMd... more >>
[SQL Server 2005] Sub-query and "WITH" CTE, which statement would be faster for database paging?
Posted by Parco at 5/15/2006 5:07:17 AM
1.
=====================================================================
SELECT * FROM ( SELECT TOP 20010 *, ROW_NUMBER() OVER( ORDER BY [posttime]
DESC ) AS [rowcounting] FROM [topics] ORDER BY [posttime] DESC ) AS
[temptable] WHERE [rowcounting] > 20000
=====================================... more >>
DataGrid DataSet DataAdaptor DataBase problem.
Posted by marcmc at 5/15/2006 4:50:01 AM
My dataset is not updating my database after the user modifies the datagrid.
I populate my data with the load sub below.
In the Save Sub (below), I have generated my DataSet 'dataSet11' from my
DataAdaptor 'SqlDataAdapter1' and the DataConnection 'SqlConnection1' and
they all seem to be conn... more >>
how to fomat sql output as required xml format
Posted by kishore bondada at 5/15/2006 2:50:01 AM
i have a table with the following data
Test1 (table name)
----------------------
empid name1 name2
-----------------------------------
35 kishore bondada
upon executing a query such as
select 1 as TAG, 0 as parent, empid as [Employee!1!empid!element],
... more >>
UPDATE...FROM question (T-SQL)
Posted by mj.redfox.mj NO[at]SPAM gmail.com at 5/15/2006 1:35:19 AM
Hello,
I'm using an UPDATE..FROM statement, which I've based on someone else's
example and tested and know works...I was just wondering if someone
could explain for me whether my understanding of it is correct?
My statement is a fairly simple one (below)...the only thing I'm
struggling to g... more >>
Yesterday's Date
Posted by Chamark at 5/15/2006 1:23:35 AM
I am young in learning SQL so your assistance is greatly appreciated. I would
like to get yesterday's date to use in a Select statement (Select * where
transdate = ????). I understand GetDate() -1, but I need to take in
consideration that if I run the Select statement on a Monday that I really
... more >>
about Store Procedure
Posted by amjad at 5/15/2006 1:14:02 AM
Hi i have store procedure called runontime suppose.... i want to run that
store procedure mid night from monday to friday automatically . is their any
facility available in sql server 2005 to do that like timer thanks... more >>
unique key that can be null
Posted by msnews.microsoft.com at 5/15/2006 12:00:00 AM
Hi,
I have a field (specifically email) that can be null (possilbly I don't
know the email of a customer).
But if I know the email of a customer then it MUST be unique (so a
customer is not twice in the table).
I know I can do it with an instead of insert trigger, but I am just
curios if I ... more >>
Procedure takes more I/O on machine than on other
Posted by Pushkar at 5/15/2006 12:00:00 AM
Hi,
I have a procedure for which I get different phsical_io reading from
sysprocesses on two different servers.
And this difference is not twice or thrice, but it is 10 times more I/O on
other machine.
What could be the possible cause?
I have verified both have exactly same tables design a... more >>
Truncate Table On Linked Server?
Posted by Neil at 5/15/2006 12:00:00 AM
Can one use Truncate Table on a linked server table? When I try it, I get a
message that only two prefixes are allowed. Here's what I'm using:
Truncate Table svrname.dbname.dbo.tablename
... more >>
Stored procedure takes different time to complete on different SQL Server
Posted by Pushkar at 5/15/2006 12:00:00 AM
Hi,
I have a stored procedure which behaves differently on two different
machines, even though both machines are having same configuration.
My procedure iterates through each row of my table and processes these rows,
and after processing a bunch of 10-12 rows it writes some information into
... more >>
Is it possible to view queries run on sql server by particular user ?
Posted by Luqman at 5/15/2006 12:00:00 AM
I want to know, what queries User A ran on sql server today, is it possible,
or any option like Audit Trail ?
Best Regards,
Luqman
... more >>
optimized query
Posted by Vikram at 5/15/2006 12:00:00 AM
how can I reform this query using joins
SELECT DISTINCT ID
FROM DUMASTER
, USERGROUPMEMBER
WHERE DU_ACTIVEYN = 'Y'
AND (
( @V_MY_GROUP_ID = @V_DU_ID AND DU_ID = UGM_DETAIL_ID AND UGM_AU_ID =
@P_USER )
OR
@V_MY_GROUP_ID <> @V_DU_ID AND @V_MY_GROUP_ID <> 0)
ORDER BY D... more >>
Need help with JOIN
Posted by Erich Wanker at 5/15/2006 12:00:00 AM
I don´t check it...
1 have 2 tables: (id´s are Integers)
person_db = person_id | person_name
link_db = person_id | group_id1 | group_id2
.... person_db:
1 Huber
2 Maier
3 Wimmer
.... link_db
1 | 13 | 27
1 | 13 | 28 * result
2 | 14 | 27
2 | 14 | 29 * result
3 | 15 | 27
Quest... more >>
|