all groups > sql server programming > february 2007 > threads for wednesday february 14
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
How can I sequentially number each group of rows?
Posted by NW Otter at 2/14/2007 10:17:15 PM
I want to flatten a table of sequential values for display on a web page. My
data table looks something like this:
Create Table mydata (
Mykey int NOT NULL PRIMARY KEY,
Wiget int,
theValue char(3),
dateRecorded D)
Values for each widget can be recorded at random times. I want flatten th... more >>
restoring Sql 7.0 backup file
Posted by Roy Goldhammer at 2/14/2007 9:54:50 PM
Hello there
I have database build on sql server 7.0
and on the new server i have sql server 2005.
I've tried to backup the 7.0 version database and restore it on sql server
2005 and it didn't work
is there a way to convert the database so i can use it on my new server?
... more >>
Upload and display images on Access form stored in SQL Server 2000
Posted by Rex at 2/14/2007 9:51:35 PM
Hi
I am using Access as a front end for my SQL Server 2000 database. I
want to store images straight in the database. I want to write a VBA
code inorder to do the following:
1. Upload an image in the database
2. See the image on my form when I navigate through each records of
images.
I ... more >>
Help with query
Posted by Chris at 2/14/2007 7:53:15 PM
Hi,
I am trying to populate the AdventureWorksDW time dimansion table with days
in a year. How can I write a query to select all the days in a year including
leap year?
Thanks... more >>
list of stored procs used
Posted by Tim Zych at 2/14/2007 6:54:31 PM
How do I get a list of all stored procedures (and views, if that's easily
added) used in a particular database?
I've searched google and surprisingly have found scant resources.
Thanks.
... more >>
how to search all proocedures for SET ANSI_NULLS OFF
Posted by Adrian at 2/14/2007 6:41:10 PM
SQL Server 2000 Standard Edition
Some of our Stored Procedures have SET ANSI_NULLS OFF because the user did
not realise this was the default setting for SPs created using Enterprise
Manager.
How may I search for all these procedures?
I know I can search the text field in the SysComments... more >>
How can I do this
Posted by Geo at 2/14/2007 4:19:52 PM
Hi folks, I have two tables CurrentNews and HistoricNews when a news item is
created it is inserted into CurrentNews it is assigned a storyID (ST071)
which it maintains through its life cycle. The story then gets reviewed and
the reviewed column is set to true it is also given a version number... more >>
String or binary data would be truncated
Posted by David Lozzi at 2/14/2007 2:53:36 PM
Howdy,
I'm getting this erro "String or binary data would be truncated" in both SQL
2000 and 2005 of the same table. The table def is below. If I try add a row
to this table just through Enterprise Manager/Management Studio I get the
above error. I only entered data into the fields that do ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Can we call DTS Service from a store procedure?
Posted by slimleh at 2/14/2007 2:30:35 PM
Hi,
Can we call DTS Service from a store procedure?
If so, is there a simple code that I can use?
Thanks
... more >>
Email query results
Posted by Deb Struble at 2/14/2007 2:09:24 PM
I would like to set up a job that runs the following query and then emails
the results:
select *
from trackrows
where OperTrack like '%sync%'
order by createdate desc
I was able to set up a job in Enterprise Manager that runs the tsql
statement and then emails me if the job completed. ... more >>
using cursor in a procedure
Posted by sajalsmail NO[at]SPAM gmail.com at 2/14/2007 1:53:35 PM
how can i use cursor(in pl/sql) in a t-sql procedure
i need a simple syntax based example.
**how to declare a cursor which will point to rows of a table 'x'
**getting column_value using the cursor x.attribute
thank u
... more >>
No rows returned when start and end date are the same
Posted by Rob at 2/14/2007 1:35:31 PM
I have the following query to return all rows based on a start date and end
date:
-----------------------------------------------------------
DECLARE @StartDate datetime, @EndDate datetime
SET @StartDate = '12-12-2006'
SET @EndDate = '12-12-2006'
select *
from orders
where ord_id > 10... more >>
UDF
Posted by Microsoft at 2/14/2007 1:00:00 PM
Can this be done?
LEFT JOIN UDFT_CL_Commodities(Cargo.Commodity_id ) as UDFT_CL_Commodities ON
Cargo.Commodity_id = UDFT_CL_Commodities.Commodity_id
I get this error
Msg 4104, Level 16, State 1, Line 43
The multi-part identifier "Cargo.Commodity_id" could not be bound.
... more >>
Changing SQL Server IP address effects
Posted by MittyKom at 2/14/2007 12:32:12 PM
Hi All
Will changing SQL Server IP address affects/breaks anything in sql server?
Thank you in advance.
... more >>
Timestamp default value
Posted by RBC at 2/14/2007 11:50:27 AM
Dear to Whom This Concern,
I have a table with a timestamp field and when I import data from a Excel
sheet, the field display <Binary data>;
I like to fill in default value for Timestamp. Usually I use CONSTRAINT
[TableName_FieldName] DEFAULT (N'Default_Value');
I have tried following ... more >>
Basic security on SQLExpress. How to?
Posted by bogdan at 2/14/2007 11:34:33 AM
Hi,
I think that this must be a very common scenario. After installing my app
(installation also includes SQLExpress) I'd like to disable admin
permissions granted to Windows users by default. That is, I'd like users
to be able to select, update, and delete only. I would not like them t... more >>
pss80
Posted by CLM at 2/14/2007 11:13:13 AM
I'm running the "pss80" Microsoft stored proc to identify locking/blocking
problems and one stored proc showed up as blocked for about 8 minutes this
morning:
"************************************************************
Print out DBCC Input buffer for all blocked or blocking spids.
*********... more >>
Monitoring Tools For SQL 2005
Posted by Nitin at 2/14/2007 9:58:45 AM
What sort of monitoring tools people use here for monitoring SQL 2005
performance - tuning? I would like to be able to monitor SQL 2005 performance
+ replication log for transactional replication + any tempdb analysis +
Locking/Blocking alerts etc. Do you recommend writing scripts to do all th... more >>
Generating DB installation
Posted by ×™×•× ×™ גולדברג at 2/14/2007 9:43:23 AM
Hi,
I've created DB with "Sql server Managment Studio express (2005)".
This DB is about to be installed with our product, including meta-data (data
to appear on application start). Some of the servers are sql server 2000.
Have 3 questions:
1. What is the best tool to generate full sql script wh... more >>
how to use t-sql to select something into a variable?
Posted by sajalsmail NO[at]SPAM gmail.com at 2/14/2007 9:37:40 AM
hi everyone,
i m facing a trouble regarding fetching the max(id) from
one of my database tables and store it into a declared variable
to use it in future.
in pl/sql it is just done by writing the query
declare
max_id in number;
begin
select max(id)+1 into max_id
from employee;
end;
... more >>
64Bit/8-dDualCore Hyperthread Processors/164gigs RAM
Posted by ThomBeaux at 2/14/2007 9:37:18 AM
I have 2 instances on this machine. Is there anything I have to do to
activate the 164 gigs of RAM to be used? I see a check box for AWE, but this
is 64-bit Wk2003 64-bit and SQL Server 2005 Enterprise 64-bit.
The 8processor/dual core hyperthread shows 32 processors.
Do I need to assign 24... more >>
Round function and SQL 6.5
Posted by Ricardo.PT at 2/14/2007 9:25:08 AM
Hi all, need a little help, Im runnig out of ideas on this one
Inside a Storage Procedure I've a statement like this:
UPDATE #Temp_Measure_Out
set PCS_Kwh = round(PCS_Kwh,7)
FROM #Temp_Measure_Out
and my result number is 11.9034725
If I do the same stament, but round the number to ... more >>
View Help
Posted by jtglock at 2/14/2007 8:20:26 AM
I am trying to create a view that will trim the text preceeding the
comma. The problem I am running into is the string is variable length
so I first have to find the position of the comma and then remove
everything to the left of it. For eample...
AP: Vendor, 123456
AP: Vendor123, 56789
... more >>
Cast and Convert
Posted by Patrice at 2/14/2007 7:22:38 AM
Hello,
I know this is simple, but can't think of the solution this morning.
I have a table that I have imported values from a .csv file from and set
them to decimal data type in the table. The values are not showing up as
decimal type with 2 digits after the decimal however. If I perform t... more >>
how to do this query with a case statement
Posted by Derek at 2/14/2007 6:38:03 AM
I have this query in my stored procedure
select count(*)
from personskill
where personid = @personid
and skillid = @skillid
index on the table is (personid, skillid)
the skillid column can be null and/or the passed in @skillid can be
null
how can i account for the nulls?
selec... more >>
dtsrun & Error -2147467259
Posted by harp at 2/14/2007 6:32:50 AM
I always get the following error:
Error -2147467259 (80004005); Provider error: 17 (11)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied
from Microsoft OLE DB Provider for SQL Server.
I do have sqlserver2005 running in a 64 bit machine (MSserver 2003). I
did ... more >>
DataType BIGINT vs CHAR
Posted by SouRa at 2/14/2007 5:37:00 AM
Hi all,
I am working with mssql2000. My database has a table with 100,000 records.
I need to add one column to that table. The values for this column are
numeric with 10 digits (fixed length).
Which data type should I use whether CHAR(10) or BIGINT?
Because CHAR(10) will occupy 10 byte... more >>
Calling .dll
Posted by Uncle Dave at 2/14/2007 5:14:56 AM
I have a block of code calling a .dll via OA which almost works..... The only
thing I am unable to set is a boolean value. If I try to GET the value
(DECLARE @xxxx NVARCHAR(255); EXEC @HR = sp_OAGetProperty @spObject,
N'SecuritiesOnly', @xxxx OUTPUT;) I get "True" returned. No matter what when... more >>
Thoughts on modelling tools.
Posted by Jaco at 2/14/2007 2:46:00 AM
Hi,
This is probably a bit off topic.
Does anyone use any modelling tools? What are your views, recommendations?
Can anyone recommend a tool where I can replicate a single column change
over all tables in the database?
... more >>
Need more than 8000 characters in local variable.
Posted by Geir at 2/14/2007 2:18:05 AM
Hi all.
I have stumbled into a problem with the size of varchar() variable. I have a
SP filling up this local variable with a select syntax based on some logic.
It genereates a SQL SELECT statement that grows bigger than 8000 characters
and therefore cut's the select off. I execute it with ... more >>
Use a column from a view in a new table
Posted by Oystein NO[at]SPAM Norway at 2/14/2007 12:24:34 AM
Hi!
I've got a view made from the sysdtslog9 table. The table has a Primary key
column called ID. I want to use this ID in TableX. What would be the select
call for this? I've tried to make a 3rd view with a Join, but since the
TableX.id is empty the View2.id also is empty.
Any idea?
Th... more >>
User Defined Aggregate - Sort Question
Posted by Rob at 2/14/2007 12:00:00 AM
I've created the following UDA function using the example found in the SQL
Server 2005 help file that returns a comma separated list of values. Is
there a way to have the list sorted alphabetically? I know very little
about SQL Server and less about C#, but want to learn.
TIA
using S... more >>
Restoring Database
Posted by thiensyh via SQLMonster.com at 2/14/2007 12:00:00 AM
I have a db server
i) with ip address 10.1.2.3 - dbname = LRS
Ii) with ip address 10.1.2.4 - dbname = MYM
i back up LRS at the server local drive c:/lrs.bak. Below is my code
BACKUP DATABASE LRS
TO DISK = 'c:\lrs.bak'
i want to RESTORE this database to LRS and MYM as well
What's the... more >>
Views and sorting
Posted by obelix via SQLMonster.com at 2/14/2007 12:00:00 AM
I have an off-the-shelf application that displays DB views. Ideally the data
shld be sorted by one of the non pk columns. Is there a work around this?
I'm using MS SQL 2000.
--
obelix
"Whether you think you can or you think you cant you are right" .... Anon
Message posted via SQLMons... more >>
|