Archived Months
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
all groups > sql server mseq > april 2004

Could not allocate ancillary table for view resolution
Posted by Sassgirl at 4/30/2004 6:35:25 AM
I am receiving this error when running a query: Server: Msg 4414, Level 16, State 1, Line 1 Could not allocate ancillary table for view resolution. The maximum number of tables in a query (256) was exceeded. I have found the error in the knowledge base but only for SQL Server 2000, we a...more >>


Inserting a string with an Apostrophe
Posted by CB at 4/29/2004 1:16:04 PM
I would like to insert a value with an apostrophe into a character field. I keep on getting "commande text not set for command object". Is there a character that I can put before and after the string to show that the system should take the exact value and not look at the characters as an indicator ...more >>

Calculated field in a calculation.
Posted by Lind at 4/29/2004 9:40:24 AM
In Access if FieldA = FieldB + FieldC And FieldC = FieldD - FieldE, I can use the statement FieldA = FieldB + FieldC but in SQL Server, I need to use FieldA = Field B + (FildD-FieldE) This works fine with a simple query. However, the queries I would like to move to SQL Server Stored P...more >>

Stipping all alpha characters from a string
Posted by alyxk NO[at]SPAM labx.com at 4/27/2004 1:11:56 PM
I need to strip all characters that are not a number from a string variable in a sql procedure. There is not clear pattern to the character the user can input. Example input for the phone field 1. call me 2. 1 (555) 555-8888 3. please email 4. +049.890.9876 5. 0x0x0x 6. Work: (444) 123-45...more >>

Multiple Server query
Posted by Chris W at 4/27/2004 7:23:49 AM
I'm trying to write a query that will be used in a stored proc to grab data from a table on a different server. So I have SVR1 trying to get data from SVR2, so I'm trying to use this query: SELECT * FROM SVR2..TESTDB.TESTTBL but I get the following error: OLE DB provider 'SVR2' does not ...more >>

Table Corrupt
Posted by Mary at 4/26/2004 10:14:12 AM
Hi All, Could someone please tell me how to fix the following error? This error is appearing on several tables for 2 weeks now. I already ran a complete hardware diagnostics on the server and it is cleaned. Please help, I am getting desperate. Server: Msg 2535, Level 16, State 1, Line ...more >>

create db
Posted by shif at 4/23/2004 10:45:12 PM
Hi How can i create and attach a database with out using enterprise managaer in mssql7....more >>

determine if value in field is number
Posted by Matt Tapia at 4/23/2004 10:35:29 AM
I have a varchar field in a table that could contain values such as 123, 345, ABC, or CDF I want to do a select statement on the table to return records where this field could be number (123, 345) and exclude those that are not (ABC, CDF). Is there an IsNum function or something like that? ...more >>



isnumber
Posted by Mehran at 4/22/2004 5:43:34 AM
Hi! Think that you have this string "1-345-456", is it=20 possible to check what is number in this string and how=20 can i remove those who isn=B4t a number Thank you for helping me Kind Regards Mehran...more >>

Help with Query
Posted by Dave Lugo at 4/21/2004 12:35:42 PM
I need help in generating a query that will give me all my DB tables and associated columns. Thanks...more >>

Dates Result Set
Posted by tom sawyer at 4/21/2004 12:26:18 PM
Hi, All, I need a single result set that just returns today's date plus 6 more days. I want to do this without a cursor. Any ideas? Thanks! T...more >>

want to see duplicates INNER JOIN
Posted by AshleyT at 4/21/2004 6:06:03 AM
Below is my query where I want to see duplicate rows, but I don't SELECT dbo.tblItemOrder.Itemnumber, dbo.cp_IV00101.ITEMDESC, dbo.tblItemOrder.Quantit FROM dbo.tblItemOrder INNER JOI dbo.cp_IV00101 ON dbo.tblItemOrder.Itemnumber = dbo.cp_IV00101.ITEMNMB WHERE ...more >>

Data Fixing.
Posted by Phil at 4/21/2004 12:40:05 AM
Hi all, Just wondering if someone can help me whith some data I am trying to seperate out, the examples are shown as below Clarice Apartment - 2 bedroom Apartment The Beech - 4 bedroom Detached What I want to say is everything before the first (-) is one column, then what is after th...more >>

No of columns in a table
Posted by Retna at 4/19/2004 8:46:08 PM
Hi all Is there a limit on no of columns in a table. How it will affect the performance of a query. What is the optimum max no of columns a table can contain Pls give your expert advice ....more >>

Querry giving incorrect result
Posted by Simon at 4/19/2004 2:47:47 PM
Big problem here that is getting me frustrated i have TABLE A and TABEL B TABLE A TABLE B ID DATA ID (FK to TABLE A) DATA 100001 = 100001 | | 101000 101000 So basically Table B's ID is identical with Table A si...more >>

query to list field data types
Posted by David Hepburn III at 4/19/2004 10:04:25 AM
Can anyone tell me if there's a query command that will return information about a table's properties, such as field names, field data types, field lengths, index names, etc? For example, I'm looking for output that would show the following, if we queried the Customers table in the MS ...more >>

Sorting results by year and date
Posted by wantjoule NO[at]SPAM ncl.com at 4/17/2004 7:47:33 PM
I Have a simple query that i am running. but i need the results to only show each month only once, this one has stumpted me! :) I know why it is happening but i cant solve it SO should i be using a cast command or somthing else to get around this problem? Below is my query and the resul...more >>

