all groups > sql server programming > june 2007 > threads for monday june 25
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
Is there any history in this forum. (Archive)
Posted by geir at 6/25/2007 11:47:00 PM
Hi all.
I am looking for some older postings in this forum, but cant fint it. It was
some simple check for running 2000 or 2005. Are there some arcive somewhere.
Is there a cleanupjob running in this forum that delete old messages or
something.
IF "some test"
Do 2005 stuff
else do 2000... more >>
Reporting Services Login dialog box appears again and again. Login fails
Posted by Shocky at 6/25/2007 8:38:27 PM
Hi,
We are using reporting services 2000 and have provided URL access to
the report server.
Recently when some of the users are trying to access reports hosted
on
the report server, they are unable to login.
After they provide their domain\username and password, the login
dialog box app... more >>
Converting a String to a table of characters
Posted by stjulian at 6/25/2007 6:35:26 PM
SQL2000
I have created a table of characters, ascii codes and the military call
words (alpha, bravo, etc.) and would like to create a SELECT statement to
convert a string into a table to match up to the letters in the table.
my ascii code table:
unicode_code unicode_character desc... more >>
table owner and size of each table
Posted by gv at 6/25/2007 5:20:36 PM
Hi all,
Using this to get the tables in database.
Also need the owner and Datasize of each table\view?
Then to sort by top 20 largest tables based on a owner
USE mydatabase
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_CATALOG = 'mydatabase'
AND TABLE_SCHEMA = USER
th... more >>
database table size
Posted by brian shannon at 6/25/2007 4:18:43 PM
I have an MSDB database that is 256 MB in size. I ran the below script from
another group to show reserved and used data by table. The sum of reserved
sized is about 10 MB. THe script doesn't include system tables. Is there a
way to get the sp_MSForEachTable function to include system tabl... more >>
notifications of changes
Posted by Daniel at 6/25/2007 3:54:35 PM
Is there any way to setup notifications to know when changes are made to our
store procedures?
There 3 of us that are always updating and correct procedures during our
development and pilot... just wanted to know if there is something we can
setup to be notified when a change is made to a p... more >>
slq 2005 - scripting out database objects to SEPARATE files
Posted by newToSql at 6/25/2007 3:42:41 PM
Hi,
I tried the script wizard (sql 2005) to script out database tables and
stored procedures, but could not figure out how to create SEPARATE files
(one per object) as that was the case with sql 2k and prior versions.
Thanks
... more >>
Loops in Stored Procedure
Posted by vovan at 6/25/2007 3:14:08 PM
I have a table in SQL Server 2000:
CREATE TABLE [dbo].[Ac_Account1] (
[FAccountID] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FParentAccountID] [int] NULL ,
[Sublevel] [int] NULL ,
[FAccountTypeID] [int] NULL ,
[FAccountNumber] ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Accessing DTS.Variables with VB.net
Posted by doofy at 6/25/2007 2:01:32 PM
I'm trying to create a file name in a Script Task which incorporates the
current date, and to use that file name when I execute a File System
Task. I've created a user variable in the Variables list of the package
called Output_File.
Here's the code for me creating the file name value in t... more >>
SQL Server Express Freezes
Posted by Mike9900 at 6/25/2007 1:40:01 PM
Sometime when I want to get the data SQL Express Freezes. It does not matter
on a query, for example when I performed this this.dsCommand.Fill(dataSet,
srcTable) it freezed. But the next time I connected and performed the same
command with the same query it was quick!
--
Mike... more >>
Help with Recursion -adventureworks
Posted by Bill Yanaire at 6/25/2007 1:26:04 PM
I am using the book "Professional SQL Server 2005 Programming" by Robert
Vieira (wrox publishing) and in Chapter 11, page 313 (for those keeping
score), there is a section on recursion.
This function uses the AdventureWorks database and by calling it:
Select * from fnGetReports(12)
it i... more >>
DateTime
Posted by seema at 6/25/2007 1:21:01 PM
Hi,
I have a column of datatype DateTime. I need to retrieve data from last 14
days old.
I am doing like this but it doesn't work.
Select reveiveddate from table1
where receiveddate = GetDate()-day(14)... more >>
Data truncation
Posted by fniles at 6/25/2007 12:57:48 PM
I am using SQL 2005. I have a table with a column called Price with data
type float.
The data in the Price column is 1.33855. When I do
select CONVERT(DECIMAL(12,4),Price), the result is 1.3385, but when I do
select CONVERT(DECIMAL(12,4),1.33855) the result is 1.3386.
Why when I do select CO... more >>
Creating Backup Records
Posted by Terry Carnes at 6/25/2007 10:47:00 AM
I am creating a program that will be making some changes to one of our main
data tables. Under certain circumstances (errors, usually) I want to copy
the data from Table1 to Table-error appending datetime and an error message.
How do I do this within a stored procedure?
This is how far I've... more >>
Approach for Querying Joined Tables
Posted by KW at 6/25/2007 10:16:54 AM
I have a situation that is stumping me. I am not a SQL expert, but I
know what I want to be able to do. Let's say I have the following two
tables...
Customers
- ID
- FirstName
- LastName
CustomerData
- CustomerID
- FieldName
- FieldValue
with the following sample data...
Cu... more >>
Restoring Log
Posted by nkg at 6/25/2007 10:07:42 AM
I have a backup of a database which has large transaction log file, Is it
possible to restore the backup with
truncated log. or any other alternatives where the transaction log file will
be minimum size.
thx
... more >>
How to Output BIGINT in RAISERROR
Posted by SQL Learner at 6/25/2007 9:19:24 AM
I cannot figure out proper format string for a bigint so that I could
directly embed my input parameter in my exception string, as follows
DECLARE @quantity BIGINT
SET @quantity = 1234567890
RAISERROR('Cannot Process Quantity %d', 16, 1, @quantity)
Of course I could cast it to varchar befor... more >>
ExecuteNonQuery Transactions
Posted by mfm at 6/25/2007 9:05:00 AM
I am using the ExecuteNonQuery method of a SqlClient.SqlCommand to execute
update and insert stored procedures.
I am trying to determine if, in the event of an error, the entire procedure
would be rolled back. If not how can I esure that the insert or update
statement acts as one transac... more >>
optimization question regrading Scan count vs. physical reads
Posted by roy NO[at]SPAM mgk.com at 6/25/2007 8:57:54 AM
i have a view ...it contains the following:
(SELECT SUM(LS.IC_QTY_AVAILABLE) AS INGRED_QTY_AVAIL,
LS.COMPANY_CODE,PM.BT_COMMODITY_CLASS AS ING_PART_GROUP,
LS.UNIT_OF_MEASURE AS ING_UOM, LS.IC_STATUS_CODE
FROM IC_LOT_STATUS LS
JOIN PRODUCT_MASTER PM ON PM.COMPANY_CODE = LS.COMPANY_CODE AND... more >>
Scripting in SSIS
Posted by doofy at 6/25/2007 8:54:02 AM
I'm trying to write some code in SSIS. I've never done this. I'm
trying to take the current date, and create a file name that
incorporates the current date. That variable will be used in another
task to save the file off to.
Here's the code I've got. I keep hitting start, but get no mes... more >>
Display formatted date
Posted by Rob at 6/25/2007 8:27:00 AM
I'm trying to format the date to appear as DDMMYYYY, e.g. 25062007
However, when I run this command...
SELECT
CONVERT(CHAR(8), RIGHT(REPLICATE('0',2)+DATENAME(dd,GETDATE()),2)
+RIGHT(REPLICATE('0',2)+CONVERT(CHAR(2),DATEPART(month,GETDATE())),2)
+DATENAME(yyyy,GETDATE())) as DATE
....... more >>
Connect to an existing Analysis Services Database
Posted by DjBepy NO[at]SPAM googlemail.com at 6/25/2007 7:50:17 AM
Ahoi! :)
How can I connect to an existing Analysis Services Database and send a
command like "Create Global Cube"? I use AS2005 and .NET.
... more >>
Setuser in case sensitive environment
Posted by puneet.aggarwal1 NO[at]SPAM gmail.com at 6/25/2007 6:43:42 AM
Hi,
I have a case sensitive environment in which the following query fails
setuser 'domain_name\administrator'
It says no such user exists
But on the other hand if i execute
setuser 'domain_name\Administrator' (Note the capital A in
administrator) it starts working
My questions a... more >>
Pivoting a recordset - NEWBIE QUESTION
Posted by Oblivion at 6/25/2007 4:16:28 AM
Hi All,
I have to transpose and group some data coming back from a rather
simple SELECT statement. Here's a sample of the recordset returned...
EMPLOYEE NAME DEPARTMENT
----------------------------------------------------------
Jon Marketing
Joan ... more >>
Insert Into a table
Posted by macroapa NO[at]SPAM hotmail.co.uk at 6/25/2007 3:52:37 AM
I have written SQL code to insert values into a table as follows:
INSERT INTO a_agent_commission_info
(Opening_effec_date, commission_format, comm_style,
indemnity_terms_flag, commission_format_enhancement,
init_indemntiy_entitle_code, product, version,
explicit_commission_rates_code)
VA... more >>
Create serverbased and lokale Cubes with .NET an Analysis Services 2005
Posted by DjBepy NO[at]SPAM googlemail.com at 6/25/2007 3:40:33 AM
Hello,
I want to create a Programm, which create in Analysis Services 2005
first a serverbased Cube and then a lokale Cube. I used VS.2005, C#
and the Namespace Microsoft.Analysisservices.
So, I create a Server-Object an conect to the Server, then I create a
Database-Object, a RelationalDat... more >>
openxml sql server 2005
Posted by farshad at 6/25/2007 1:20:01 AM
Hi,
Something very strange seems to be happening in sql server.
Below you can see a sample sql code which you can run in query analyser.
Notice that the sql is retrieving data from the sample xml.
The problem is as follows:
If I run the sample code below, this is the error I get:
"The XM... more >>
Problem reading xml
Posted by xml_novice at 6/25/2007 1:09:58 AM
I am trying to read some xml that represents an audit of various
tables.
The xml is generated by another application.
The code is shown below:
DECLARE @idoc int
DECLARE @doc varchar(4000)
SET @doc='
<BusinessEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://sch... more >>
Database design question - Isolated, unrelated tables
Posted by nyathancha NO[at]SPAM hotmail.com at 6/25/2007 12:08:45 AM
Hi,
I have a question regarding best practices in database design. In a
relational database, is it wise/necessary to sometimes create tables
that are not related to other tables through a foreign Key
relationship or does this always indicate some sort of underlying
design flaw. Something that... more >>
How to enable cascade delete on existing tables?
Posted by Gune at 6/25/2007 12:00:00 AM
Hi all,
We have been working on an existing sql 2000 database and now there is a
requirement to delete some records from all the tables in the database. All
tables have relationships and the condition on which we need to delete is
based on the parent table. Ie, all relationships starts ... more >>
Output parameters
Posted by New Bee at 6/25/2007 12:00:00 AM
Hi ,
My parameter definition looks like this. Im using .NET to retreive the data
and it worked OK before I tried to implement an OUTPUT parameter, I need to
be able to access that, can anyone tell me how ?
ALTER procedure dbo.CR050_HoldingAccountBreakdown_L2
(
@pyear int,
@week_... more >>
Select 2/3 Return 0
Posted by Þamil AGRALI at 6/25/2007 12:00:00 AM
Select 2/3 Return 0
Or
CREATE TABLE [dbo].[Table_1](
[a] [int] NULL,
[b] [int] NULL,
[c] AS ([a]/[b])
) ON [PRIMARY]
a = 2
b = 3
c = 0 :)
... more >>
SQL Server 2000 - How to specify user id and password
Posted by MartyNg at 6/25/2007 12:00:00 AM
I have a DTS that needs to export a table to a text file located on
another server using UNC such as:
\\ServerName\Reports\theReport.txt
How do I specify a user name and password to use for this connection?
... more >>
|