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) > november 2004 > threads for november 8 - 14, 2004

Filter by week: 1 2 3 4 5

Query Cache?
Posted by steve at 11/14/2004 5:17:57 PM
Does SQL Server have a query cache similar to mysql, whereas the query result is cached, if the table has not been changed? If so, please refer me to more info. Thanks. -- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance...more >>


stored procedures with parameters (in .adp)
Posted by zlatko at 11/14/2004 4:28:31 PM
I use a stored procedure that is calling several other stored procedure which update or append values in several tables. All of them are stored procedures with input parameters by which they filter rows to be updated or inserted into other tables. Filtration is based on certain actual values on ...more >>

Horizontal Partitioning question
Posted by MissLivvy at 11/14/2004 10:57:39 AM
I recently came across a database where the data are horizonally partitioned into 4 tables. I'm not sure if this was a poor design choice, or if it was done for valid performance reasons. The schema of the tables are essentially the same, it's just that they are named differenly and the columns a...more >>

Lost 'in' SQL - need help with IN function
Posted by evandelagrammaticas NO[at]SPAM hotmail.com at 11/14/2004 5:07:17 AM
Hi guys, I have a database table (documents) with a structure that looks like this: docID docName keyWords 1 testTitle01.doc dog,cat,bob 2 testTitle02.doc hello,world 3 testTitle03.doc please,help,me 4 testTitle04.doc is,that,a,dog 5 ...more >>

Problem:MS-Access.adp with MSDE link to csv file
Posted by JimJimJimJim at 11/13/2004 3:42:31 PM
Hi. I'm coming from a background of developing mdbs and am trying to migrate our databases to adps running atop MSDE 2000. However, I've encountered a problem while trying to do analogous things to what I've done before with mdbs...for example: -Linking to a csv file on another machine: I am ...more >>

Recover Lost data files?
Posted by achillesofsparta NO[at]SPAM rediffmail.com at 11/13/2004 6:05:26 AM
Hi When we issue a DBCC SHRINKFILE with empty option, the data file is removed and the space is alloted back to the OS. Same way when we issue a an ALTER DATABASE to remove a database, all the data files and transaction log files are dropped. But can these files be recovered again ...more >>

Newbie-- sp with multiple record insert: how to get all inserted identities
Posted by daddygiles NO[at]SPAM yahoo.com at 11/12/2004 9:08:35 PM
Sorry if this is dumb: I'm using SQL Server 2000 and have an sp that inserts several rows into a table with an identity column. I want to use the identity values from my newly inserted records to create entries in a related table. How could I do this? @@IDENTITY only gives me the last row. ...more >>

sp_changedbowner gives error 15110
Posted by sam777t NO[at]SPAM yahoo.com at 11/12/2004 5:59:26 PM
My platform is NT2000 and my database runs on a SqlServer 2000. I have a database where some of the user tables are owned by the user dbo. I would like to change the user from dbo to another account. When I execute the sp_changedbowner to change the table owner I get the following error message...more >>



reboot notification
Posted by Guju at 11/12/2004 2:43:24 PM
Hi all, I wanted SQL server to sent me an email when it reboots. I created an Alert but doesn't seem to be working. Any suggestions. Thanks, ...more >>

Insert a jpeg into a column sql server 2000 - desperately seeking help
Posted by rdshultz NO[at]SPAM nooter.com at 11/12/2004 8:25:45 AM
I'm a complete newbie. Need to insert a Company logo into a database column to use later on in a check printing application. Read how to insert the pointer instead of the object into the column. Below is what I did: SET QUOTED_IDENTIFIER OFF GO INSERT INTO BankInfo (CoLogo) VALUES(0xFFFF...more >>

Performance degrading placing join in WHERE instead of FROM block (using =, =*, *=)
Posted by tekanet NO[at]SPAM inwind.it at 11/12/2004 6:59:17 AM
Hello folks, first of all I really don't know how you gurus call this way of writing joins: SELECT A.FIELD, B.FIELD FROM TABLE_A A, TABLE_B B WHERE A.ID_FIELD = B.ID_FIELD I find this way very useful and readable. It works also with left and right Joins (using *= or =*...more >>

Help joining tables properly.
Posted by chudson007 NO[at]SPAM hotmail.com at 11/12/2004 4:31:00 AM
I have about 7 tables I need to join, but am having a lot of difficulty with the joins, that I need some help on. I'll provide the details of four tables to illustrate the scenario. I have one table called Product, which contains a complete list of products. I have another table called Date...more >>

