all groups > sql server programming > september 2007 > threads for tuesday september 18
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
Loading user's stored procedure via SMO - very poor performance problem
Posted by Brad Jones at 9/18/2007 11:06:12 PM
Hi,
I've tried to load SPs from AdventureWorks via SMO in a for loop.
SMS shows 9 procedures (user defined objects). SMO
Database.StoredProcedures.Count reports more then 1200 SPs in total.
I want to load user made SPs only. It's waste of time to go through more
then 1200 objects each t... more >>
Year to Date Balance
Posted by Newman Emanouel at 9/18/2007 8:34:01 PM
Dear All
I have a table I am using as shown below
Account Period PeriodBal
60001 0 365.88
60001 1 348.82
60001 2 534.55
60001 3 -104.19
60001 4 958.12
60001 5 -838.91
60001 6 -2440.78
60001 7 5646.94
What I need to do is to create a Ytd balance where it cumulates all the
periods t... more >>
An error has occurred while establishing SQL CONNECTION
Posted by lautaro at 9/18/2007 6:25:40 PM
Enviroment with Problem
SERVER 2003
SQL SERVER 2005
DEV C# .NET 2.0
I have a web application that works perfect on my dev machine. When I
publish it to my 2003 server it display this error
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2... more >>
Query hints
Posted by Steve Dassin at 9/18/2007 5:46:23 PM
Given the entire history of MS sql servers does anyone know
if all versions included the ability to use query/index hints of
any kind. If not what was the 1st server version to include hints.
Thanks,
www.beyondsql.blogspot.com
... more >>
for insert, update trigger question
Posted by Tim at 9/18/2007 4:30:56 PM
I would have had a more specific subject line if I knew how to refer to
this problem by name.
SQL Server 2000:
In a FOR INSERT, UPDATE trigger I assign a date to a column in the row:
lastupdated = getdate()
In this same trigger, I also keep track in another audit table who has
... more >>
SQLSelect
Posted by brandon at 9/18/2007 3:40:17 PM
I have following tables:
1. Events with EventId
2. Registration with RegistrationId, UniqueId, EventId,
RegistrationName (this
can have more than one RegistrationId for same UniqueId)
3. EventMeal with MealId, EventId, MealTitle, MealFee(this
can have more than one Meal for same EventId)
4. R... more >>
SQL
Posted by brandon at 9/18/2007 3:29:14 PM
I have following tables:
1. Events with EventId
2. Registration with RegistrationId, UniqueId, EventId,
RegistrationName (this
can have more than one RegistrationId for same UniqueId)
3. EventMeal with MealId, EventId, MealTitle, MealFee(this
can have more than one Meal for same EventId)
4. R... more >>
Replication Problem
Posted by SKUMARI at 9/18/2007 3:18:19 PM
I have already posted this mesage but did not get any reply ,
I appreciate if the experts can give some kind of insight into this.
The distribution cleanup job (sp_MSdistribution_cleanup) is scheduled
to run every ten minutes. However, it is either running continuously
OR takes longer than ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Save all but table data
Posted by David C at 9/18/2007 2:55:27 PM
Is it possible to re-create an existing SQL 2005 database but not populate
the data in tables but still keep stored procs, views, etc.? Thanks.
David
... more >>
trigger or constraint to allow nulls only when a seperate column h
Posted by Hrocks at 9/18/2007 2:32:04 PM
I need help creating some type of trigger or constraint to allow nulls only
when a seperate column has a specific value.
For instance when inserting a record:
if column A's value = 1 or 2
then
allow column B to be null
otherwise column B must not be Null.
Thanks...... more >>
XML in SQL 2005
Posted by sqtchman74 at 9/18/2007 2:27:35 PM
In SQL 2000 there was a program that you could use (IIS for XML) that
allowed you to make Stylesheets and then run an http query against
that. How is that done in sql 2005?
... more >>
Executing stored procedure with * does not give any records
Posted by Jack at 9/18/2007 2:24:04 PM
Hi,
I am executing a stored procedure with a * parameter and it is supposed to
bring all records. Instead it brings none. Does the In parameter not take *
at all. If I want to have the option of having to use few customers or all
customers how things will change in the sp. Thanks in advance.
... more >>
How make column unique, but still allow nulls?
Posted by Ronald S. Cook at 9/18/2007 2:14:39 PM
How can I make a column have a unique index (or constraint of some sort),
but still allow nulls?
Table: Pen
PenId PenNumber PenSequence
123 A101 1
124 A102 NULL
125 A103 2
126 A104 3
127 A105 NULL
128 A106 4
129 A107 5
130 A108 6
Thanks,
Ron
... more >>
Constraint question
Posted by DWalker at 9/18/2007 1:57:43 PM
After letting SQL 2005 create scripts to create everything in my
database, I have a few strange constraint names on default values. Here
is a CREATE TABLE statement that was generated:
CREATE TABLE [dbo].[ALTERNATE_ADDRESS](
[Address_Key] [dbo].[TableKey] IDENTITY(1,1) NOT NULL,
[Account_... more >>
Virus slows down my SQL Server execution, sometimes!?
Posted by Mike9900 at 9/18/2007 1:28:01 PM
It sometimes happens in my computer and in some of my customers. When
executing certain statement, SQL Server does not give the result fast and it
takes some times working without any reason.
When I use sp_who, there is no user using the instance!
In Visual Studio when I click break all... more >>
suggest a general method for royalty reporting?
Posted by Eric Bragas at 9/18/2007 1:07:32 PM
Hi everybody,
I work for an online music store that needs to send monthly royalty
reports--text files 98% of the time--to distributors. The problem is
that [I don't think] we're doing this in the best way, and I was
hoping to solicit a few ideas of better methods.
Here's our current method... more >>
Bitwise Security
Posted by Taurin at 9/18/2007 12:44:35 PM
I am trying to implement a bitwise security model in a SQL Server
table. The basic table looks like this:
ID uniqueidentifier
name varchar(100)
access varbinary(MAX)
ID is the unique ID, name is the name of the record, and access is a
series of bits (each of which represent... more >>
SQL Server Express Uninstall / Enterprise Install Issue
Posted by Dave at 9/18/2007 12:03:17 PM
I need help installing SQL Server 2005 Enterprise edition. Actually
what i really need is to remove the current SQL Server Express
intallation that is no longer on my Add/Remove software list but yet
still installed on the machine.
Background:
I tried to uninstall SQL Server Express / Deve... more >>
PIVOTing only 2 of 4 columns in SQL 2005
Posted by DumpEmails at 9/18/2007 11:35:50 AM
I have 4 columns that are retrieved by the following query:
SELECT
A,
B,
C,
D
FROM XYZ
How do I PIVOT columns C and D only while keeping A and B as is? Is it
even possible? My attempt was:
SELECT
A,
B,
C,
D
FROM XYZ
PIVOT
(
SUM(D)
FOR C
IN (???)
)
Thanks!
... more >>
Is the word 'document' a keyword?
Posted by stuppi at 9/18/2007 10:04:02 AM
I've created a table named document. The query editor (SQL Server 2005)
highlights (sets to blue font) the table name as if it were a keyword (SQL,
XML?).
Is document a keyword?... more >>
Cannot figure out why there is a syntax error in this simple sp
Posted by Jack at 9/18/2007 9:16:01 AM
Hi,
I got this simple sp which is a part of a bigger sp. I am trying to
understand what it does by diving it into various section. However, when I am
trying to compile this sp it gives me the following error:
Line 24: Incorrct syntax near ')'
I am not figuring out why this is a problem. T... more >>
SQL Shield for Encrypting Stored Procedures
Posted by Robbe Morris - [MVP] C# at 9/18/2007 7:51:18 AM
Can anyone provide any guidance or personal experience
regarding SQL Shield or any other third party mechanism
for encrypting stored procedures in all flavors of SQL Server 2005
or 2005 Express?
http://www.sql-shield.com/example.html
--
Robbe Morris [Microsoft MVP - Visual C#]
..NET Prop... more >>
THE LATEST UPDATED DATE OF TABLE
Posted by weileogao NO[at]SPAM gmail.com at 9/18/2007 6:45:33 AM
I can find created date of the table from table's property, but can I
know the latest updated date of table? Any help will be appriciated.
Wei
... more >>
Copy fileds to new records
Posted by at 9/18/2007 6:45:06 AM
Hi,
I'm attempting to write a SP to copy the values from some fields in a
table to the same fields on other records in the same table and i'm
not getting very far with it.
The scenario is that I record monthly sales figures for the last 12
months for a product in a table (1 record = 1 month... more >>
Performance difference between query executed through ASP.NET and
Posted by jamesthurley at 9/18/2007 5:30:04 AM
I have a query which, depending on where I run it from, will either take 10
milliseconds or 10 seconds.
The query works perfectly when run in SQL Server Management Studio... in my
database of around 70,000 items it returns the results in around 10ms. It
uses all my indexes and indexed view... more >>
Recovery Mode
Posted by Jaco at 9/18/2007 3:44:01 AM
Hi,
We recently added new functionality to our application which can load up to
a million+ records based on the users input.
This will normally take place once a month and ideally after hours.
My only concern is the impact this has on the log file size. Can you guys
see any implication if I... more >>
Restore MSSql Server 2005 backup file in MySQL
Posted by Rahul at 9/18/2007 3:09:50 AM
Friends,
How can we restore database in MySQL server.
Backup and .mdf file is available (MS Sql Server 2005).
Rahul
... more >>
General Question: Stored Procedures Errorhandling Rollback
Posted by frederik.engelhardt NO[at]SPAM googlemail.com at 9/18/2007 2:05:24 AM
Hi!
I'm writing a stored procedure and i'm not so fit in that subject.
My Procedure will change some things by Insert-Statements. These may
causes Errors in triggers. The Triggers will rollback the transaction
causes the Trigger. But, will be all other Insert-statements (in the
procedure) c... more >>
SQL Sub Queries
Posted by MM User at 9/18/2007 12:00:00 AM
Hi,
I have a query:
SELECT (ReviewerInitial & ReviewerName) AS Rev1
FROM Reviewer_tbl, Main_tbl
WHERE (ReviewerID1 = ReviewerInitial)
This is fine and works, but I have a possible 5 others:
SELECT (ReviewerInitial & ReviewerName) AS Rev2
FROM Reviewer_tbl, Main_tbl
WHERE ReviewerID2 ... more >>
extracting rows by month counts
Posted by jacetesh NO[at]SPAM yahoo.com at 9/18/2007 12:00:00 AM
Hi,
I need to extract data from a single table where a unique ID is
present at least 2 times in any consecutive 3 month period.
Example :-
ID Date
1 01Apr07
1 04Apr07
2 05Apr07
1 05May07
1 21May07
2 25May07
1 03Jun07
1 12Jun07
1 06Aug07
I need to extract all rows in the table f... more >>
Forming a table of counts
Posted by Nick Hodge at 9/18/2007 12:00:00 AM
All
I have data in a field in the following format
999/523/522
523/555/999
523/999/345
333/111/222
This refers to a person picking, (first three digits), packing, (5th to 7th
digit) and processing, (9th to 12th digit) an order. I am using SUBSTRING to
parse these out, but what I am l... more >>
SQL Books?
Posted by Dan Tallent at 9/18/2007 12:00:00 AM
I am looking for a good book or two for SQL server (C# application
programming). I have read several books so far, but most of them are
either beginner level or more internal to how SQL server itself deals with
the data.
I am looking for a book that will help me fill in the gaps. Spec... more >>
Date is formatted incorrectly when using Cursors
Posted by Alex at 9/18/2007 12:00:00 AM
Hello,
I'm using Cursors to parse through some dates in a table (MS SQL 2005), and
my goal is to compare these dates to dates in another table which should
match. Problem is the dates are being pre-formatted, and it's causing the
dates to not match-up. Here's my code:
DECLARE @SQL AS V... more >>
C++: How detecting if a field contains the value NULL
Posted by Hans Stoessel at 9/18/2007 12:00:00 AM
Hi
I have a C++ application (without MFC!!!) and read data from a table. Now I
like to test, if a field value is NULL or not. Can I do that with an SDK
function? I can't test the return from SQLFetch (where the columns are
binded with SQLBind), so I am looking for another possibility...
Tha... more >>
SELECT and GROUP BY question
Posted by Froefel at 9/18/2007 12:00:00 AM
I'm trying to figure out how to pull in data after a group by has been
performed. Consider the following table (T_CustomerVersion):
TxID CusCode TargetVersion
500 HEF 3.6
501 AGR 3.5
502 AGR 3.6
503 HEF 3.5
504... more >>
Query help
Posted by vt at 9/18/2007 12:00:00 AM
He all,
Can some one please help me with this query,
table 1: (Month end settings table)
sample data
Year Period start date end date
==============================================================
2007 1 2007-05-01 00:00:00.00... more >>
Script Options in 2005
Posted by Bassam at 9/18/2007 12:00:00 AM
Hello
in SQL Server 2000 using enterprise manager we had the options while
scripting objects like including object permissions , adding primary keys ,
script indexes , etc, I can't find those options in 2005 MgsStudio , can
anyone please help
Thank you
Bassam
... more >>
|