all groups > sql server programming > june 2006 > threads for tuesday june 6
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
SQL Express Table and Column limit.
Posted by tongueless NO[at]SPAM gmail.com at 6/6/2006 10:19:11 PM
I'm not sure what is going on. I can't seem to have more than 100
columns or tables in a given database in SQL Express. Is this one of
it's limitations or is there something I'm doing wrong? Everything I've
found only mentions the 2GB limit on the overall database size. I just
can't find any rea... more >>
Help! Can't pass names with apostrophe from ASP to SQL7 proc
Posted by crab.dae NO[at]SPAM gmail.com at 6/6/2006 10:17:54 PM
I have a proc that does wildcard searches on names which works fine
expect with names that contain an apostrophe like O'Neil.
When O'Neil is sent to the proc, I get "Incorrect syntax near 'Neil'."
This tells me I've got a delimiter issue.
I've tried replacing the single apostrophe with a dou... more >>
Help! Can't pass names with apostrophe from ASP to SQL7 proc
Posted by crab.dae NO[at]SPAM gmail.com at 6/6/2006 10:17:06 PM
I have a proc that does wildcard searches on names which works fine
expect with names that contain an apostrophe like O'Neil.
When O'Neil is sent to the proc, I get "Incorrect syntax near 'Neil'."
This tells me I've got a delimiter issue.
I've tried replacing the single apostrophe with a dou... more >>
Is IDENTITY_INSERT OFF safe?
Posted by Chris at 6/6/2006 9:55:27 PM
Say I have a sproc that is occasionally used to restore deleted records to a
table.
--If I use
SET IDENTITY_INSERT myTable ON
--Then insert the records...
INSERT INTO myTable(ID, AnyField)
VALUES (2,'hello);
--Then I return table to original state
SET IDENTITY_INSERT myTable OFF
Du... more >>
Help - Sql Server 2005 at a crawl on Win 2000 Server
Posted by Sandy at 6/6/2006 8:32:01 PM
Hello -
I know nothing about running servers, however, I am in a position where I
not only programmed the app, programmed Sql Server 2005 for the app and but
now had to install Sql Server 2005 on a box that was given to me - Pentium IV
with 40 gigs of storage and 512 MB RAM. I thought the ... more >>
2 questions on Sql server query
Posted by Jay at 6/6/2006 5:58:20 PM
Can these write on a SQL query, but not sp
1. Is it possible to show a column that shows the row number?
2. I have a table like this:
ID, Name, Note
-------------------------
1, Jay, abc
2, Jay, DEF
How to show a record set be:
ID, Name, Note
-------------------------
Jay, abcDEF
Th... more >>
Help with looping through records in stored procedure
Posted by CarlosSanchezJr NO[at]SPAM gmail.com at 6/6/2006 5:21:33 PM
I'm not even sure if I'm doing this correctly. Basically, my goal is
to provide the stored procedure 2 pieces of information that may
change:
- a member ID #
- a "WHERE" clause statement
I want the SP to loop through all the records it finds, and as it is
looping through, insert records int... more >>
Turn this SP into a view!
Posted by Bill Nguyen at 6/6/2006 4:45:00 PM
I need help to turn this SP into a view or a table that contains resulting
records.
Any help is greatly appreciated.
Bill
set ANSI_NULLS OFF
set QUOTED_IDENTIFIER OFF
GO
ALTER proc [dbo].[up_rs_hours_of_service]
as
set nocount on
set transaction isolation level read uncommitted
d... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Table organization with different types of IDs
Posted by hugos at 6/6/2006 3:32:55 PM
Hi!
I would like you to share some ideas about a table design.
The table stores info about bills. The clients can be companies or
persons (The info about them are stored in different tables (comanies
and persons).
table bills
-------------
id | id_client | type_of_lient (0 if company;1 if... more >>
Insert by Parameter
Posted by Paul at 6/6/2006 3:04:10 PM
How can one insert by parameter?
For example, in a table "Products" that has a column called StoreID, how can
one insert in the same way one selects, i.e.,
SELECT col1, col2 from Products WHERE StoreID = @StoreID ?
I would like to say something like
Insert Col1, col2, etc... WHERE StoreID ... more >>
Date Parsing using T-SQL
Posted by robboll at 6/6/2006 2:47:00 PM
I can do this using MS Access 2000 database code.
String called
DKEY: "199306 30"
Using MS Access to convert that to a date the following code works:
DateValue(Mid(Replace([dkey]," ",""),5,2) & "/" & Mid(Replace([dkey],"
",""),7,3) & "/" & Mid(Replace([dkey]," ",""),1,4))
Returns ... more >>
Tough SQL problem, need expert advice!!!
Posted by John at 6/6/2006 2:25:13 PM
All,
I think I am having a very tough problem, I need some expert advice
here.
Please bear with me since it will takes me a while to explain the
situation.
(Using SQL2005) I need to design the generic search utility on the
database server (run as Web Service), client supply the sear... more >>
find the first row of ordered records that sum is less than a cert
Posted by nick at 6/6/2006 2:25:01 PM
I have a table ordered by column c1
c1 c2
-- --
a 10
b 20
c 30
d 80
e 1000
How to locate the first one with sum(c2) < 100? should be 'c' in the example.
Hope not use cursor. ... more >>
Advice Requested : Trying to write portable SQL
Posted by Russell Mangel at 6/6/2006 1:56:09 PM
I am running on MS SQL2005.
I have a table called Companies that has a column (Active), which would be
either 0 or 1 for either "Active or Not-Active".
I realize that there is a BIT column type in SQL 2005, but I don't want to
use it. Instead I have chosen to use an 'int' column data type,... more >>
Any good way to convert a row to one varchar column?
Posted by nick at 6/6/2006 1:49:02 PM
I have a lot of select statements (output different number and type of
columns) and I need to generate a text file. Any generic way to convert the
columns of a row in a varchar(4000) column? ... more >>
decimal data type
Posted by SAM at 6/6/2006 12:51:01 PM
I cannot remember how to do this.
How to stop decimal values from rounding up?
Longitude and latitude variables- precision set to 18 and scale is 5.
Do I increase the scale size? if so, would I lose existing data from the
table?
Any ideas?... more >>
trigger will not execute
Posted by Cynthia at 6/6/2006 11:28:02 AM
I have two similar triggers one on solodata table and one on components table.
I cannot get the trigger on solodata to execute. I have tried it coded
similar to waht is on the components table ad as I have pasted it below.
Below SDLineNo trigger
I have pasted the one on components that does... more >>
Using LIKE operator and spacing to search SPs
Posted by VMI at 6/6/2006 9:44:02 AM
I'm trying to search for all SPs that update table_claim. When I run this
query,
The resultset it returns is strange. It returns the correct SPs but also
returns SPs that don't have that exact string (they do have part of it). Does
it have something to do with the spacing?
select * from I... more >>
udf timing out from stored proc
Posted by SteveInBeloit at 6/6/2006 8:18:02 AM
Hello,
I call a stored proc from VBA in an ACCESS application. IT is timing out.
I call a udf from inside the Stored proc, i think that is what is actually
timingout. Is there a way to give the udf a little more time when i call it
from the stored proc. I have searched BO for timeout, but... more >>
Selecting and running multiple SQL scripts
Posted by duff NO[at]SPAM netcomuk.co.uk at 6/6/2006 7:32:20 AM
Does anyone know of a simple tool that will let me logon to a database
and select, order and run multiple SQL scripts against it? To be
specific, run them one at a time NOT by concatenating them into one big
file as that can easily get too big to run...
I could write one, but I have done that ... more >>
Running package using dtexec
Posted by JP at 6/6/2006 7:21:02 AM
Hi
I have created the package from SSIS and I am able to import the flat file
data into the database when i start debug from the BIDS.
But if i run the same from the command prompt using the dtexec command line
utility it gives an error.
dtexec /File Package_1.dtsx
Please find the ... more >>
Comparing dates in one field
Posted by SK at 6/6/2006 7:03:01 AM
I have a table with an ID, Date and Comments and need to compare the ID and
the date and retrieve the latest comment for a filing based on the date. So
you could have many records with the same ID that refer to the same filing,
only with a number of different dates. I've tried various things... more >>
Obtain values from different tables
Posted by hugonsantos NO[at]SPAM gmail.com at 6/6/2006 7:01:03 AM
Table processes_user
id_user | id_proc
-------------------------
35 | 17001
100 | 1089
35 | 17002
Table processes_flow
(example:the process 17001 is with the user 35 and the deadline of the
flow is 2006-07-30! As you can see there are 2 entries on the table
below, the... more >>
How can I update the col value using extended stored procedure
Posted by Veeru at 6/6/2006 6:50:02 AM
Hi,
I have created extended stored procedure. In that I need to update the value
of the perticular column of the table and return the same value. Is that
possible using extended stored procedure.
Please help me to solve this problem. If you have any sample code plz send
me, it would be m... more >>
Dynamic View
Posted by jumpa at 6/6/2006 6:37:44 AM
Dear All,
Hoping you might be able to help me out with a SQL issue.
Want to have a view that contains a join of two tables:
SELECT dbo.VEC_CASE.*, dbo.VEC_MI.*
FROM dbo.VEC_MI INNER JOIN
dbo.VEC_CASE ON dbo.VEC_MI.ID = dbo.VEC_CASE.ID
Problem is that t... more >>
How to add separator blank rows by SQL Query?
Posted by Ben at 6/6/2006 6:33:48 AM
Hi,
I have a BOM table like this:
TopAssembly SubAssembly Number
PN1 SubPn1 1
PN1 SubPn2 3
PN2 SubPn5 2
PN2... more >>
xp_regread problem on Windows XP
Posted by FireSoft at 6/6/2006 4:19:56 AM
Hi,
when i read a registry in remote on Windows XP professional as server
and client the xp_regread function doesn't return a value when if i
read the same date on a server with Windows 2003 server and client with
Windows XP professional works well...
I use:
USE MASTER
DECLARE @test varc... more >>
Identity Columns - Design Question
Posted by S Chapman at 6/6/2006 4:05:40 AM
Is it a good practice to use identty columns as primary keys? or should
we generate our own keys using a seed table?
Does using Identity give any performance advantages?
Thank you,
... more >>
SQL 2005: How to store output from Stored Proc in a Table?
Posted by Andreas Klemt at 6/6/2006 3:10:04 AM
Hello,
I have a Stored Procedure which returns a table.
I want to do this
DECLARE @users TABLE(
userID int)
INSERT INTO @users
exec myStoredProc
So unfortunatly this doesn't work with SQL Server 2005.
Is there another solution with 2005 ?
Thanks for any help!
Andreas
... more >>
query plan on sql server 2005
Posted by Panos Stavroulis. at 6/6/2006 2:58:02 AM
Hi,
I've got the following query:
exec sp_executesql N'
select i.issuer_id,
i.issuer_name,
i.last_update ,
ia_bbeqtk.alias ,
ia_bbeqtk.last_update,
ia_bq.alias ,
ia_bq.last_update
from issuer i
left outer join issuer_alias as ia_bbeqtk
on ia_bbeqtk.issuer_id = i.issuer_... more >>
Index Tuning
Posted by Jorgebg at 6/6/2006 2:21:01 AM
Hi All!
I have this table:
CREATE TABLE [dbo].[Constructions] (
[ConstructionID] [int] IDENTITY (1, 1) NOT NULL , --PK
[TypeID] [int] NOT NULL ,
[TerritoryID] [int] NOT NULL,
[BeginDate] [datetime] NOT NULL ,
[EndDate] [datetime] NOT NULL ,
[IsCancelled] [bit] NOT NULL
) ON [PRIMARY]... more >>
Passing Date Variables
Posted by Chamark via SQLMonster.com at 6/6/2006 1:55:35 AM
I am a newbie and need help. I am creating an intranet site for my company
and my SQL2000 database has a column named transdate. I want to provide the
user with the ability to run a canned report depending on a date range
entered in a web form (Start Date / End Date).
How would I pass these fo... more >>
Error: 50001
Posted by Luca at 6/6/2006 1:19:57 AM
Hi,
In these days in one of my db there is this message:
"Error: 50001, Severity: 15, State: 1
2006-06-06 06:00:18.01 spid53 error- NUMBER OF ROW IN
CRM_COMPANY_TO_MN O CRM_COMPANY_PRODUCT O OD_CRM_STATUS_DECODING NON
CORRECT."
What the problem?
Please let me know understand the reso... more >>
Custom SQL library ?
Posted by Tom at 6/6/2006 12:32:37 AM
Hi All
Does anyone know of a library for .Net that would allow to execute SQL
statements and scripts against SQL server and Oracle databases. The
general purpose will be to execute DDL statements, create procedures
tables etc, currently we use osql and sqlplus invocations with
parameters from... more >>
Identity or GUID?
Posted by rmg66 at 6/6/2006 12:00:00 AM
OK Guys,=20
We are considering replacing the standard IDENTITY column with the =
UNIQUEIDENTIFIER column for all our primary keys.
Good? Bad? Crazy? WTF!?
Any thoughts on index clustering, performance, portability, =
managability, etc... would be appreciated.
Robert... more >>
Creating dynamic table in SP
Posted by Joanna at 6/6/2006 12:00:00 AM
Hi all,
I have to create a dynamic table in a stored procedure, where it's name is
dynamic
I tried the following syntax:
select @sql = 'create table #' + @tbl_nm + ' (' + @tbl_columns + ')'
execute (@sql)
select @sql = 'insert into ' + @tbl_nm + ' select * from aaa_tbl '
... more >>
Running Sum Query ?
Posted by Luqman at 6/6/2006 12:00:00 AM
Following query is calculating running sum and running average of an =
Inventory Item, positive quantities are receipts and negative quantities =
are issued, last two columns are running sum of quantity and amount =
column.
While running sum of quantity is ok, but Amt running sum is not correc... more >>
User defined fields via application
Posted by adam at 6/6/2006 12:00:00 AM
I am currently in the mulling over ideas, pre-design, stage of a new bit
of our project.
We basically store information about images. One requirement is that
users can add search-able fields to the basic image information. The
user fields would be per database and not per user. These fields... more >>
Make 1 query from 2 tables
Posted by Joris De Groote at 6/6/2006 12:00:00 AM
Hi,
Is it possible with SQL to create 1 query from 2 tables?
Table1 and Table2 have a few corresponding columns but mostly different
ones. Now I need 2 of these columns and get them in a query. Can I get the
values from table in there together with table? The tables have the same
column.... more >>
ALL IN ONE SQL STATEMENT?
Posted by Chamark via SQLMonster.com at 6/6/2006 12:00:00 AM
I am using one SQL (View) to get my sums on various fields. I then use a
second SQL (View) to reference the first View to do my calculations. Is there
a way to combine this all in one SQL View? I want to use the second View and
be able to pass it date range variables from a Web page form.
I am... more >>
Using charset iso-8859-2 (Latin2) ??
Posted by CYBER at 6/6/2006 12:00:00 AM
Hello
I'm using Sql 2000.
I'd like to store text in my database using charset iso-8859-2 (Latin2).
What collation shoud i set ?... more >>
Access "inserted" / "deleted" from stored procedure
Posted by Volker Jobst at 6/6/2006 12:00:00 AM
Hi,
I want to call a central stored procdure from update / insert triggers which
are on ~12 tables. The stored should examine the structure of the table on
which the trigger fired. I want to use a stored procdure because the task is
always the same for each table and I do not want to mainta... more >>
Scripting Result of a query
Posted by Ben at 6/6/2006 12:00:00 AM
Hello every body
We have here a DB with a storedProc in it which performs some selects on the
Db and modifies the read data (say our export sp). The idea is, to get at a
point of time from a selection of tables all data values (settings for
example but not the data from daily business).
No... more >>
|