all groups > sql server programming > july 2007 > threads for monday july 23
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
iterative? self join?
Posted by Jeff User at 7/23/2007 11:19:00 PM
Hi folks
I want to use one table to store data representing a web page. Some
pages are children of other pages, thus, they point to another record
in the same table. I want to build a menu based on this structure
using sql query. Well, it will be in stored proc so we could use
whatever struct... more >>
Huge ldf
Posted by Mike at 7/23/2007 9:20:43 PM
I have just created a new database (SQL Server 2005 Express) with one table
containing 2 columns - varchar(15) and smallint. I then bulk imported a
text file containing the TWL06 dictionary (Scrabble tournament dictionary),
which is 180,000 words of no more than 15 characters, and their lengt... more >>
SQL on same box, faster then Virtual Server and Shared SQL Box?
Posted by Al Franz at 7/23/2007 8:35:36 PM
How would my performance compare by running an IIS virtual server and a
shared SQL box, versus running SQL on the same box as IIS. For normal ASP
pages or raw data insertions into the data base, would a single box have
much better performance for a small to mid-size application?
... more >>
pull montly values depending on what table they are in
Posted by Finny388 at 7/23/2007 8:10:57 PM
this was written in fixed width
I am just trying to produce a table with
Item, Month, Qty with 12 values for every Item, one for every month.
If there is a Secondary qty for that month, it takes precedance as the
value used.
MASTER PRIMARY SECONDARY
NAME I... more >>
Using CASE with WHER clause
Posted by scott at 7/23/2007 7:34:25 PM
In my SPROC, I have a variable called @myID. If @myID is greater than 3, my
sql should return all records. If @myID is less than 4, my sql should return
only records where the myID field = @myID.
I need to construct my WHERE clause to something like my example code. The
reason for not just ... more >>
Update table?
Posted by GGill at 7/23/2007 6:48:00 PM
I need to update column in my table ;
If column1 = '100' Then update column2 = 'AAA' and
If column1 = '200' Then update column2 = 'BBB' and
If column1 = '300' Then update column2 = 'CCC'.
My table name is tblGroup and field names GroupCount and GroupsName.
How should i write this statement ... more >>
SQL SERVER 2005 Express Create Table Relationship
Posted by JP Bless at 7/23/2007 6:43:27 PM
I am trying to create table relationships in SQL server 2005 Express with
out success. I am using Microsoft Management Sudio Express. The problem is I
can see the toolbar that points to relationship, Query, Table creation but
they are all greyed out. The tables I have were created by Access up... more >>
Data structure diagrams vs E-R model
Posted by beginner16 at 7/23/2007 5:58:55 PM
hello
1)
When designing a database, we may use ( I=E2=80=99m not sure if at different
or same stages of development ) each of the following three diagrams:
- bubble diagram
- e-r diagram
- data structure diagram ( bachman=E2=80=99s diagram )
a) Are Bachman and bubble diagrams also used ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Does SQL Server 2005 support a hard-coded constant?
Posted by David Carr at 7/23/2007 5:07:59 PM
Hi there,
I need to have a fixed value (e.g. 1.60934 to convert a statute mile to a
kilometer) in several SQL Server 2005 stored procs.
Following good software development practice, I do not want to have this
value in more than one place. If we were coding this in C/VB/etc., a
'constant... more >>
Stored Procedure
Posted by Glenn Billand at 7/23/2007 4:39:03 PM
Hello,
I'm receiving a syntax error when attempting to create the following
stored procedure. I'm relatively new at this so I'm sure it's
somewhat simple. Any help would be appreciated!
CREATE PROCEDURE sp_MonthlyReferralSummary
(
@LoB int
@sdate datetime
@edate datetime
)
AS
SE... more >>
Pivot - Rotating a Table. SQL 2005
Posted by Nitin at 7/23/2007 2:48:01 PM
Hi Guys:
I am trying to rotate one table and getting stuck as dont know where to go
from here. I have put some sample code here which should give you an idea as
to how to simplate it in your environment.
I have sample table Greeks that has ID column that would appear 3 times for
each Gree... more >>
Alpha sort help
Posted by JohnnyC at 7/23/2007 2:20:17 PM
Hello,
I have a customer who enters part numbers into a system. The part numbers
contain alpha and numbers. The sort order is whacked when I order by the
part number field. I understand the reason, just can't seem to fix it.
Usually, I use an extra sequence field to order on, but the custo... more >>
problem w/ parsing ASP in SQL
Posted by BA at 7/23/2007 2:00:02 PM
I have been getting the following error when I run some code on an ASP page
that modifies values in a SQL Server 2000 database:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 3: Incorrect syntax near
','.
/manProds.as... more >>
Needed: TSQL to generate string permutations
Posted by Mike Whiting at 7/23/2007 1:42:00 PM
Hi:
Can anyone point me to code that will take a string variable and output all
the possible permutations of this string? This seems like something that
should exist in a toolkit or code library.
Thank you in advance for your help.
-Mike... more >>
Get missing items in table
Posted by Dave Navarro at 7/23/2007 1:39:11 PM
I have two tables with a "manuscript_no" column.
How can I get a list of all items in table 1 that do NOT exist in table
2?
Thanks!... more >>
sp_spaceused (Error:Column name or number of supplied values not m
Posted by Joe K. at 7/23/2007 12:58:05 PM
I have a script listed below that I would like to use to output database
sizes information from the sp_spaceused stored procedure.
Please help me resolve the error listed below when I execute the script.
Thank You,
Error Message:
Insert Error: Column name or number of supplied va... more >>
Trace Error
Posted by nj at 7/23/2007 12:49:41 PM
Hi , I am getting error
"Error Setup the Trace"
Below is the procedure.
USE master
GO
IF OBJECT_ID('dbo.usp_Login_Audit_Trace') IS NOT NULL
DROP PROCEDURE dbo.usp_Login_Audit_Trace
--exec dbo.usp_Login_Audit_Trace 'D:\Program Files\Microsoft SQL Server
\MSSQL\LOG\AuditTrace'
GO
CREATE ... more >>
Problem dropping table in stored procedure
Posted by glbdev NO[at]SPAM gmail.com at 7/23/2007 12:18:21 PM
Hello.
I am trying to drop a table in a stored procedure, with the table name
as a parameter. This is being called through a vb.net application.
The parameter is being passed in as a string, such as "tblAllUsers".
When I run the procedure it does not return an error but the table is
still ... more >>
Print statement inside a stored procedure
Posted by Nancy Lytle at 7/23/2007 12:13:04 PM
Are there any general implications to having a bunch of "Print" statement
inside of a stored procedures. Where do the the statements go ('print'),
does it slow down the stored proceduere, etc?
Our developers (who write the stored procedures) leave print statements in
almost every sproc they ... more >>
Use a dynamic table name in an INSERT query.
Posted by JimW at 7/23/2007 11:50:10 AM
I would like to build a table name using a supplied date and then create a
stored procedure to make a table using the supplied date.
e.g.
CREATE PROCEDURE db0.ArchiveDate (@ThruDate as nvarchar) AS
Declare @NewTable as nvarchar
INSERT * into @NewTable from OvenTemps
WHERE OvenDate < Conve... more >>
Problem with Agent on 2000 server - jobs hanging
Posted by Blasting Cap at 7/23/2007 11:28:18 AM
I have a server that had SQL agent working on it, and running scheduled
jobs on set interval forever. Windows Server 2003, SQL 2000, most
current service packs on both.
I installed an instance of SQL 2005 on this server.
Now, when I look at Enterprise Manager & try to see what's happening ... more >>
What is that "more" that makes E-R model truly independent ?
Posted by beginner16 at 7/23/2007 11:13:27 AM
hello
1)
I just started learning a little about E-R model. I realize the E-R
model was created so that we can represent DB at the conceptual level,
and as such DB is presented independently of the underlying logical
DB design.
Say we are trying to create DB for particular organization. ... more >>
Set Logic vs Curosr Logic
Posted by brymer28303 at 7/23/2007 10:42:02 AM
I’ve preached against cursors, but now I’m stuck using one. (And the
programmers I work with are giving me a hard time.) well, sort of
I have a table:
storeno int
dm varchar(1000)
The example data is
10 Terry
20 June
20 Steve
10 John
30 Sam
Without using a cursor I n... more >>
change modify_date from sys.procedures
Posted by Xavier at 7/23/2007 9:58:06 AM
When I move the data from one system to another the value of the modify_date
from sys.procedures is the data that it was last run.
Example a SP developed in 1/1/2002 when I create it over a script on a new
system it will save it with the value for example 7/7/2007.
Now my question, how can... more >>
Corrupt cursor
Posted by DML at 7/23/2007 9:32:03 AM
SQL 2000 sp4.
There is a process written 3 or 4 years ago that creates a temp table (in
tempdb). Then there is a cursor created to step through the temporary table
one row at a time so that a permanent set of tables can be updated.
On 7/13/2007 - the process went began going through the c... more >>
AVG causing "Arithmetic overflow error..."
Posted by Benny at 7/23/2007 9:04:02 AM
I have a table defined as follows
create table foo (FileSize as int)
If I execute
SELEC AVG(FileSize) FROM Foo,
I get the following error:
Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.
The scenario I have is that each fileSize will n... more >>
Time Question
Posted by Peter Newman at 7/23/2007 7:02:01 AM
I have a table that holds time as a string in 24 hr format ( ie 18:30:00 ). I
have a openTime and a closeTime and what i want to do is return a bit result.
1 if the current time is between the times set in OpenTime and CloseTime, 0
if outside the scope ... more >>
Return values from SPROC
Posted by Ron at 7/23/2007 7:00:01 AM
Hi,
I have a stored procedure that retuns some value as a select statment.
What i would like to do is have a second SPROC that pulls in and sets some
declared values form he first SPROC.
I am just have some syntax issues and need a little help if possiable
something like this...
DEC... more >>
RAM required for 64 Bit
Posted by Mark at 7/23/2007 6:58:03 AM
We're about to purchase a 64 Bit Dell 2950 or similar to host the backend SQL
Server of an application. Aside from the fact that SQL Server 2005 will
consume as much RAM as you are willing to throw at it, my experience with 32
bit in the past was simply that the amount of RAM required was dep... more >>
Using VB 6 and SQL Server Express - do I need to install SQL express on each computer...
Posted by jonny at 7/23/2007 6:23:59 AM
Using VB 6 and SQL Server Express - do I need to install SQL express
on each computer...When I deploy the software (VB 6) do I need to
install the SQL Server Express software on each computer? I have put
the SQL Server database out on the network.
... more >>
data output
Posted by Rupesh Mondal at 7/23/2007 4:36:00 AM
i am getting some output i.e,
select top 100 percent employeeid ,identity (int,1,1) as sr_no into #temp1
from orders group by employeeid
select * from #temp1
drop table #temp1
123
96
127
156
42
67
72
104
43
i want the above output in horizontal format,presently it is comming in ... more >>
outer join not returning rows as expected
Posted by Ant at 7/23/2007 12:18:02 AM
Hi,
I'm using a left outer join to return rows that I know exist but do not have
a key to the right side table, yet the row is not being returned. Below is
the query:
select t1.OpportunityID,
t2.OpportunityID
from Table1 t1 left outer join Table2 t2 on t1.OpportunityID =
t2.Opportun... more >>
Insert issue since table has Identity set
Posted by Daniel at 7/23/2007 12:00:00 AM
We have an issue, hopefully someone can suggest something...
We have a set of tables are are setup as our production tables, after 60
days certain records get moved to an archive set of tables that mirror the
production.
The archive tables have no restrictions on the PK since we want to al... more >>
UPDATE using a SELECT
Posted by Danny at 7/23/2007 12:00:00 AM
Hi,
In a stored proc :
I have a : " SELECT DISTINCT Year(Field1) FROM Table1 " returning for
example 3 records.
And I would like tu use the results in a WHERE clause of an UPDATE.
Thanks !
... more >>
Query with multiple results from one field
Posted by eagle at 7/23/2007 12:00:00 AM
I need to create a query that gives me the multiple results of one field
in a comma delimited set. I have 2 tables with a one to many relationship,
a products table and a client table, with the clients being the clients that
purchased that product.
So I know I can do Select * from tblP... more >>
|