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

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

GROUP BY
Posted by someone NO[at]SPAM js.com at 5/11/2007 5:13:50 PM
hi, I have date field and I want to group by it in weekday, and hour, For example: Mon Tue Wed Tur Fri Sat Sun 1 am 3 1 2 5 3 0 2 2 am 1 2 2 5 3 0 2 ..... how to do that? Thanks. ...more >>


Complex query question
Posted by nisheeth29 at 5/11/2007 4:07:01 PM
So here's my question: I have a table like this: Id OpportunityID TimeStamp Amount 1 A 2007-05-11 15:30 $10 2 A 2007-05-11 12:30 $20 3 A 2007-05-11 10:30 $15 4 A 2007-05-10 18:06 $11 5 A 2007-05-10 10:00 $16 6 A 2007-05-09 23:00 $25 7 B 2007-04-25 15:00 $20 8 B 2007-04-25 10:00 ...more >>

Help in query
Posted by SqlBeginner at 5/11/2007 3:58:01 PM
Hi, I have provided the sample table schema and the existing query. Please help me in getting the expected result by modifying the given query Create table #test ( closeddate datetime null, reporteddate datetime, ) go Insert into #test values ('2007-01-18 14:09:00.000', '2007-01-18...more >>

Complex sql query question
Posted by nisheeth29 NO[at]SPAM gmail.com at 5/11/2007 3:57:53 PM
So here's my question: I have a table like this: Id OpportunityID TimeStamp Amount 1 A 2007-05-11 15:30 $10 2 A 2007-05-11 12:30 $20 3 A 2007-05-11 10:30 $15 4 A 2007-05-10 18:06 $11 5 A 2007-05-10 10:00 $16 6 A 2007-05-09 23:00 $25 7 B 2007-04-25 15:00 $20 8 B 2007-04-25 10:00 $36 9 ...more >>

Cursors and locking
Posted by David W at 5/11/2007 3:32:37 PM
We have a fairly lengthy procedure that uses a cursor as the outermost loop. We are having an issue with locks while this is going on. We want to minimize locking and are not concerned with underlying data changes, updating the cursor directly, or moving backwards. Am I better off to set...more >>

Deadlocking on parallel create indexes?
Posted by Sync at 5/11/2007 1:44:26 PM
Am working with a warehousing installation that nightly imports a massive amount of data. Before the import, indexes are dropped and afterwards, the indexes are regenerated. The "create index" steps are now being multithreaded-- distributed over several threads. However, I'm finding in cases ...more >>

