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
August 2008
all groups > sql server programming > may 2006 > threads for thursday may 25

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

literature for starting SQL users/ book to use SQL server as a backend for a MS Access frontend?
Posted by Philip Leduc at 5/25/2006 10:50:19 PM
Does anyone have know a good book for SQL starters 2000/2005 , not too teoritical with handson examples and sample code. I am an experienced Access VBA programmer. Would like to know how make 1) SQL VB.net applications including setting up the database. Upgrade Access applications to SQL back-e...more >>


Create Table In Store Procedure and inserting data with the Kalen user.
Posted by Fernando Flamenco at 5/25/2006 8:15:28 PM
Hello. First: Sorry for my inglish. I'need create this "simple" SP I Work with (SQL 2000 + SP4) Use TempDB GO Create procedure DBO.ProcTest as drop table Tempdb..TabTest create table Tempdb..TabTest (a int) insert into Tempdb..TabTest values (1000) GO g...more >>

Problems Using a View of a View
Posted by magrimshaw11 NO[at]SPAM fastmail.fm at 5/25/2006 7:36:14 PM
Hay guys, Here's my delema. I have been placed in charge of a custom enterprise ASP application. We are using SQL server as the back end. Here are two views, one selecting from the other. Most of this code I'm sure will be meaningless to most of you but I dont want to leave out the problem...more >>

Line 1: Incorrect syntax near 're'.
Posted by Nachi at 5/25/2006 6:28:14 PM
Hi Guys, This is my Sql Query to insert values. All the fields are nvarchar except the postcode which is Int. I have a condition if the postcode field is numeric then insert values otherwise error message. Only one of the customer gets the message on his browser "Line 1: Incorrect syntax ...more >>

Linked Server VFP, error OLE DB
Posted by Michel LEVY at 5/25/2006 6:18:20 PM
Hi, SQLExpress on Windows XP SP2, authentification mode Windows I trie to link a Visual FoxPro database with OLEDB provider (yet installed) That query : EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer', @srvproduct=N'Visual FoxPro 9', @provider=N'VFPOLEDB', ...more >>

BCP in using bcp_sendrow fails, not enough columns bound
Posted by Robert B at 5/25/2006 5:43:33 PM
Hello, first posting: I am using bcp_sendrow to INSERT data from program variables into the database. I am sending less columns than the database contains, because new columns need to be added to the tables before the program is changed. However, despite the fact that the unspecified columns ...more >>

trouble connecting to a SS2K instance from SEM
Posted by John A Grandy at 5/25/2006 5:26:48 PM
For the first time, I am having trouble connecting to a SS2K instance from SEM. All of these servers are on the same domain. I am attempting "New SQL Server Registration" using "Windows account information ..." and receiving the error "SQL Server does not exist or access denied. Connectio...more >>

Help with user defined function
Posted by Blasting Cap at 5/25/2006 4:33:30 PM
I have the following function: create function dbo.AttributesList (@Customerno varchar(10), @sold_to_sales_grp varchar(3), @attr varchar(2)) returns varchar(15) as begin declare @sOut varchar(15) set @sOut = '' if @attr = '1' begin -- attribute table 1 selec...more >>