Error message using "Copy Database Wizard"
Posted by ralph_noble NO[at]SPAM hotmail.com at 11/11/2004 7:41:10 AM
Any advice from the crowd? Every time I try to run "Copy Database Wizard" I get an error message saying I must be a member of the sysadmin group and have permission to copy files over the network. I'm a local admin on both boxes and a member of the sysadmin group on both SQL servers and an admin...more >>

SQL SERVER 2005
Posted by ahalyal NO[at]SPAM yahoo.com at 11/11/2004 2:07:33 AM
hi where i can get ms-sql 2005 beta version downloadable version . i'm not MSDN subscriber. Pls anyone can help. thanks...more >>

How to update if exists else Insert in one SQL statement
Posted by karenmiddleol NO[at]SPAM yahoo.com at 11/11/2004 12:42:37 AM
In MS Access I can do in one SQL statement a update if exists else a insert. Assuming my source staging table is called - SOURCE and my target table is called - DEST and both of them have the same structure as follows Keycolumns ========== Material Customer Year NonKeyColumns ======...more >>

SQLMail woes !
Posted by kittycatangel NO[at]SPAM hotmail.com at 11/10/2004 4:01:18 PM
Trying to get my jobs to send mail when job fails. Should be easy but it's giving me headache Had a whole slew of issues. Outlook is installed with a n outlook mail profile set up that can send mail in outlook. I can create a SendMail DTS and execute it to send mail Email works in these...more >>

Import XML file to database (MS Server 2000) using procedure (transact sql) ???
Posted by Szaki at 11/10/2004 12:58:19 PM
I must import some exemplary file to database (MS Srrver 2000) ofcourse using procedure Transact SQL. This file must: 1.Read the xml file 2. Create table 3. Import this date from xml file to my database Ps. I create procedure who File xml imports to base, but unfortunately she only schedule...more >>

SQL corruption
Posted by cgaete NO[at]SPAM magallanes.cl at 11/10/2004 12:22:16 PM
We've a database in MSSQL. For some reason, one transaction was interrupted at network level. That corrupted our database. If we try to attach it, we get the following error. Server: message 3624, level 20, state 1, line 1 Location: page.cpp:2412 Expression: m_slots [-m_slotCnt + 1 + i]....more >>

SQL : ORDER BY question
Posted by Joseph at 11/10/2004 9:04:29 AM
I made a search page for my website using mysql. I search the field "storyText" for a word, then display the result: SELECT * FROM story WHERE storyText LIKE '%$word%' ORDER BY storyDate desc The problem is in the ORDER BY. I would like the order to be related to the number of "word" found i...more >>

Please help speed up my query!
Posted by m3ckon at 11/10/2004 8:16:17 AM
Hi there, had to rush some sql and am now going back to it due to a slow db performance. I have a db for sales leads and have created 3 views based on the data I need to produce. However one o the views, which has subqueries to the other views is VERY slow and it needs to be speeded up, ...more >>

Extract parameters from SQL statement
Posted by philippe_graca NO[at]SPAM hotmail.com at 11/10/2004 8:12:36 AM
Hei, I'm currently trying to write a program in C# that will allow users to parametrize their queries. For instance, I have a query like this: SELECT * FROM Customers Where Region = @Region AND Gender > @Gender How can I extract the Parameters names without using String manipulation (which...more >>

Expose SQL Meta Data via ASP
Posted by mbrocklehurst NO[at]SPAM hotmail.com at 11/10/2004 6:46:50 AM
Hi, Apologies if this is better posted in an ASP group, but here goes anyway ... Is it possible to work out what parameters a stored procedure expects, using ASP? I would like to take the name of a stored procedure, work out what input parameters it has and build a form based on them in ...more >>

