Groups | Blog | Home


Archived Months
January 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
all groups > sql server (alternate) > july 2006 > threads for july 1 - 7, 2006

Filter by week: 1 2 3 4 5

Need More SQL Query NewID Help
Posted by Paradyse at 7/7/2006 6:21:53 PM
Excuse my ignorance because I don't do advance db related programming, but have no other choice at the moment. My experience is limited to simple queries. I need to have the following query display the recordset in random order based on RecordID (unique key) if possible. I tried the ORDER B...more >>


Northwind database extra SQL needs
Posted by soalvajavab1 NO[at]SPAM yahoo.com at 7/7/2006 12:29:00 PM
I have asked for the following questions and I need your advises. Utilizing the Northwind database suppied with SQL Server, create SQL to solve each of the exercises listed. 1=2E I want to contact all customers who have received over $1,000 in discounts on orders this year. Give me the name ...more >>

Make and save a blob on the fly in stored proc
Posted by natzol at 7/7/2006 12:24:08 PM
Is there a way to run query, make file out of query (txt,csv or xls - for example) and save it as a blob into the table column type Image/Text? Any thoughts would be greatly appreciated. Thanks! ...more >>

OUTER JOIN not working?
Posted by kamin NO[at]SPAM yankeegroup.com at 7/7/2006 9:46:25 AM
I have this query select created_date, tyg_aging_due_dates.object_type, tyg_aging_due_dates.due_date from #tyg_aging_service_metrics right join tyg_aging_due_dates on tyg_aging_due_dates.due_date = #tyg_aging_service_metrics.d...more >>

Delete statement for a list of items with multiple columns identifying primary key
Posted by pb648174 at 7/7/2006 9:21:23 AM
I frequently have the problem where I have a list of items to delete in a temp table, such as ProjectId Description ------------- ---------------- 1 test1 2 test4 3 test3 4 test...more >>

Insert Function Help
Posted by riley.derrick NO[at]SPAM gmail.com at 7/7/2006 8:10:22 AM
Hello All I have been looking over the various forums and threads trying to learn as much as I can. Here is my issue. I am trying to do the following: Write a function that involves the following: Calculates the following. 2 user inputted dates. (Ex. Jan 1 2000 -- Jan 1 2004). Figures out ...more >>

ADS user and sql 2005
Posted by rcamarda at 7/7/2006 5:22:44 AM
I wish to use something other than sql's SA account user to connect to my data warehouse, so I created a user in our active directory user. Ill use dw as the new user as example. after I created the user, dw, in ADS, I added the user via Management Studio in Security> Logins. I grant ower of ad...more >>

Hide SQL Server DB; 2005 version on Win 98
Posted by mal hit at 7/7/2006 4:47:52 AM
I would like to know if it's possible to embed a SQL Server 2000/2005 DB within a desktop application so that the end users cannot view the DB. Also, this will prevent them from copying the database on to their other SQL Servers. Also, what are the options to load SQL Server 2005 on Win 98 ...more >>



2005 Express: testing replication
Posted by R.A.M. at 7/7/2006 12:00:00 AM
Hello, I am learning SQL Server 2005 Express. I need to test replication but when I run New Subscription Wizard I got error: "There are no publications to which you can subscribe, either because this server has no publications or because you do not have sufficient privileges to access the publi...more >>

Odd SQL IN usage?
Posted by NO[at]SPAM sh at 7/6/2006 4:30:21 PM
Hi guys, Got an odd SQL string that I need to produce that is most probably simple to construct but with it being hot in our office, I simply can't get my head around it....!! Its based around an online emailing facility whereby multiple hotels can be emailed via a single application. Us...more >>

pulling all dates within a date range
Posted by rugger81 at 7/6/2006 2:14:40 PM
I am currently working in the sql server 2000 environment and I want to write a function to pull all dates within a given date range. I have created several diferent ways to do this but I am unsatisfied with them. Here is what I have so far: declare @Sdate as datetime declare @Edate as date...more >>

Insert Subqueries
Posted by pltaylor3 NO[at]SPAM gmail.com at 7/6/2006 8:34:28 AM
I have tried this insert comand and it errors out telling me that i cannot use subqueries this way. INSERT INTO tblPartLocation (PartLocation, Part)VALUES (999,(SELECT PartID FROM tblParts WHERE PartName = 'test')) how would i insert a value from a query? thanks for any help ...more >>

exporting to CSV
Posted by Katie at 7/6/2006 7:04:15 AM
Hi, I have a bunch of stored procedures (some using temp tables) which give out tables which are then used in crystal to give out reports. These stored procs are run dynamically depending on values users select on forms Some people instead of reports want Comma Seperated Files (CSVs). I am ...more >>

MS-SQL one .NDF file missing How to Recover/Rebuild DB??
Posted by Dhungu Dhumbak at 7/6/2006 4:13:28 AM
Dear All, SOS Please Help. I have a MS-SQL DB with 4 .ndf files. One (first) .ndf file is missing. somehow got deleted??. Is there any way can rebuild my DB. The .MDF and .LDF files are in tact. Please help asap. Dhumbak *** Sent via Developersdex http://www.developersdex.com ***...more >>

Building an application on multiple data sources
Posted by William at 7/6/2006 12:13:50 AM
ASP.NET on SQL Server I've been asked to quote for developing a system to expose data on a web application. Most of the data will come from SQL Server DBs located on a single box. However, some of the data will be sourced from ORACLE which is located on a different box. It may be necessary ...more >>