SQL inserts random CHAR(13) into stored procedures
Posted by JustinS at 5/25/2006 4:01:02 PM
This is a very difficult problem to describe and troubleshoot because the "special character" (Carriage Return, CHR 13, HEX 0D) I am having issues with is a control character and is not always visible in EM, QA or notepad. Hello, Sometimes after I ALTER a stored procedure, CHAR(13) (Carri...more >>

Debug SProcs
Posted by Andrew Robinson at 5/25/2006 3:55:17 PM
I have both SQL2005 and Express installed on my local development machine. I am able to step in / debug stored procedures in dbs on Express just fine. Stepping into a stored procedure from within Visual Studio 2005 under the full version of SQL on the local machine pops up the "run stored pro...more >>

how to get the parameters information of UDFs?
Posted by nick at 5/25/2006 3:15:02 PM
I can get the list of UDF from sysobjects. Any simple way to get the parameter informations? Tx...more >>

Get last inserted PK
Posted by David Chase at 5/25/2006 2:46:46 PM
I have a table that has a computed value in the primary key (int column). The computed expression is below: (convert(int,(rand() * power(2,30)))) Does anyone know how I can get the last inserted value on this table since I can't use @@IDENTITY. Thanks. David ...more >>

use column value subquery
Posted by Nano at 5/25/2006 2:39:10 PM
Hi, Is it possible to use a columnvalue in a subquery? Like this: SELECT id, tablename, columnname, description, (SELECT Count(columnname) FROM tablename) as recordcount FROM tableobjects Obviously where "columnname" and "tablename" in the subquery should be the values from columns in...more >>

Concatenated string as parm value
Posted by Rick Charnes at 5/25/2006 2:28:29 PM
In my main proc, I'm calling a secondary proc MYPROC that takes an argument. How can I use a concatenated string with variables for this argument? This generates an error: EXEC MYPROC 'Hello ' + @myname Thanks...more >>

Stored Proc Doesn't Run in Shell Script, but gives no errors
Posted by bchodo at 5/25/2006 2:09:01 PM
I have a shell script that calls an UPDATE stored proc. When I run the stored proc in QA it runs fine. When the shell script runs it, I get no error messages, but the UPDATE does NOT take place. I track the execution up to and through the point where the proc is called ( I even print the ...more >>

Unpivot in T-SQL 2005
Posted by Mitch at 5/25/2006 1:13:02 PM
I have a table that is structured like this... Product Item_Label 200603 200604 A123 Sales $ 2389 2468 A123 Units Sold 52 55 I need to create a new data table structured like this... Product Item _Label Year_Month Item_V...more >>

Can this be changed to a CASE construct?
Posted by Carl Imthurn at 5/25/2006 12:15:22 PM
-- First, some DDL: CREATE TABLE #TEMP ( Requirement varchar (20) NOT NULL, ExpirationDate datetime NULL ) ON [PRIMARY] INSERT INTO #TEMP (Requirement, ExpirationDate) VALUES ('REQ1', '2006-01-23') INSERT INTO #TEMP (Requirement, ExpirationDate) VALUES ('REQ2', '2006-05-29') INSER...more >>

Selecting a row by row number
Posted by Rudy at 5/25/2006 12:08:01 PM
Hello All! I have a table that is populated from a text file. First row and every 13th row after that contain the values I need. I couln't seperate this info before the import. I would like to try and select the top and the 13th row after that, to insert in another table. This table i...more >>

Please Help ... Can't Figure This One Out
Posted by James Walker at 5/25/2006 11:59:55 AM
Greetings, I need to write a SQL stored procedure to accomplish the following and I'm not having any luck. So that I don't confuse anyone too much, I'll leave out the code I'm trying and just explain what I'm trying to do. Start with Table: sequenceOrder orderNumber totalUnits 101 ...more >>

Need help with a query
Posted by Bob at 5/25/2006 11:35:28 AM
This is the table creation script from sql 2005. USE [MYNEWDB] GO /****** Object: Table [dbo].[licQuartsChauffeurs] Script Date: 05/25/2006 10:09:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[licQuartsChauffeurs]( [licQuartsChauffeursID] [int] IDEN...more >>

How to identify one sql server installation to another
Posted by Edward Low at 5/25/2006 11:27:30 AM
Hi All, How can we identify one sql server isntallation to another installation? For example, installed sql server into a station, later remove it, then installed again. How can we differential this 2 different installations? Best Regards, Edward ...more >>

[OT] User-Defined string Functions Transact-SQL
Posted by Igor2004 at 5/25/2006 11:00:02 AM
Ladies and Gentlemen, I am pleased to offer, free of charge, the following string functions Transact-SQL: AT(): Returns the beginning numeric position of the nth occurrence of a character expression within another character expression, counting from the leftmost character. RAT(): Retur...more >>

Line Feed in Text Box on rdl file
Posted by Adi at 5/25/2006 10:18:02 AM
I am triyng to add a line feed char to my DB string which is assigned to a text box, cant figure out how. Line One"\n"Line Two...more >>

using variable with quotes - do I need to use QuoteName?
Posted by Rich at 5/25/2006 10:13:01 AM
I need to select the following select * from tbl1 Where fldx In ('A', 'B', 'C') --this returns 10 rows in my example Declare @s varchar(30) Set @s = '''A'', ''B'', ''C''' Print @s This prints 'A', 'B', 'C' Declare @s varchar(30) Set @s = '''A'', ''B'', ''C''' Select * from tbl1 w...more >>

SQL Query HELP!!!
Posted by jaawaad NO[at]SPAM gmail.com at 5/25/2006 9:31:51 AM
I have a simple query which combines the two table and looks for similiar fields and return the result. select t1.fld1, (t1.fld2+ t2.fld2) from Table1 t1, Tablet2 t2 where t1.fld12.fld1 and t1.hour = 10 and t1.date = '5/25/2006' and t1.area =...more >>

Triggers?
Posted by Hennie at 5/25/2006 9:18:16 AM
I have a table tabRate with the follwoing columns RateID int (PK) MarketTypeID int (FK) Rate decimal ValidTo datetime If a row is inserted, updated or deleted with a specific MarketTypeID (22) I want to insert update or delete a row in the same table with a MarketTypeID of 30 with the sam...more >>

Quotation marks
Posted by MittyKom at 5/25/2006 8:53:02 AM
Hi Can someone tell me what i am doing wrong below: -- Create table Tb1 (CnID varchar(10),Type varchar(100)) insert into Tb1 values ('7','Joe'+"'"+'s') select * from Tb1 Drop table Tb1 -- I would like the 2nd column to appear as Joe's in the resultset. Thank you in advance...more >>

Dummy Keyword in SQL Server
Posted by DUMMY Keyword in SQL Server 2000 at 5/25/2006 8:34:01 AM
Hi SQL Server 2000 has an undocumented key word called DUMMY. Does anybody know how this could be used ? Thanks...more >>

error handing and IGNORE_DUP_KEY
Posted by Panos Stavroulis. at 5/25/2006 7:56:02 AM
Hi, I've got a table where I've intentionally have a IGNORE_DUP_KEY index to ignore duplicates rows so don't have to check for it programmatically with exists etc. This is the proven faster solution. The problem is that there is an warning being generated saying duplicate key ignored whi...more >>

Query to Return Duplicate Number of Records Based on Value in Fiel
Posted by tomt220 at 5/25/2006 7:41:02 AM
Hello, I would like to write a single query to return the multiple copies of the same record, based on information contained in the field of one of the records. So, for example "I have a record with a field named x with a value of 3." This query would return 3 identical records. If x...more >>

Limiting Rows in a Report
Posted by lucky at 5/25/2006 6:47:11 AM
I am having a table with 100 rows and i want to prepare a report in a way that each page in the report want to display 10 rows in a page of the report please say me the procedur for this . thanks, baba. ...more >>

Using Materialized Path to create a paths table
Posted by Matthew Brealey at 5/25/2006 6:41:55 AM
I wonder if anyone has any thoughts on using the materialized path as an intermediate step to create a kind of paths table to represent a tree hierarchy Here are some records EmployeeId ParentEmployeeId MaterializedPath 1 <null> 1. 2 ...more >>

call database Maintenance plan from Sql Server Agent->Job
Posted by Ganesh at 5/25/2006 3:25:02 AM
Hi There can i call database Maintenance plan from Sql Server Agent->Job what i'm trying to do I've to truncated records on log table, then shrink all databases the call maintenance plan to take all database backup -- Thanks Ganesh...more >>

Nullable column in composite natural key
Posted by decland NO[at]SPAM petml.com at 5/25/2006 2:19:11 AM
I think this one is best explained with an example. Consider tables of employees (stripped of all but employee number), payroll (retains earnings history, null end_date indicates the current period, basic constraints only e.g. tests for contiguous periods omitted) and the Birthday Cake Club (o...more >>

Working with both 2000 and 2005
Posted by Craig HB at 5/25/2006 1:05:02 AM
I have 2 servers: one with SQL Server 2000 and another with SQL Server 2005. (1) Databases on SQL Server 2000 need access to data on the 2005 server (2) A database on the SQL Server 2000 to insert data into a database on the SQL Server 2005. This will be pushed from SQL Server 2000 -- not the...more >>

Copy database from an Sql server to another
Posted by pedestrian via SQLMonster.com at 5/25/2006 12:14:26 AM
How to copy a database from one server to another? Regards Pedestrian -- Message posted via http://www.sqlmonster.com...more >>


DevelopmentNow Blog