all groups > sql server programming > january 2007 > threads for monday january 22
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
Could not find stored procedure
Posted by Akshay Srinivasan at 1/22/2007 10:33:54 PM
Hi,
I have SQL Server 2005 running with a database in it. I have some ASP.NET
web pages written in C#. When specifying StoredProcedure as the CommandType
the code errors out saying that it could not find the stored procedure. If I
run it as a regular sql statement using exec sp_whatever ... more >>
SQL Code to Retrieve last week's data.
Posted by Manny123 via SQLMonster.com at 1/22/2007 8:47:51 PM
Hi There,
this is the code I have come up with to get last week's data;
Date dateadd(Week,-1,dateadd(week,-1(datepart(weekday,getdate())*-1)+1,
convert(varchar,getdate(),101))) and
dateadd(second,-1,dateadd(day,(datepart(day,getdate())*-1)+1,convert(varchar,
getdate(),101)))
for the L... more >>
Saving Object Explorer Settings in SSMS
Posted by Martin at 1/22/2007 7:35:33 PM
Hi,
When I use management studio I have four database servers present in the
object explorer pane.
However each time I close SSMS and then re-open it again the servers are no
longer there.
They are retained in the registered servers pane and each time I open SSMS I
find myself having to
r... more >>
"Best practice" table/query structure sought
Posted by bulk NO[at]SPAM mangiafico.org at 1/22/2007 7:23:15 PM
Hello All,
I've been developing web sites for many years now, mostly classic ASP
and ASP.NET, and I've run into the following data requirement many
times and have always solved it in what I consider an inelegant way.
As I started my career as a science person and not a software engineer,
I am... more >>
Adding a select into SQL statement
Posted by Stopher at 1/22/2007 6:49:50 PM
Hi all I am trying to add a statement into a query that return various
calcualtions. The problem is that the new select has got other variable
that are not in the main where statement. What I have so far:
SELECT ANALYTECODE Analyte,
COUNT(VALUE1) No_of_Observations,
AVG(VALUE1) ... more >>
Migrate / Read Access data file(s) in SQL Server
Posted by dba_222 NO[at]SPAM yahoo.com at 1/22/2007 5:38:15 PM
Dear Experts,
I have some Access .mde files from a custom application.
The runtime version of Access is 2002. I don't have
a developer's version of Access. I also don't have the
schema design of the app.
I'd like to import or migrate the data file into SQL Server
schemas (databases) so... more >>
Insert New Record
Posted by shapper at 1/22/2007 5:16:56 PM
Hello,
I have two tables, FAQ and FAQLocalized, as follows:
[FAQ]
> FAQId, FAQType
[FAQLocalized]
> FAQLocalizedId, FAQId, FAQQuestion, FAQAnswer, FAQCulture
Both FAQId and FAQLocalizedId are GUID's.
FAQId is a Primary Key in FAQ and a Foreign Key in FAQLocalized.
I am inserting a... more >>
Insert Record
Posted by shapper at 1/22/2007 5:10:57 PM
Hello,
I have a table where the primary key is FAQId which is a GUID.
My Procedure has a parameter named @FAQId.
I want to check if the is a record in the table where FAQId = @FAQId
Here is the important part of my code:
-- Find record with given FAQId
SELECT FAQId FROM dbo.by27_FAQ W... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Append Room numbers fields by Building
Posted by Jay Balapa at 1/22/2007 5:07:11 PM
Hello,
I have a table as follows-
BUILDING ROOM_NUMBER
MAIN 100
MAIN 101
MAIN 102
SUB 200
SUB 202
The Resultset should be as follows-
BUILDING SUMMARY_ROOMNUMBE
MAIN 100,101,102
SUB 200,202
I know I... more >>
problems with distributed transaction
Posted by Anna at 1/22/2007 4:34:37 PM
Hi Gurus,
I'd like to do some DTS between a two sql server 2005 express instances in
the following way:
begin distributed transaction
insert into local_table (column_list)
select (column_list)
from linked_server.remote_database.schema.remote_t... more >>
aggregate problem
Posted by Ef at 1/22/2007 3:41:58 PM
I'm new to MDX and have a dilemma. On rows I need Store and State
combinations (valid associations of course).
On columns I need QTD and YTD sales for Stores and States. I can easily
get the sales for stores, but how do I
get the total State sales? The total sales for states can be repeated
on ... more >>
Problem with view
Posted by Chris at 1/22/2007 3:36:14 PM
I am trying to create a view that creates a mailing list from two
different tables. The t-sql code executes successfully but when I try
to open the view I get this error message [Microsoft][ODBC SQL Server
Driver][SQL Server]Error converting data type vchar to float.
Here is the t-sql code I ... more >>
Averaging time
Posted by Stopher at 1/22/2007 3:28:48 PM
Hi all am trying to create an average time from a list of the
difference of 2 date time stamps.
SELECT
pro_job, RECEIVED, STARTED, VALIDATED
FROM (Select * from mytable
UNION ALL
Select * from myarchivetable)as der
where pro_job like 'myjob%'
and star... more >>
2005 backward compatibility question
Posted by Tim Zych at 1/22/2007 3:13:27 PM
How backward compatible is SQL 2005 to SQL 2000?
I have some solution upgrades to do, and I'm wondering if SQL 2005 will
handle all views and stored procs, etc, no problem that were created in
2000. Is there a white paper of what *must* be upgraded to 2005?
Thanks for any info.
... more >>
SQL Date Query help
Posted by junxtreme NO[at]SPAM yahoo.com at 1/22/2007 2:48:53 PM
I want to retrieve a record where the date is equal to 1/6/2006. This
is the query I made:
select * from mytable where date = '1/6/2006'
The problem is there are no records found. And I am sure that I have a
record with a date of 1/6/2006.
I went to SQL server to copy the date value direc... more >>
How to get the database names with the active connections to the server?
Posted by Violetta at 1/22/2007 2:38:11 PM
Need some help returning database name while using
smo.server.EnumProcesses() on SQL Server 2005.
The project is quite simple
1. connect to the server - using smo object.
2. check how many open connections exist on the x database and return the
User, Process ID, Program for x database
Al... more >>
Creating a Custom Warning/Message
Posted by robboll at 1/22/2007 2:06:29 PM
I've got a situation where there is a data dump that is imported daily.
Recently the import completed and I thought everything was processing
normally, but the data dump source wasn't created, and the job didn't
process as expected. The old dump processed again and didn't generate
any errors.
... more >>
Handling Nulls in several columns
Posted by maxvalery NO[at]SPAM gmail.com at 1/22/2007 1:16:00 PM
Hi,
In table MyTable (Field1 VARCHAR(50), Field2 VARCHAR(50)), I have the
following data:
INSERT INTO MyTable(Field1, Field2) VALUES ('Johnson', NULL)
INSERT INTO MyTable(Field1, Field2) VALUES (NULL, NULL)
INSERT INTO MyTable(Field1, Field2) VALUES (NULL, 'Peter')
INSERT INTO MyTable(Fiel... more >>
backup database
Posted by Man-wai Chang at 1/22/2007 12:05:20 PM
USE my_db
GO
BACKUP DATABASE my_db
TO DISK = 'C:\data.Bak'
WITH FORMAT,
NAME = 'Full Backup of My DB'
I could not find the file data.bak in drive c:. Why?
--
iTech Consulting Co., Ltd.
Specialized in providing ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (85... more >>
Help with pro-rating annual amount
Posted by News at 1/22/2007 11:58:13 AM
Hi,
If anyone would give me a hand here. If there is a way to construct a query
or UDF better way.
I have a table with credits that are added every year for each employee in
the system. I need to prorate the amount of credits to the end of the year.
Say, if employee is given 30 credits once... more >>
Help with Select
Posted by gv at 1/22/2007 11:16:44 AM
Hi all,
My mind is drawing blanks right now, something real simple.
Need a list of Switches where Fr = 833 but, not where Fr = another number
with the
same switch. Select below is wrong.
Sample Data:
Create Table Test1 (
Switch Varchar(20),
Fr Varchar(30))
insert into Test1 (sw... more >>
Tricky Query ( For me at leaset )
Posted by Mangler at 1/22/2007 10:41:11 AM
Here is the table for starters:
USE [Reclaim]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[bt](
[idtrans] [int] IDENTITY(1,1) NOT NULL,
[idrma] [int] NULL,
[phmodel] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[part... more >>
update triggers with sum values
Posted by Robert Bravery at 1/22/2007 10:31:12 AM
HI all,
We have a client application that inserts data into a table, measure table
For each measure table, upto 192 target values are entered for each month
I need to rollup target values per measure per month
This works great when updateing measures and targets.
My problem is how and when to... more >>
SQL Server 2000 Ranking
Posted by TG at 1/22/2007 10:25:24 AM
Hello,
I am trying to find a way to rank a rep by their assets in products
from best to worst in SQL server 2000. I have looked at the books on
line and the information was not all that helpful. I welcome any
thoughts or sugeations.
Thanks,
Thomas
... more >>
help needed
Posted by maheshwari.sumit NO[at]SPAM gmail.com at 1/22/2007 9:27:40 AM
I am bit confused....
I just want to know which of the option is correct.
Composite Key can be made up of
- Unique Key
- Foreign Key
- Primary Key
- All of the above
... more >>
Listing all Functions in a Database
Posted by Frank J. Reashore at 1/22/2007 9:03:36 AM
I know that the following query will list all stored procedures in a
database
select * from sys.procedures
However, Do I list all (scalar-valued) functions in a database?
Thanks in advance for any help.
Cheers,
Frank J. Reashore, MCSD.net, MCDBA
... more >>
SQL Query
Posted by dan_williams NO[at]SPAM newcross-nursing.com at 1/22/2007 8:16:56 AM
I have a Clients table with ClientId and ClientName. I have another
table called AssessmentTypes, which contains AssessmentTypeId and
AssessmentType.
Another table ClientAssessments, with ClientAssessmentId, ClientId,
AssessmentTypeId, DateDone, DateOfNextAssessment, AssessedBy
Can anyone... more >>
dbcc checkident to external server
Posted by everplay NO[at]SPAM gmail.com at 1/22/2007 8:02:17 AM
The following command:
DBCC CHECKIDENT ('servername.dbname.dbo.SendSessions', RESEED, 55)
Results in this error:
Unable to process object 'servername' because it is a four-part name,
which is not supported by any DBCC command.
If anyone can anyone think of a way to get around this limit ple... more >>
Specs for SQL Server client machine
Posted by iain_goldfinch NO[at]SPAM yahoo.co.uk at 1/22/2007 7:11:41 AM
Hi,
I'm getting a new desktop machine at work, and I've been asked to
provide the kind of specs I need. Most of my stuff is SQL Server work
(mainly using remote data, but occasionally on my machine). I also do a
lot of VS.NET development locally.
Could anyone advise whether I should be lean... more >>
Forward engineer stored procedures from vss SQL 2005
Posted by dfateman NO[at]SPAM gmail.com at 1/22/2007 7:09:39 AM
Hi,
I'm looking for a way to forward engineer all the stored procedures
from vss to a SQL Server 2005 database. getting sps in is not a problem
but if i want to say, create all the procs from vss is there a tool to
do that assuming the .sql files are in the format of a if exists...drop
spname..... more >>
Tracking Errors
Posted by Mukesh at 1/22/2007 4:44:30 AM
Hi All,
We are having an application from a vendor that, after some
customization, will be deployed to our client. We don't want to change
any any code/ stored procedure etc. But we still want to be aware of
the errors that occurs. For example if a row is getting inserted in a
table with dup... more >>
|