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 > june 2007 > threads for friday june 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

DataSet.GetXml() get weird value(value with many whitespace) for int and char(n) columns
Posted by Carol at 6/15/2007 10:19:03 PM
When I run a select sql to fill a DataSet, then use the DataSet.GetXml() to get the xml string. It gets the following xml: <VALIDSUSPENSIONTYPES> <SUSPENSIONTYPE id="1 " description="Suspend for 15 minutes"> </SUSPENSIONTYPE> <SUSPENSIONTYPE id="2 " description="Suspend f...more >>

Question about Database design.
Posted by rhaazy at 6/15/2007 6:47:10 PM
I am working on a server/client application where the client scans a computer for all available mac addresses and stores the information in a database, associating mac addresses to assets. I see problems occuring in terms of NICs being removed, changes to different machines on the network, new ...more >>

Design and query question
Posted by Subhash Agarwal at 6/15/2007 4:38:19 PM
I have a table (Say TblA) with composite Clustered PK key ID1+ID2+ID3 plus other columns. There are high levels of inserts on this table. Question 1. Is using Insert (With Nolock) a good idea? What are the advantages/disadvantages. 2. Changing PK to a new identity column (clustered) and ...more >>

weekly range
Posted by someone NO[at]SPAM js.com at 6/15/2007 4:07:20 PM
Hi, if I pass in start date and end date to a procudure, how to general a list like this input @start_date DATETIME, @end_date DATETIME, @start_date = '5/20/2007', @end_date = '6/30/2007' select * from customers output [5/20/2007] [5/26/2007] x customers [5/27/2007] [6/2/2007] ...more >>

Left join to subquery with aggregate function
Posted by Joe at 6/15/2007 3:43:59 PM
I'm having trouble joining tables using an aggregate function. I have two tables, 'dealers' and 'ads'. One dealer can have many ads. I would like a result set that joins each 'dealers' record with a single 'ads' record using an aggregate function. Example: -------------- create table deale...more >>

Errors when running SQL statement
Posted by Curious at 6/15/2007 1:23:40 PM
I have a SELECT statement as below: SELECT SMS.StandardMailingSetName, NULL, M.Mailing_Name, M.Mailings_ID, SMS.StandardMailingSetID, MailingType.MailingType_Id, MailingSchedule.MailingSchedule_Id FROM Mailings M INNER JOIN StandardMailingSet SMS ON M.Mailings_ID = SMS.Mailings...more >>

View DB structural changes in the Log?
Posted by Monty at 6/15/2007 1:10:59 PM
I seem to remember being able to make a change to a table structure in SQL 2000 Enterprise Manager (say, add a column) and then being able to look at the log file and see the SQL used to effect that change (like "ALTER TABLE Employee ADD HireDate DATE"). I know I used to be able to do this wit...more >>

Question on SQL & union
Posted by Blasting Cap at 6/15/2007 12:49:00 PM
I have the following query: select Case When Grouping (ba) = 1 Then 'Totals' Else ba End as ba, sum(order_qty) as oqty, sum(order_val) as oval from sales_ord_curr_yr a inner join sales_product on sales_product.prod_cd = a.prod_cd inner join tblproducthierarchy on sales_prod...more >>



group by datetime
Posted by bic at 6/15/2007 11:46:00 AM
Hi, I am baffled by this query and can use a little help pls! query count for each Monday of the week in the last few months between 9 pm and 1 am. I know I can use datepart() but can't figure out how to query between 9pm and 1am. Thanks. -- bic...more >>

Updating based on values of two records
Posted by Ctal at 6/15/2007 10:42:28 AM
I'm sure this is obvious, but for some reason, I can't get my hands around the solution. I have a table like this: Account CalYear CalMonth Amount Comm 2006 12 80 Comm 2007 01 100 Comm 2007 02 1...more >>

Data overflow
Posted by Jack at 6/15/2007 10:29:08 AM
Hi, I got a Access database and I need to import a table to sql server. I am using the DTS feature to import the table. However, the import is failing with a message that column 43 ('shipdue', DBTYPE_DBTIMESTAMP) status 6: Data overflow Invalid character for cast specificatioin. I have no i...more >>