Difference between submit date and now
Posted by Elmo Watson at 5/11/2007 1:30:43 PM
in TSQL, I need to figure out if the difference between a date field and (today's date) is larger than 72 hours and I'm not sure how to go about it. in vb.net, I'd add hours to a variable (something likelike: (Where GETDATE() > datesubmitted.addhours(72))) any idea on how to accomplish t...more >>

Service pack
Posted by FARRUKH at 5/11/2007 1:29:00 PM
some of the servers running n SQL Server 2000(SP3) and want to install SP4. whats the procedure to install new service pack? Full database backup, shutdown server, install then recovery? whats the downtime to install new Service Pack? Farrukh...more >>



convert nulls to 0
Posted by Willo at 5/11/2007 12:35:19 PM
hi; im looking for a way to convert nulls to 0's (zeroes)... i have this query, when is not information that match on bnc_Librobancos or bnc_PresupuestoFlujo i got nulls on impreal and presup. i need to convert those nulls to 0's, it is posible? TIA Select f.id_flujo,f.codigoflujo...more >>

SQL Query
Posted by Peter Newman at 5/11/2007 11:58:01 AM
i am building a business object to read and populate SQl Tables from an XML file. I have managed to get data from one node into a temp table. the records are as ErrorItem_Id OrigAccnumber OrigAccref OrigAccname OrigAccsortCode 24 NULL NULL NULL NULL 24 11111111 REF1 MR SMITH 222222 ...more >>

Find all appearances of the value
Posted by vovan at 5/11/2007 11:44:34 AM
I'm trying to find out what tables are used for different values storing (like reverse engineering). The database contains a huge number of tables. The application working with this database (no source code for it) inserts the same value in different tables (probably the database is not normal...more >>

Fail an SSIS Job if No Records
Posted by Ctal at 5/11/2007 11:40:41 AM
I want my SSIS task to fail if there are no records in a table based on a certain date. What are some ways to set this up? Currently the job completes but as there are no records returned it is of no use. We'd prefer the job just fail so we would know to run it again later once the source tabl...more >>

row with NULL value in column not being returned
Posted by gv at 5/11/2007 11:07:48 AM
Hello, Why does the row with null value in the column I'm checking against not being returned? <> 632 should also include null values as well, this makes since to me. Please help CREATE TABLE tbl1 ( SwrowID INT IDENTITY(1,1) NOT NULL, Switch VARCHAR(20), Fr VARCHAR(30), oc VARCHA...more >>

using wildcards [ ] in REPLACE or CHARINDEX functions
Posted by Joe Sich at 5/11/2007 9:13:02 AM
I'm basically trying to replace non alpha characters of values in a couple columns, but would prefer to create a ud-function or have a function in my view do this for me rather than have to manually update every non-alpha character. I'm trying to do something like this: REPLACE(Col001,[^AB...more >>

For XML Explicit Help
Posted by Jerry at 5/11/2007 8:58:12 AM
I'm trying to learn XML and am using For XML Explicit for my results. The table is as follows: CREATE TABLE [dbo].[LUPW]( [UserLogin] [nvarchar](60) NOT NULL, [LastName] [nvarchar](40) NULL, [FirstName] [nvarchar](20) NULL, [AgencyID] [int] NOT NULL, [Password] [nvarchar](...more >>

Restore File Name
Posted by Emma at 5/11/2007 7:37:01 AM
I want to restore a database and change the location of the files using WITH MOVE. Is it possible to do this if I do not know the names of the logical file/physical names? restore database dbInfo from disk = 'dbfile.BAK' with move 'logical file name’ to 'e:\data\dbfile_Data.mdf', mo...more >>

Collation of columns in table variables
Posted by joris NO[at]SPAM hospital2000.com at 5/11/2007 4:18:15 AM
Hi, SQL Server 2000 BOL has this to say about the collation of columns in table variables: "If not specified, the column is assigned either the collation of the user-defined data type (if the column is of a user-defined data type), or the default collation of the database.". However, I hav...more >>

many to many join
Posted by user at 5/11/2007 3:41:28 AM
Can one add some extra data into the link table on a many to many join. Currently it only contains two id's from each table as primary key. Have a group table and a member table and a link table. Want to add a 'title' column but the only current table it could go in would be the link table....more >>

How to prevent accidently dropping a table
Posted by Frank Goris at 5/11/2007 2:41:01 AM
Hi to you all, Is it possible to prevent accidently dropping a table from a database even for an administrator ? Any comment appreciated ! Regards, Frank ...more >>

Finding UnMatched Using Left Join
Posted by cbrichards at 5/11/2007 12:58:02 AM
I am attempting to find a record that exists in one table, but does not exist in another. Using the example below, I am not getting a return. I am expecting my return to be 55. Why is nothing being returned? DECLARE @TCar TABLE (LKey int, FileFID int) DECLARE @TFiles TABLE (LKey int, FileUID i...more >>

Find all mention of a field in SPs
Posted by Mark at 5/11/2007 12:55:53 AM
Hi - I'm using SQL Server Express (2005) for testing, and SQL 2000 for production. Is there anyway I can run a query to find all of the stored procedures which include a specific field eg. 'car_owner' within them? Thanks, Mark *** Sent via Developersdex http://www.developersdex.com ...more >>


DevelopmentNow Blog