Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > march 2007 > threads for thursday march 15

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

SQL Server 2005 compact edition with VB
Posted by Yobbo at 3/15/2007 9:43:21 PM
OK so I've downloaded and installed this 1.7MB wonder, but now what? I just wanted a nice easy to deploy db to use with my VB 6 app and although the size is now great it doesn't seem to be doing much else. Nothing in the start menu, sys tray, desktop, etc. Just a folder in my program files ...more >>


Help: Convert these Access queries to Microsoft SQL 2000 queries:
Posted by admlangford NO[at]SPAM gmail.com at 3/15/2007 7:01:26 PM
Hi, can someone please help me convert the two Access queries below to MSSQL 2000 queries? Note; there are only ever three categories 1,2 and 3 ============================ Query 1) TRANSFORM Sum(IIf([RESULT]="FINISHED",1,0)) AS Expr2 SELECT TABLEA.ATTRIBUTE1 FROM TABLEA LEFT JOIN TABLEB ON...more >>

Position Complex Elements w/ For XML Explicit
Posted by creed1 at 3/15/2007 5:57:00 PM
I need to generate an XML document that takes the following format. The format has already been defined by a separate application. <Opportunity> <Name>Example Name</Name> <Customer Id="A"> <Name>Some Customer</Name> </Customer> <TotalValue>50.000</TotalValue> </Opport...more >>

track iteration number of call to sproc
Posted by John Grandy at 3/15/2007 5:37:05 PM
I have a sproc which is called iteratively from an SSIS package. For debugging purposes, I've inserted in the sproc a PRINT statement that SELECTs some values . I can not think of a way to track and also PRINT the iteration number of the call to the sproc. Here's what I'd like to see in...more >>

database design questions
Posted by elain.sun NO[at]SPAM gmail.com at 3/15/2007 4:40:46 PM
Hi, I am a .net web developer and i'm developing a database driven web application. I have 2 questions about sqlserver database design. 1. Let's say it's a online store, i have several tables in my database, like SalesOrder, Production, CustomerInfo, ProductionDescription, etc., each time t...more >>

SQL Server 2005 Activity Monitor
Posted by RickSean at 3/15/2007 4:37:00 PM
I hae a stored procedure that has been running for over 9 hours; I see a green rolling wheel and the status as 'Executing Query' I tried to get some info in Activity Monitor but couldn't find any info on this process; where do i go to check what is going on with this sp?...more >>

Remove text from a number column
Posted by Daniel at 3/15/2007 4:36:55 PM
We have converted a few access DB's to SQL...they were not that large and it was to help with the new requirements requested by the business. Everything works, but in Access one of the columns was setup to capture alpha-numeric. Its not that big a deal, yet.. but woudl like to see is there any...more >>

Aggregate functions in CHECK Constraints.
Posted by qwerty2_reverse_iterator at 3/15/2007 4:04:26 PM
1) Are aggregate functions allowed in CHECK constraints? Basically, I would like to use an aggregate function, like COUNT, with a CHECK constraint for a table. But when I try to do it via MS-SQL Mngmnt Studio Express, I get an error. Basically I right click on a table in the design view, ch...more >>



Looping through table based on time w/ DateAdd
Posted by Scott Hedrick at 3/15/2007 2:55:16 PM
I need to walk through a table with many thousands of rows summarizing data by minute. If I use the DateAdd function to go to the next minute, I do not get the proper results for 3/11 when the time changed. I have since discovered that DateAdd is not DST aware even though SQL Server books on...more >>

Passing a list/array to stored proc
Posted by Stimp at 3/15/2007 2:39:37 PM
Hi all, I'm trying to run a sproc like: CREATE PROCEDURE spGetGuests @GuestList varchar(50) SELECT * FROM Guests WHERE idGuest IN (' + @GuestList + ') But I get the following error: Syntax error converting the varchar value ' + @GuestList + ' to a column of data type int ...more >>

Question about STDEV(), STDEVP() and standard deviations:
Posted by usenet.junk.000 NO[at]SPAM gmail.com at 3/15/2007 2:26:37 PM
I am trying to use the built-in functions to calculate a standard deviation, and I am getting confused. Here is a runnable example: create table #t (i int) insert into #t (i) values (0) insert into #t (i) values (0) insert into #t (i) values (14) insert into #t (i) values (14) select a...more >>

View Error Log from T-Sql
Posted by Alex S at 3/15/2007 1:58:26 PM
Is there a way to view error log from Query Analyzer? Thank you ...more >>

rename MDF and LDF files?
Posted by Test Test at 3/15/2007 1:30:22 PM
Is there a command to rename MDF and LDF physical files of the db? The task is rename: 1) db name (sp_renamedb proc) 2) logical file name (alter database and mofify file command) 3) MDF and LDF files (can it be done using T-SQL command?) Thanks for your help. *** Sent via Develope...more >>