How to email completion messages from RESTORE commands?
Posted by bourgon NO[at]SPAM gmail.com at 11/10/2004 6:45:36 AM
I need to build an automated email that gives the completion messages when a database is restored (i.e. "Executed as user: sa. Executing RESTORE DATABASE DB1 FROM DISK='h:\backups\DB1\DB1_db_200411082056.BAK', RECOVERY [SQLSTATE 01000] (Message 0) Processed 3816 pages for database 'DB1', file '...more >>

import of multiple CSV files in one MS SQL table
Posted by autplc NO[at]SPAM hotmail.com at 11/10/2004 5:52:57 AM
Hi all, I have de following application to do : I receive several .csv files from another application in a determined folder of my PC. Those files are named with the format log1.csv logs2.csv logs... The number of file is variable but the internal format is always : time_sec;level So th...more >>

permissions on a column
Posted by stebo NO[at]SPAM privat.utfors.se at 11/10/2004 5:32:16 AM
hi, i run a sqlserver 2000 and im having problems setting a permission a column in a table.. under a database i have a User that has dataread rights on each table in the database, but in one table i want to prevent the user from seeing a column in one perticular table. i have created the...more >>

Can't install 2000 developer
Posted by gdixon NO[at]SPAM london.edu at 11/10/2004 1:18:09 AM
I'm trying to install a default instance of Developer edition on a laptop. I'm getting the following promblems shown in sqltp log. The laptop has previously had the SQL Developer installed but has since had OS installed. I've tested named pipes to another server (net view, net use) and it see...more >>

Is there any guideline to reach the 5NF or above in database designing?
Posted by SuryaPrakash Patel via SQLMonster.com at 11/10/2004 1:16:15 AM
Dear All, How to reach to the highest level of normalization for database designing? Guide Lines Needed. What will be the characteristics of a database of a completely normalized databae? Check List needed. Thanks SuryaPrakash Patel ***************************************** ...more >>

Seems Unavoidable multiple cascade paths. How to avoid?
Posted by SuryaPrakash Patel via SQLMonster.com at 11/9/2004 11:11:11 PM
Hello, There are three tables: OS-GroupOFCompanies (Table1) GoC_GroupOFCompaniesID (PK) OS-Organization (Table 2) Org_OrganizationID (PK) OS-UnitAddress (Table 3) Unit_UnitAddress (PK) Scenario: (1)GoC_GroupOfCompanies has -one to man...more >>

Parent-Child-Dimension in SQL Srv 2005 Analysis Services
Posted by Joerg Narr at 11/9/2004 6:51:02 PM
Hi experts, having a parent-child-table with the columns child_id, child_name, parent_id in SQL Server 2005 I just cannot create a parent-child dimension in BI Dev Studio. Can anyone give me some hints? The Dim Build wizard doesn't create the hierarchies, manually setting "parent" property ...more >>

Precomputed tables
Posted by SuryaPrakash Patel via SQLMonster.com at 11/9/2004 5:42:17 PM
Dear Friends, Suppose a database (SQL SEVER 2003) is consists of 500 Tables & 1000 Views. As I understand from the theory, that Views are nothing but the queries stored in the databse. Whenever a view is referenced than it starts fetching data from tha database. Thus , it will force the proces...more >>

Conditional SELECT
Posted by theintrepidfox NO[at]SPAM hotmail.com at 11/9/2004 5:36:54 PM
Dear Group I'm having trouble with the statement below. I tried CASE and IF without success. What I'm trying to do: There is a field in the database called Business_TelNo. If the field has some value, I would like to return a generated field (LaBusinessTelNo), which is the label of Busines_Te...more >>

Synchronizing stored procedures
Posted by cramden15 NO[at]SPAM hotmail.com at 11/9/2004 4:16:56 PM
I'm writing a VB6 app which calls several stored procedures on my SQL Server DB. The first stored procedure must complete its inserts before the second stored procedure can query the modified table for its results. My problem is that the second stored procedure occasionally returns a differen...more >>

Insert failed & set option error
Posted by Bercin Ates via SQLMonster.com at 11/9/2004 3:15:20 PM
I?m getting an error when I execute a stored procedure which is try to insert a row to a table. The error is: Server: Msg 1934, Level 16, State 1, Procedure SRV_SP_IS_EMRI_SATIRI_EKLE, Line 32 INSERT failed because the following SET options have incorrect settings: 'ANSI_NULLS.'. In my sp,...more >>

SQL Syntax for distinct select
Posted by blue at 11/9/2004 1:34:52 PM
I'm trying to order a varchar column first numerically, and second alphanumerically using the following SQL: SELECT distinct doc_number FROM doc_line WHERE product_id = 'WD' AND doc_type = 'O' ORDER BY CASE WHEN IsNumeric(doc_number) = 1 THEN CONVERT(FLOAT, doc_number) ELSE 999999999 END,...more >>

Cannot shrink the transaction log
Posted by abashir_ii NO[at]SPAM hotmail.com at 11/9/2004 1:15:33 PM
Hi Friends, I have tried almost everything but I cant seem to shrink the transaction log. Executing DBCC SQLPERF(LOGSPACE) gives me this info: Database Log Size (MB) Log Space Used (%) Status MY_eems 368.49219 16.034182 0 I made a complete backup of the database an...more >>

Junction table design options
Posted by mksql NO[at]SPAM yahoo.com at 11/9/2004 11:43:08 AM
As an example, I am building an authentication mechanisim that will use data in the 3 left tables to determine rights to objects in a destination table, diagrammed below. In this structure, multiple records in the left tables will point to multiple records in the right table. Normally, I would a...more >>

Ordinal position
Posted by jim_geissman NO[at]SPAM countrywide.com at 11/9/2004 11:41:58 AM
Is there a neat way to find an ordinal value from a table, for example the median or 95th percentile value in a column, without walking through the table in ascending or descending order? Thanks, Jim Geissman Countrywide Home Loans...more >>

dts : call 2 procs within one 'execute sql task'
Posted by rshivaraman NO[at]SPAM ibs.com at 11/9/2004 11:41:53 AM
Hi : Can i call 2 procs within one task? I have sp_proc1 ? (and have declared one global variable as input parameter) now i have another sp_proc2 which uses same input parameter but if i write two statements like this within one task, i get an error exec sp_proc1 ? exec sp_proc2 ? I...more >>

How to update the production database?
Posted by fedor at 11/9/2004 8:57:44 AM
We are installing an application with MSSQL database at our users place. Now we have two instances of the same database: - developing database, on which we are working at - production database, which is at our user's place. That 2 databases would have to be syncronised. Users will of cour...more >>

Stored Proc To Copy Unnormalized to Normalized Table
Posted by hfamili NO[at]SPAM yahoo.com at 11/9/2004 8:57:44 AM
I have a "source" table that is being populated by a DTS bulk import of a text file. I need to scrub the source table after the import step by running appropriate stored proc(s) to copy the source data to 2 normalized tables. The problem is that table "Companies" needs to be populated first in...more >>

Removing out of hours time
Posted by jpmcginty NO[at]SPAM talk21.com at 11/9/2004 7:50:30 AM
Hello Chaps, Just a little sounding on removing out of hours from some datetime date that I have. Basically we have a helpdesk that logs calls when they are entered and when they are resolved. Now, if this happens during the day we just subtract one date from the other to give the time it too...more >>

Problem - Using Visual Studio to connect to remote SQL server
Posted by msskyejohnson NO[at]SPAM hotmail.com at 11/9/2004 7:01:53 AM
Hi, I am a newbie at all this, but here's what I want to do: We have a very large database sitting on a SQL server that is on a remote computer. I can access it through remote desktop and browse the Enterprise Manager and the DB. What I am trying to do is create a Visual Studio .Net program...more >>

Perfomance Enhancement through proper database designing
Posted by SuryaPrakash Patel via SQLMonster.com at 11/9/2004 4:32:02 AM
Dear Reader I am trying to design a database. How can I make best Judgement that Indexing (which I am trying to fix during Diagram Desingning process)is ok. I am able to identify the best candidate for the indexing. Below is the details I want to understand: Area ZIP City County Dis...more >>

Help With a query
Posted by chudson007 NO[at]SPAM hotmail.com at 11/9/2004 3:48:54 AM
If I have table1 and table2, which both have the same fields Product and Qty. Can you help me with this query.... table1 has two rows Row 1 Contains ProductA with a Qty of two Row 2 Contains ProductB with a Qty of four table2 has has two rows Row 1 Contains ProductB with a Qty of two Ro...more >>

converting a text field to number
Posted by chudson007 NO[at]SPAM hotmail.com at 11/9/2004 2:17:29 AM
I have a table with over a million rows and one of the fields contains amounts of money in text format. What is the most efficient way of converting this field to a number format that I can sum on? Regards, Ciarán...more >>

Help on multiple date range on sql statement
Posted by B at 11/8/2004 10:40:44 PM
Using SQLServer ver 7.0, two tables: TableA = contains all inventory data TableB = contains four fields: ID, source, date_from, date_to This is where multiple range of dates are populated. Sample 1: 1,'A','9/1/2004','9/30/2004' Sample 2: 2,'A','1/1/2003','3/31/2003' 3,'A','10/1/2004','10/3...more >>

ActiveX info
Posted by Pippen at 11/8/2004 9:31:35 PM
I'm getting a little confused about what is supported in MS-SQL ActiveX and what is Visual Basic and what is VBScript. Can someone please point me to a website, recommend a book or if I've missed it where in the MS-SQL help that deals with the ActiveX supported in SQL. I'm not looking to do we...more >>

Records newer than 90 minutes (smalldatetime)
Posted by Chris at 11/8/2004 9:24:33 PM
Hi, I have a table in SQLServer2000 where e.g. the actual time is insert for every record (smalldatetime). But how do I select every records newer than 90 minutes? /Chris...more >>

ntext Question
Posted by theintrepidfox NO[at]SPAM hotmail.com at 11/8/2004 8:09:53 PM
Dear Group I admit, this might be a very ignorant question. BOL says about the ntext data type: Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. I've stored a string consisting of around 45.000 characters in a ntext field - done by copying the st...more >>

CREATING TABLE USING SQL BASED ON SEQUENTIAL DATES
Posted by Michael Hardy at 11/8/2004 4:46:27 PM
I would like to reopen this discussion. I need to create this table using SQL that will return this dataset. BRAID RATEDEFID MIN(BRADATE) MAX(BRADATE RATECODE PRODNAME 614 14 12/1/2002 12/4/2004 Rack Beach Tower Terrace 618 14 12/8/2002 12/11/2004 Rack B...more >>

Connection Failed
Posted by Mike Pavel via SQLMonster.com at 11/8/2004 3:21:21 PM
I have added a domain global group to the local administrators group on server running sql 2000 with sp3a. The os on the server is w2k with sp4. The builtin\administrators group has sa rights. Yet members of the domain global group, after they logon to the server through a remote desktop session can...more >>

Non Database Owner call to sp_addrolemember or sp_droprolemember
Posted by oren NO[at]SPAM gdblegal.com at 11/8/2004 2:58:04 PM
Hi, Is there any way that calls to sp_addrolemember and sp_droprolemember can be enabled for non database owners and non sysadmin members? This would be very helpful for an application I'm in the middle of developing, in which users have the right to view some data and edit some data in a s...more >>

time based performance decay
Posted by boyopeg NO[at]SPAM gmail.com at 11/8/2004 12:25:03 PM
I am working on an application with a sql server backend. the sql performance always begins great, but decays quickly over time. if i restart the sql service the performance shoots back up. The degredation is gradual and slows to a crawl after about 8 days. During this time I monitor several...more >>

Date Calculations...
Posted by mene at 11/8/2004 10:45:27 AM
I have a field that contains date information, and sometimes time information as well. I would like to be able to take that date and do a calculation on it. Here are some examples of what is in the field: 01/12/2003 5:04:00 PM 24/11/2003 19/05/2003 6:30:00 AM How can I take that date, ...more >>

Full Backup
Posted by kaylisse NO[at]SPAM yahoo.com at 11/8/2004 10:44:12 AM
I start a full backup on a database at 5pm. The backup job takes 3 hours to complete. While the backup job is running, someone inserts records to the db. Will the backup include the new records? Or in other words, are the contents of a SQL Server backup a snapshot of the database at the start t...more >>

SQL calculations different than on calculator?
Posted by jennifer1970 NO[at]SPAM hotmail.com at 11/8/2004 10:39:32 AM
I'm running SQL query to caluclate projected food costs. The calculation is this: (ReportedFoodSales / PlanFoodSales) * FullPlanFoodSales Seems simple enough to me. Using the following numbers, SQL comes up with a different answer than what I do with a calulator. The data types are m...more >>

Connection Error
Posted by jim.ferris NO[at]SPAM motorola.com at 11/8/2004 9:25:00 AM
I have an asp page that opens up a crystal report...however; randomly I either get the report or I get this error: ADO Error Code: 0x80004005 Source: Microsoft OLE DB Provider for SQL Server Description: Connection failure SQL State: 08S01 and its happening alot... Where should I begin lo...more >>

Tricky Query Help
Posted by kittycatangel NO[at]SPAM hotmail.com at 11/8/2004 8:47:27 AM
I have 2 tables joined together by the IDs, People and the pets they own PEOPLE ID NAME 1 JohnSMith 2 JaneDoe PETS ID PET 1 Dog 2 Cat 2 Hamster 2 Hamster 2 Fish I have create another where the PETS are in one column separated by semi-colons and removing the dups NEW TABLE ID ...more >>

Splitting a field into two
Posted by chudson007 NO[at]SPAM hotmail.com at 11/8/2004 1:04:47 AM
I have a field that contains codes like fhj#asds kjjljlj#12 And so on. What I want to do is create two new fields (field1 and filed2) that split the original filed at '#' If a field does not contain '#' I would like its entire contents to be saved in field1. Also how do I ensure that I...more >>


DevelopmentNow Blog