BEGINNER: simple Delete trigger
Posted by R.A.M. at 7/6/2006 12:00:00 AM
Hello, I am trying to learn SQL Server. I need to write a trigger which deletes positions of the document depending on the movement type. Here's my code: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go CREATE TRIGGER [DeleteDocument] ON [dbo].[Documents] AFTER DELETE AS BEGIN ...more >>

Please Help with SQL Query Problem
Posted by Darin L. Miller at 7/6/2006 12:00:00 AM
I'm not too good with advanced SQL queries, so please bear with me on this. I have a query with multiple joins that I am trying to get just the last 10 of each unique record (RecordID) displayed. The problem is that some records have more than one photo assigned to the same RecordID and I ...more >>

sequence of columns and preformance
Posted by R.A.M. at 7/6/2006 12:00:00 AM
Hello, I am learning SQL Server and I would like to ask you a question. Could you tell me please if sequence of columns in a table has influence on performance? Thank you very much /RAM/...more >>

2005: forbidding INSERTs and DELETEs
Posted by R.A.M. at 7/6/2006 12:00:00 AM
Please help. I have a table with single row. I need to allow only UPDATEs of the table, forbid INSERTs and DELETEs. How to achieve it? Thank you for information /RAM/...more >>

Create trigger - do users need to be out?
Posted by rdraider at 7/5/2006 11:51:27 PM
I created and successfully tested a trigger on a test database. Now that I want to put this on a production system, the create trigger statement takes way too long to complete. I cancelled after a few minutes. The test trigger took just a second to create. The test and production databases...more >>

Bizarre Query
Posted by Xeth Waxman at 7/5/2006 3:30:42 PM
Good afternoon, I have a bizarre question. When running the following query: select SomeColumnName from TableA where PK_TableA in (select PK_TableA from TableB) I get results. This should not be feasible, because the query within the in clause: select PK_TableA from TableB is not ...more >>

Problem when changing Views
Posted by Jim Devenish at 7/5/2006 2:38:14 PM
I have 3 views, two of which depend on the other: CREATE VIEW dbo.CustomerListQueryAccounts AS SELECT dbo.CustomerListQuery.* FROM dbo.CustomerListQuery WHERE (isProspect = 0) CREATE VIEW dbo.CustomerListQueryProspects AS SELECT dbo.CustomerListQuery.* FROM ...more >>

SQL 2005: keeping track of database changes
Posted by metaperl at 7/5/2006 12:07:16 PM
I'm actually taking Microsoft's 2779 and just finished a lab where we kept track of our changes to the database. However, I'm not happy with the scripts interface because it does not tell me the chronological order of my changes to the database. Could someone share with me their technique fo...more >>

Empty recordsets and artificial records
Posted by wgblackmon NO[at]SPAM yahoo.com at 7/5/2006 9:41:41 AM
I'm currently running the following statement that is used in a Crystal Report. Basically, a record is returned when the T_PAYMENT.amount has a record in the database based on the value of the T_MULTILIST.code field. Currently, if there is no record returned, there is no listing in the report fo...more >>

Querying Windows Active Directory from Sql Server 2000
Posted by Lucky at 7/4/2006 7:47:04 AM
Hi guys, after long long time. i'm back again with another problem. this time i think the problem is very very interesting and i really need you help on this. i'm trying to connect to the Active Directory. for that i've added one linked server to connect to the active directory. and then quer...more >>

comma separated values to stored procedures
Posted by shark at 7/4/2006 7:20:17 AM
Hi All, i hv created a sp as Create proc P @iClientid varchar (100) as Begin select * from clients where CONVERT(VACHAR(100),iClientid) in( @iclientid) end where iclientid = int data type in the clients table. now if i pass @iclientid as @iclientid = '49,12,112' but this st...more >>

SQL server 2000 timeout
Posted by Brad at 7/3/2006 8:07:18 PM
I have been trying to do a query(view) in Enterprise Manger and Query Analyzer with a timeout result everytime. In EM in happens in about 30 seconds and in QA it happens in about 45 seconds. I am running the query directly on a W2003SBS server with SQL Server 2000 (V 8.00.2039 )running on the...more >>

How to move transaction logs on-line?
Posted by nai at 7/3/2006 8:32:43 AM
Hi all, I have a database with 20GB transaction log file. The recovery model of the database is Full. I need to move the T. log file to a new location with the minimal downtime. I know I can do this by dettaching the DB, copying the T. Log and attaching it at the new location. This will take...more >>

multiple rows and columns MAX
Posted by stassaf NO[at]SPAM gmail.com at 7/3/2006 6:20:33 AM
Hi All, I'm using the sample table: ID | CODE | V1 | V2 | V3 ---------------------------------------------------------------- 1 3 10 3 43 1 4 9 8 22 1 2 6 ...more >>

Getting Count(*) From Left side of Join using WHERE on right side of join
Posted by paulmac106 NO[at]SPAM gmail.com at 7/3/2006 5:17:43 AM
Hi, I have 2 tables: tblStatements and tblLines (one to many) Any tblStatements record can have many associated records in tblLines. The search criteria is against tblLines (ie tblLines.fldDateofService >= '6/1/06' and tblLinesfldDateofService < '7/1/06'.) I join by tblStatements.fldStatement...more >>


DevelopmentNow Blog