Fill down a column
Posted by INTP56 at 6/15/2007 10:13:01 AM
I know SQL wasn't meant to do this, but I'm trying to help a colleague and wondering if I can do something that is order specific. Right now, he is parsing a file, and one of the things he does is fill down a column (ala Excel) with the last value actually used in that column. The actual p...more >>

Using DATENAME to produce desired result
Posted by Rob at 6/15/2007 9:31:00 AM
I have a table that store date values as: 2007-03-08 00:00:00.000 2007-05-14 00:00:00.000 ::::::::::::: I am trying to pull this info to display the date as: 08MAR2007 14MAY2007 When I run the following SQL stmt.... select DATENAME(dd,[ActivityDate]) +DATENAME(month,[ActivityDate]...more >>

Sql Server and VBA
Posted by doofy at 6/15/2007 9:06:13 AM
Is there a VBA component to Sql Svr 2005? Do I need Visual Studio to do this? I need to run a job which will run a stored proc to populate a table, then port the information over to an existing Excel template, then save the template with a name that includes today's date, then email the ...more >>

How to cancell a back up job MS SQL 8.0
Posted by jmonsivais NO[at]SPAM gmail.com at 6/15/2007 8:27:22 AM
How can I cancel a backup job in MS SQL 8.0. There is no mention nor option within the DB. Can anyone help? ...more >>

How can I find out which security group I belong to on a database?
Posted by Curious at 6/15/2007 8:06:02 AM
Hi, It seems that I have limited rights to this database because if I logon as myself to the browser of the database, I'm unable to browse a number of things while some others can. While if I use Query Analyzer and logon as "sa", I'm able to see everything through SQL statements (in Query Ana...more >>

postcodes/ZIP codes within X km
Posted by Lee at 6/15/2007 5:19:10 AM
Hi all The following query should return a list of businesses within a 20km radius of the co-ords 50.8499999999999 - 0.5999999999999 The table name is GB, and the latitude and longitude columns are varchar(50). Its returning: Msg 8114, Level 16, State 5, Line 1 Error converting data type...more >>

Resultset's cardinality changes when switching ORDER BY between ASC and DESC
Posted by Jamie Collins at 6/15/2007 4:47:17 AM
I'll break with tradition and start with the fix to the problem: rebuild the indexes for the table. But what was the problem? Symptoms for database 1: spurious dates were appearing in a column where a NULL should have been returned. Symptoms for database 2 (different application user, differ...more >>

Tracking Database Revisions
Posted by Monty at 6/15/2007 3:58:08 AM
I was wondering if someone could recommend a system for tracking database revisions between release versions and a way to implement those revisions when a client updates to the latest version. For instance, we install version 1 of an app at a client and then we work on developing version 2 and...more >>

Generating record sequence numbers in a select statement
Posted by Tony at 6/15/2007 2:00:43 AM
Does anyone know how to generate a sequence number in a Select statement e.g. Select x, col1, col2, col3 from table where x generates a sequence number for each record returned, 1, 2, 3, 4, etc. where on the first record x = 1, and the second x = 2, etc. I don't want an sproc, ju...more >>

Group counters in views
Posted by at 6/15/2007 1:01:19 AM
Hello, I'm not sure if this is possible but I'm trying to produce a result set from a view similar to this: Column 1 Column 2 Column 3 apple green 1 apple green 2 apple green 3 Banana yellow 1 Banana yellow 2 Banana brown 1 In this example column 3 is a calculated group coun...more >>

view for sp
Posted by someone NO[at]SPAM js.com at 6/15/2007 12:00:00 AM
Hi, I try to move one report logic to sql server to speed it up. may need some looping and calculate, grouping, do I use a view or store procedure for this? thanks in advance. ...more >>

Count Users
Posted by Robert Lehmann at 6/15/2007 12:00:00 AM
Hi there! Do you know any possibility to count the number of (logged in) users in a SQL database using ADO or ADO.NET? Thanks for your help! Robert ...more >>

Pelase help
Posted by Peterpeter via SQLMonster.com at 6/15/2007 12:00:00 AM
Hello hello simple query select weight from Table1 compute sum (weight) but there is need to see only computed sum, not all the rows from table1 how? -- Message posted via SQLMonster.com http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200706/1 ...more >>


DevelopmentNow Blog