Query Help
Posted by Spongebob at 4/16/2004 10:21:04 AM
Hi I have a varchar column called Names that contains a bunch of peoples names delimited by spaces ex. Names = 'BILL BOB STEVE GUS I want to extract the names uniquely so I get 4 seperate names from a select. Does anyone know how I could aqpproach this using TSQL ? ...more >>

Calculated fields in Views?
Posted by Russell Farr at 4/15/2004 7:53:41 AM
Hi I am running an SQL server with an MS Access front-end. One of my main forms is a list, which have a number of calculated fields within the query that sits behind it (in Access, not in SQL server). I would like to bring these calculations into a View in SQL server, to speed things ...more >>

Msg:15335
Posted by new at 4/15/2004 6:46:16 AM
Server: Msg 15335, Level 11, State 1, Procedure sp_rename, Line 342 Error: The @newname value 'BC_SLATFix' is already in use as a object name and would cause a duplicate that is not permitted. Thanks reply...more >>

string formating of sql result
Posted by San Tuon at 4/14/2004 5:27:15 PM
Hello. I am performing a data conversion and an running into the following problem. I have a numeric column in table but wish to return results as formated string via SQL. The results should be as follows. value 1.. want to return the string "01". value 9.. want to return the string "0...more >>

pad function
Posted by Matt Tapia at 4/14/2004 1:37:59 PM
I need an sql function for microsoft sql server 2000 that will allow me to pad a string at the beginning a certain number of charcters with 0. Any help? ...more >>

Need help formatting Float data type for leading zeros
Posted by Zachariah at 4/13/2004 6:01:06 AM
I have an existing query in Access 2000 that I'm converting to a SQL view. One of my returned columns current syntax is Format([tblFoo.NoteAmount]), "00000000.00") AS NoteAmoun If I give it a value of 10400.56 it will give me 00010400.56 as NoteAmount in the resulting data set If I give it a va...more >>

delete duplicate orders
Posted by ashleyT at 4/12/2004 7:06:04 AM
I have an order with multiple line items. When the order comes in and put into a table I would like to check that they haven't submitted it twice. Right now I have a stored procedure that can find duplicate lines, but I really need if the whole order has been duplicated then delete it So in my s...more >>

Delete higher price record, if there is one.
Posted by newbie k at 4/8/2004 1:41:07 PM
I have the below store procedure to delete out records that have a higher price, if there is a higher price record found in the view that I created. If not don't delete. Any ideas how to do this without using a cursor, it takes way too long. thanks DECLARE @MyCursor CURSOR DECLARE @ITEMNUMBE...more >>

=> Trigger to split Trailer Loads
Posted by Rhonda Fischer at 4/8/2004 8:41:03 AM
Hello I am trying to design a trigger that upon record INSERT checks the number of pallets ordere and ensures that no record has more than 26 pallets, as this is the maximum tha will fit onto a trailer. Some how dividing 26 into the number of pallets copying all lines with les than 26 pallets i...more >>

Query acting strangely
Posted by Sebastian at 4/8/2004 3:46:03 AM
I have some problems with this query. It returns some information but not all. SELECT PAGE0.DOL, PAGE3.STATUS1, PAGE0.STATU FROM PAGE0 INNER JOIN PAGE3. ON PAGE0.SERIAL = PAGE3.P_SERIA WHERE (PAGE3.STATUS1 <> 'TOA') AND (PAGE0.STATUS = 'OPEN' For whatever reason this query doesn't return all t...more >>

Best Way to Update Table?
Posted by chris at 4/7/2004 11:26:02 PM
Hello, I have a large table of data. 120million rows, 250 fields in each row. The important fields in the table for the update are phone (phone number) and phone_pander_flag (flag the is Y or N indicating if the person wants to be called or not). The data used to updated this large tab...more >>

Deleting Model, MSDBData, Master Databases
Posted by Carl at 4/7/2004 12:31:39 PM
Can I safely remove the model, msdbdata and/or the master databases from SQL2000 (they may actually have been from SQL7) without affecting the program operation and population? I am incredibly low on storage (that is whole other subject) and have already removed the northwind database. T...more >>

Getting values from other fields using min & max aggregates
Posted by Gabe Knuth at 4/7/2004 12:11:04 PM
Hi all. I tried to search the newsgroup for this, but I'm not entirely sure how to phrase it to get the best results, so I figured I'd post and hope someone can help me out. I've got a SQL statment that retrieves the minimum and maximum values from the Score field in a table called Scores (origina...more >>

Drop User Command
Posted by Brady Snow at 4/6/2004 8:51:13 AM
What is the stored procedure for drop a user? Drop_user userx... Thanks, Brady Snow McKinney, Texas...more >>

Number to Date.
Posted by Dylan at 4/5/2004 7:59:37 AM
Hi, The accounts package that we use uses MSSQL for its database. One of the tables is for recording sales transactions. The due date field in this table is stored as INT size 4 in the YYYYMMDD format; i.e 20040405 (today's date). I have been asked to create a script that will report...more >>

Missing SELECT statement, but where??
Posted by Christina at 4/1/2004 3:16:11 AM
H I have created a question in Access and then copied the SQL question from it When I try to run it in eg SQL plus I get an error. I can't see what's wrong SQL> SELECT MC_POSUM.ID, MC_POLINE.ID, MC_INVTRANS.TQTY_AMT, MC_PCITEM.ITID, MC_INVTRANS.PRSD_DTTM, MC_EMPLOYEE.AEN 2 FROM ((((((MC_P...more >>


DevelopmentNow Blog