Performance Drop with Oracle Linked Server
Posted by Clint at 3/15/2007 12:33:07 PM
Hello all, I'm having a problem with calling a stored procedure via openquery/linked server between SQL Server 2000 and Oracle 9i. Here's an example of the query that's being run. In reality, the Oracle SP is returning more rows: SQL Server: select * from openquery(WAREHOUSE, '{CALL ...more >>

Cross Dtabase referencing from a resultset
Posted by RSH at 3/15/2007 12:02:57 PM
Hi, I am currently working with a client that has a database structure that is causing headaches in trying to create queries. Because the system is in place and functioning and can't change the architecture, so i was hoping for some assistance. Their structure has Top Level Global datab...more >>

AUDIT IN DB
Posted by Retf at 3/15/2007 11:57:04 AM
Hi all, I need know if have same way to create one trigger ( I think that this trigger need be DDL, I don't know) that when any: INSERT, UPDATE OR DELETE is executed in any table, the thata is captured and send to another table, for audit. Have any way to do this? Thanks SQL SERVER...more >>

Exclude update of a field if parm is null
Posted by Brad Pears at 3/15/2007 11:23:47 AM
I have a stored procedure that either inserts a row or updates a row. There is a field in there that I would like to check for in the update section. If the incoming parameter (pPDF) is null, I do not want to even issue an update for that field. Can I cehck for this inline or do I have to wri...more >>

Can this be done?
Posted by sl0703 NO[at]SPAM gmail.com at 3/15/2007 11:16:02 AM
My objective is to register the Windows-LogonID in audit trail, but at this point the application is using a SQL-userID. From searching this group, it seems impossible to get the Windows-ID as a variable in the SQL server if connected with SQL-userID - so I'm trying to find alternative. Ques...more >>

Query Performance help!
Posted by Matt Sonic at 3/15/2007 10:43:57 AM
This dynamic query frequently times out. I'm guessing it's because of all the udfs in the select and where clauses so I attempted to make the RevisionStatus and UsageStatus into fields in the EngineeringDocuments table and update them with triggers. This works fine but the RevisionStatus val...more >>

male vs female
Posted by rodchar at 3/15/2007 8:15:18 AM
hey all, i have an employee table of the following: empID, Gender, Salary how do i get a count of male vs female? also, is it possible, in addition to the above, get the percentage of male and female, and avg of their salary all in one statment? thanks, rodchar...more >>

Problems with Coalesce - nullif
Posted by SteveInBeloit at 3/15/2007 8:11:05 AM
Hi, I have a Select statement that uses Coalesce with Nullif in the Where clause. I thought all has been working good. I found a row that it is not returning and have it narrowed down to this line in the Where: AND odColor LIKE COALESCE (NULLIF('%' + @Color + '%', ''), odColor) I pass ...more >>

sql group by question
Posted by jobs at 3/15/2007 7:46:15 AM
select WorkflowNo, JobNo, step, max(WFDateTime) from WorkFlowHistory group by WorkFlowNo, JobNo, Step produces this: workflowno jobno step WFDateTime 34 512 1 2007-03-14 09:45:01.520 34 513 2 2007-03-14 09:54:01.300 34 514 3 2007-03-14 09:55:01.453 35 534 1 2007-03-14...more >>

2005 Table function with index?
Posted by jbyrd at 3/15/2007 7:43:41 AM
Can a table function have an index or a primary key that contains 2 columns in SQL 2005? ...more >>

Problem with sorting data in Full Outer Join Table
Posted by MacChojnacki NO[at]SPAM googlemail.com at 3/15/2007 7:03:08 AM
Hello, I stucked on strange problem with data order in dataset. Any clue or suggests will be appreciated. Let's start from the beggining. We have to tables: Table1: Nr1 21 22 23 24 25 26 27 28 35 37 Table2: Nr2 20 21 22 25 26 28 32 34 39 This is my result which d...more >>

Space between the folder names when executing xp_cmdshell
Posted by MittyKom at 3/15/2007 7:00:02 AM
Hi All How do you would handle the space between the folder name "Default Site" on the below SQL as it is part of the pathname to file DB20070314 to be deleted? I am getting the error that the path to the file is wrong? --------- declare @nqly nvarchar (356),@date char(10) select @date...more >>

Problem with sorting in Full Outer Join table
Posted by MacChojnacki NO[at]SPAM googlemail.com at 3/15/2007 6:55:01 AM
Hello, I stucked on strange problem with data order in dataset. Any clue or suggests will be appreciated. Let's start from the beggining. We have to tables: Table1: Import Nr 18 19 20 21 22 23 24 25 26 27 28 29 32 33 34 Table2: Import Nr 20 21 23 25 26 28 29 32 34 ...more >>

Float behavior
Posted by x-rays at 3/15/2007 6:33:48 AM
Hi All, I noticed a strange behavior about Float data type. Declaring a variable with float data type, set the decimal number 19.44228 to the variable and Print the value of the variable. It prints the following number 19.4423. If I execute a select statement to get the value of the vari...more >>

Create Date/Time field from 2 other fields
Posted by Sawlmgsj at 3/15/2007 5:56:08 AM
I have a table with 2 fields - a Date/Time containing an appointment date and a VarChar containing an appointment time in a format such as 11:30 (I have inherited this arrangement from an existing structure. I could change the format of the time if necessary.) I need to create an UPDATE tr...more >>

Non nullable table columns using DB create scripts using SQLCmd More options
Posted by Shocky at 3/15/2007 5:30:59 AM
Can someone tell me how to create tables with non nullable columns using SQLCmd(by executing db create scripts)...when I use the scripts to create the database all tables that get created have the columns as nullable i know that this can be done using create table and mentioning null or not...more >>

Any ways to make stored procedure with schema checking likeview's WITH SCHEMABINDING option?
Posted by Norton at 3/15/2007 12:00:00 AM
Thx in advance! ...more >>

Is need to make some IIS settings before install SQL server when endpoint feature is used?
Posted by ABC at 3/15/2007 12:00:00 AM
Is need to make some IIS settings before install SQL server when endpoint feature is used? I only want use endpoint fwature, I discovered I cannot connect endpoint use IE, which return 404 error. Is it need to set some config on IIS to enable endpoint? ...more >>


DevelopmentNow Blog