|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
Stored Procedure Variables
Anthony Robinson -
29 Oct 2005 8:27 PM - 2 messages
I'm getting an error when trying to compile a stored procedure. Here's the code: CREATE PROCEDURE GetMyFriends @UserdID INT AS --DECLARE @FRIENDID INT CREATE TABLE #FRIENDS (USERID INT, FRIENDID INT, INVITATIONTYPE BIT, CREATEDDATE DATETIME) CREATE TABLE #FRIENDS_2 (USERID INT, ...
Most efficient way to poll a table?
E -
29 Oct 2005 7:54 PM - 5 messages
Hello technet community: Using SQL SERVER 2000 with VB 6 SP6, and ADO 2.6 Have to monitor a table containing status values. As of now, a timer event is launched on the client that runs a server-side query (connected recordset) using read-only, forward-only recordset ...
Another Newb SQL Question
A_StClaire_ -
29 Oct 2005 6:47 PM - 13 messages
me again. been staring at this and can't see what's wrong. SELECT tblCustomers.companyName, tblOrders.orderID, tblOrders.freightCharge, tblOrderDetails.unitPriceOnOrderDate FROM tblCustomers JOIN tblOrders ON tblCustomers.customerID = tblOrders.orderID JOIN tblOrderDetails ON tblOrders.orderID = tblOrderDetails.orderID WHERE EXISTS ...
Creating Tables on the Fly
Neil -
29 Oct 2005 6:21 PM - 32 messages
I have an Access 2000 MDB with ODBC linked tables to a SQL Server 7 back end. I currently have a selections table in the front end file which the users use to make selections of records. The table has two fields -- primary ...
Syntax Problem
Wayne Wengert -
29 Oct 2005 1:42 PM - 7 messages
I am getting the error: "Invalid column prefix 's.': No table name specified" when I try to run the query shown below. The three table names are all valid. Why doesn't it recognize the alias? ==================================== SELECT i.LastName, i.FirstName, a.Under18, a.DietRestrictions, s..Accept, ...
Ignore errors?
Jan Eliasen -
29 Oct 2005 11:55 AM - 13 messages
Hi I have a stored procedure, which basically copies data from table in one database into a table in another database. Both databases are on the same serverinstance. Now, sometimes the data I am copying violates constraints on the receiving table. My stored procedure therefore checks for errors, ie: ...
DTS is rubbish
Damien -
29 Oct 2005 8:04 AM - 6 messages
I'm gonna say something slightly controversial just to get a bit of debate going, but I think DTS is just a drag and drop wizard for programmers who don't know what they're doing. As with any wizard, it can take you so far, ...
Pivoting a one-many relationship into 1 row
DS -
29 Oct 2005 7:57 AM - 2 messages
Hey everyone, this message comes in two forms, the short version and the long detailed version-- that way hopefully I can get all the help possible as fast as possible :) Short version: I have a table Names(names_id, name1, name2) that I normalized into 2 ...
unique constraint to a column from another table
uw_badgers -
29 Oct 2005 12:18 AM - 4 messages
Is it possible to create a unique constraint to a column from another table? For example: tb_current: current_names -------------- aaa bbb tb_new: new_name -------- ccc Now I want to create a constraint on tb_new.new_name to be unique with respect to tb_current.current_names. However, tb_new.new_name should ...
Retrieving Login Name?
Joe Delphi -
28 Oct 2005 11:51 PM - 2 messages
Hi, I need to know how to retrieve the login name of the user into a local variable so that I can insert it into a table. I want to do something like this: DECLARE @USERNAME varchar(50) DECLARE @OTHERFIELD varchar(50) ...
user Associated with a pid
nsajus -
28 Oct 2005 9:44 PM - 4 messages
Hi, I need some information regarding obtaining the user associated with a pid/process in the Sql Sever. I am trying to create a trigger on Delete on one of the tables in a database.. Is it possible to get the user ...
week number within the month
christy -
28 Oct 2005 9:07 PM - 6 messages
I have a date column that contains date. How do I get week numbers within each month. I need the week to start on Monday to Sunday? ...
error handling and logging within a trigger - how much of this would work / would be required?
Gerard -
28 Oct 2005 8:44 PM - 3 messages
Hi, a little bit of background info; the T-SQL I'm writing is against a proprietary database schema, I have triggers which are being called upon through events in a client application over which I have no control and the schema can change because of patches/new functionality ...
HOWTO Build single query to query a remote SQL Server
ATS -
28 Oct 2005 8:17 PM - 4 messages
HOWTO Build single query to query a remote SQL Server\ Please help, I need to build a single query that in turn queries a remote SQL Server, and return the data I need. Here is what I have so far: ...
Got err: There is already an object named '#TEMP' in the database.
Alpha -
28 Oct 2005 8:03 PM - 7 messages
I have the drop table #temp at the end of my stored prodedure but I think it got executed half way and left the #temp there. I try executing the drop table #temp but it says there is not #temp table. But if I run the alter ...
Backup Failure
A. Robinson -
28 Oct 2005 7:44 PM - 4 messages
I've encountered an error while performing a database backup. I can't seem to find this error anywhere: BACKUP failed to complete the command master.dbo.sp_sqlexec;1 Does anyone have any insight into this error? Thank You! ...
Searched Column w/Case for column name: Invalid column name 'TACD'
JDP@Work -
28 Oct 2005 7:12 PM - 4 messages
Case looking for a null in a column fails.... Although I look only for that column when it's named such it fails. I have two @field values that map to the TAC column. (column names TACC & TACD mapped to TAC) ...
LOCK & SELECT Behavior
Don Miller -
28 Oct 2005 7:03 PM - 4 messages
I do a transactional INSERT on a table (using VB COM+ as middle tier calling SPs) and then immediately do a SELECT on that same table (using VB COM+ to call the SP and return data for display) to display info from the table. On ...
How to upload Image into Table
Kris -
28 Oct 2005 6:55 PM - 3 messages
Hi, I have to upload Image(.jpg) file into SQL table. My Images are stored on shared drive. like \\xyz\sample.jpg. how can i upload this impages from shared drive into table ? Thanks -Kris ...
DTS problem
KD -
28 Oct 2005 6:27 PM - 6 messages
Hi, I am trying to export data into EXCEL sheet using DTS, It is working fine for single user, however it fails with error messages when tried by multiple users at the same time....So is it limitation of DTS as it does not run ...
Need help with the sequel statement please.
Lam Nguyen -
28 Oct 2005 6:09 PM - 4 messages
I have the table below and need to count number of LeadHeaderId receive with Each hour. Any help would greatly appreciate. The business rules and results desire are show below. Thank you. if exists (select * from dbo.sysobjects where id = ...
HAVING vs. WHERE
A_StClaire_ -
28 Oct 2005 5:23 PM - 11 messages
hi, can anyone tell me why the top one returns results and the bottom one doesn't? thx a bunch SELECT productName, unitPrice FROM tblProducts GROUP BY productName, unitPrice HAVING unitPrice > AVG(unitPrice) SELECT productName, unitPrice FROM tblProducts WHERE unitPrice > (SELECT AVG(unitPrice) FROM tblProducts) ...
Sort Help
Chris -
28 Oct 2005 5:20 PM - 9 messages
I have a varchar(5) column called SeatNo which I would like to sort numerically followed by alphabetically. Is this possible? E.g. At the moment "SELECT * FROM TableName ORDER BY Seat" sorts by... Seat === 1 ...
displaying found duplicate - both records
Jay via SQLMonster.com -
28 Oct 2005 5:07 PM - 3 messages
I would like to look at both records returned as duplicates. I am using the following script to find the duplicates but can it only returns one record not both. I would like to see the entire record so that I can make a ...
Cannot get to work a sentence with NULL results
techuser -
28 Oct 2005 4:37 PM - 4 messages
Hi, I’ve the following SELECT with a WHERE clause which throws a result with no NULLs for B.idPersonal. How do I get all A.idPersonal=B.idPersonal though B.idPersonal=Null? SELECT C.Descripcion as TipoCF, B.Nombre, B.Apellido, E.Descripcion as ...
Scripting data values
Abbey -
28 Oct 2005 4:13 PM - 3 messages
Hello, I need to include scripts in my setup program that will create a database, table etc and populate it with some necessary system data and sample for the user. The first part is simple enough, but does anyone know of a way of including ...
How to detect INSTALLED SQL version?
Abbey -
28 Oct 2005 4:07 PM - 6 messages
Hello, I need to detect whether the computer has SQL Server 2000 SP3 installed before attempting to connect to it, for example during my custom setup program. What is the recommended way of doing this? TIA, A. ...
Re: How to detect SQL server edition
Abbey -
28 Oct 2005 4:01 PM - 2 messages
Hello, I have a question *almost* identical to this. The difference is that I need to detect whether the computer has SQL Server 2000 SP3 installed before attempting to connect to it, for example during my custom setup program. What ...
[Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID X) was deadlocked
kludge -
28 Oct 2005 3:57 PM - 4 messages
My company recently upgraded from SQL 7 to SQL 2000. We also updated our application servers from Windows NT to Windows 2003. Now when we get the error [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID X) was deadlocked, the part that comes ...
re: Script out "Trigger rules"
Matt Barbour -
28 Oct 2005 3:50 PM - 2 messages
If I understand your question... In the Enterprise manager, goto the formatting tab and uncheck Generate Create and Drop for the Objects. Then on the Options tab check Triggers. That should gen just the Trigger scripts. Matt Barbour Technology Specialist – Communications Sector. ...
Help with Case Statement
Patrice -
28 Oct 2005 3:35 PM - 3 messages
Since I'm fairly new to SQL - I need help making the following into a case statement: -- Set Reporting date if the policy is a changed policy UPDATE STAGE_PHX_FACT_POLICY SET REPORTING_DATE = CHG_EFF_DATE FROM STAGE_PHX_FACT_POLICY WHERE CHG_EFF_DATE IS NOT NULL ...
Script out "Trigger rules"
Agnes -
28 Oct 2005 3:32 PM - 3 messages
When I choose the tables, generatel SQL script. it insist me to generate the "create table" script also. Any Simple method which i can script trigger rule (for all tables) only ? Thx ...
BCP Help - Incorrect host-column number found in BCP format-file
Joey Martin -
28 Oct 2005 3:02 PM - 2 messages
I've used BCP before, so I understand how to use it for the most part. But, I'm trying to do something different. I created a fmt file from my table. But, what I want is to only import ...
restructure on query
Peter Newman -
28 Oct 2005 3:02 PM - 3 messages
Im having trouble witht he following query SELECT a.BHYear_OrigSortCode, RIGHT('00000000' + a.BHYear_OrigAccount,8) as 'value' , Case c.BTYear_TransCode WHEN '99' then '17' WHEN '01' Then '99' WHEN '04' THEN '99' ...
help with Check contraints
Ben -
28 Oct 2005 2:58 PM - 11 messages
I need to add a check contraint to a table in SQL Server 2000 that would do the following if the value of [type] = 1 then [year] cannot be null is this possible to do? because for the other values of [type] i want the ...
Cannot register a server
Raymond D'Anjou -
28 Oct 2005 2:16 PM - 4 messages
Hi, I had registered an SQL server (same network) in the past through EM and everything worked fine until yesterday. If I try to register that server today, I get an error message: SQL server does not exist or access denied ConnectionOpen(Connect()) ...
Help tranlating values and Nulls
Art -
28 Oct 2005 2:13 PM - 5 messages
Hi, I'm appending selections from 2 tables together and putting the results in a 3rd table. Some of the columns in the tables can be NULL or ' '. I would like to convert anything that is not 0-9,a-z,A-Z in all positions into ...
Urgent -- Access QRY to SQL Server QRY
Joe -
28 Oct 2005 2:12 PM - 3 messages
I have to following Access2003 Code that needs to run in SQL 2000 SELECT extend, Source, Count(PersonalID) AS RecordCount, Count(IIf([Literature1Quantity]>0,([Literature1Quantity]),Null)) AS Item01, Count(IIf([Literature2Quantity]>0,([Literature2Quantity]),Null)) AS Item02, Count(IIf([Literature3Quantity]>0,([Literature3Quantity]),Null)) AS ...
why this date conversion?
helmut woess -
28 Oct 2005 2:09 PM - 13 messages
Hello, SQL 2000 - please try this in the QueryAnalizer: declare @d smalldatetime, @s varchar(200) set @d = '20051201 11:59:00' set @s = @d select @d, @s set @d = '20051201 12:00:00' set @s = @d ...
Login not allowed to do bulkinsert?
Jan Doggen -
28 Oct 2005 12:59 PM - 3 messages
Hello, This statement fails in my app: BULK INSERT [CASOPSA_TB042_INSTELLING_WERKGEVER] FROM 'D:\Temp\Xtb042_instelling_werkgever.TXT' WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', TABLOCK, FIELDTERMINATOR = '\t', ...
thousand seperator problem
prefect -
28 Oct 2005 12:49 PM - 2 messages
This works: DECLARE @STR VARCHAR(31) SET @STR = '1052.40' SELECT CAST(@STR AS NUMERIC(28,2)) But when i use a thousand seperator, it does not DECLARE @STR VARCHAR(31) SET @STR = '1,052.40' SELECT CAST(@STR AS NUMERIC(28,2)) ...
Passing results from select into exec
Cathryn Johns -
28 Oct 2005 12:33 PM - 11 messages
Hi I'm trying to call a stored proc from within another of my stored procs, passing the results of a select statement as the parameters - but it's not working. Here's what I'm trying to do: ...
stored procedure hangs
Francois Kreutz -
28 Oct 2005 11:51 AM - 2 messages
Hello, We ran into a problem recently when trying to execute stored procedures similar to the following ones : (SQL server 7 SP4) --code start USE pubs Go CREATE PROCEDURE dbo.a_caller As CREATE TABLE #auth (line_sort integer identity(1,1)) ...
Time zones
Nick Stansbury -
28 Oct 2005 9:21 AM - 12 messages
Hi, I'm currently building a client/server calendar system with access as the primary front end and sql server 2000 at the back end. I also have a web-front end that hasn't been finished yet. I've come up against an ...
How to lock only the lines in the result set ?
SoftLion -
28 Oct 2005 9:00 AM - 6 messages
For a SELECT on a given table, how to lock only the lines in the result set, and not all the lines used in the query (I use SET ROWCOUNT to limit the number of results) ? I tryed ROWLOCK but it locks all the lines matching the query, even the one ...
How to do an update only if it will not be blocked by a lock ?
SoftLion -
28 Oct 2005 8:39 AM - 3 messages
Hi, I've got a stored proc called concurrently with different parameters. In this proc, I would like to update a row of a statistic table but ONLY if the update statement will not be blocked by a lock. Is there any way to achieve this in SQL2000 ? ...
Cursor for dynamic sql
prefect -
28 Oct 2005 8:00 AM - 4 messages
is it possible to declare cursor for dynamic sql ? thanks ...
how can i pass dataset to stored procedure
sdfsdf -
28 Oct 2005 7:23 AM - 5 messages
hi i have customized dataset. i want to insert into database. how can i insert on a single round trip. how can i pass dataset to stored procedure?? ...
ORDER BY in UNION
Man Utd -
28 Oct 2005 7:20 AM - 7 messages
I cannot make the result set ORDER BY LastName and FirstName: CREATE VIEW dbo.viewApp_Web_ContactDetails AS SELECT TOP 100 PERCENT dbo.tblApp_Contact.Salutation, dbo.tblApp_Contact.FirstName, ...
help with proc
raghu veer -
28 Oct 2005 5:16 AM - 4 messages
i wrote a procedure which calculates how many minutes a person is late to the office on a particular day what is the best method for converting it to calculate the minutes late for the whole month ...
Help with SQL query
Tim Harvey -
28 Oct 2005 4:19 AM - 2 messages
Please bare with me in trying to get my point across, I'm new to SQL and would appreciate the help so much. I have two table Table1 and Table2. There is a one to many relationship between Table1 and Table2. Table2 has a list of widgets, I need to create a ...
Disable Trigger rules
Agnes -
28 Oct 2005 3:27 AM - 10 messages
I had created several Trigger rules in current database and it will be active on 1st Nov,2005, Can I disable them now ? and then make them active on that target date ?? Thanks a lot ...
DataTypeEnum problem with datetime data type
Curt Morrison -
28 Oct 2005 2:50 AM - 4 messages
If anyone can help, I'd really appreciate it. I could swear this worked successfully before, but now I'm getting: Microsoft OLE DB Provider for SQL Server error '80040e14' Implicit conversion from data type datetime to bit is not allowed. Use ...
Timeout when IDataReader.Read()
Terry -
28 Oct 2005 2:26 AM - 4 messages
I encountered a “timeout†problem in my recent project, which has been torching me for some days, and hereby is the description of that problem. Environment: Windows 2003 Server + MS SQL Server 2000/MSDE (SP4 applied) There are around 1 million to 2 million records in a table named as ...
Concept for View
Ed -
28 Oct 2005 2:22 AM - 2 messages
Hi, Could someone please explain to me when the view is updatable and when it is not? I am under the impression that if the two tables are joined together in the view, then the view is not updatable... is it correct? ...
Computing Dates
BobD -
27 Oct 2005 11:03 PM - 6 messages
I'm soliciting any suggestions from the readers of the group on how best to tackle this task. I need to determine if trouble tickets opened get closed within 4 hours. Yes, I already know about datediff(hh, date1, date2, but it's not that simple. The thing I'm ...
update based on criteria
Dion -
27 Oct 2005 9:26 PM - 3 messages
jeez - I hate it when something basic gets me stumped, but I keep having trouble with my transition from an Access mind set to a SQL mindset. Anyway, I have a simple update query that works: update PhaedrusPatTable set Room=rtrim(uap.Room) ...
unique but allow nulls
Keith G Hicks -
27 Oct 2005 9:24 PM - 15 messages
What's the best way to do this? I have a field that I want to force unique for rows that the column is filled in but it's ok for the column to be null. Does this have to be done in a trigger or is there an easier way? ...
Query with changing table names
Steve Roberts -
27 Oct 2005 9:18 PM - 14 messages
We have a web tracking program that came with our firewall that writes it's data to a MSDE database. Unfortunately it writes each day's data to a different table. It names them connection_events_2005_10_20 then connection_events_2005_10_21 etc... I need ...
About FILEGROUP
ReTF -
27 Oct 2005 9:04 PM - 3 messages
Hi all, I would like know if I create many FILEGROUPs in SQL, this will help to increase performance of this SQL Server. Thanks ...
newbie select and update
CobraStrikes -
27 Oct 2005 8:54 PM - 2 messages
Hi All, Is it possible to update a column but return orignal value in one operation, any help will be appreciated. select c1 from table; update [table] set c1=? where c1=value from select ...
Reading Long Varchar
Guadala Harry -
27 Oct 2005 8:43 PM - 3 messages
Using QA I can only see a limited portion of long varchar columns (e.g., varchar (600)) when I SELECT. The returned value gets cut off after about 100 or so characters. How can I see all of the value? ...
Editing Data
Preacher Man -
27 Oct 2005 7:09 PM - 8 messages
I am new to SQL so please be patient. I have a database in SQL 2000. When I expand the Database, Tables window, I right click on a table and select return all rows. When I try to edit data in some of the fields it tells me, ...
dynamic SQL and adding records to a table
amber -
27 Oct 2005 6:59 PM - 4 messages
Hi there, I know nothing about dynamic SQL, but was helped to create a stored procedure that enabled me to use a table whose name was provided at run time. This stored procedure simply read records. Now I want to create new records in the same manner. ...
Update IDENTITY column. have way to do this?
ReTF -
27 Oct 2005 5:47 PM - 2 messages
Hi All, I have 2 tables, and these tables has one FK constraint, I would like know if have way to update the IDENTITY column of these tables, I did try this, but I receive one error. SELECT cartoes.numero ...
Preventing Extended Properties
tascienu -
27 Oct 2005 5:15 PM - 5 messages
Is there a way to tell SQL Server not to bother storing extended properties? I see no use for these, except bothering me when i am creating SQL scripts for recreation on another database.... Any way to do that? Tascien ...
How to Alter Column to Identity NOT FOR REPLICATION?
Perayu -
27 Oct 2005 4:54 PM - 4 messages
Hello, ALL: I have following DDL for my curretn Address table: CREATE TABLE [dbo].[Address] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [Street1] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Street2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [City] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , ...
Job Fails when scheduled
DBA -
27 Oct 2005 4:40 PM - 2 messages
Another user who has sa privledges created a job to run an update on a table. I modifed it for him. Then I shceduled it. I or he can run it manaully and it works fine, but when scheduled, it bombs everytime. HELP ...
update sql server table from dbase IV
steal -
27 Oct 2005 4:25 PM - 3 messages
Is it possible to update a field in a SQL table from a dBase IV data source? I'm working in an old VB6 app, currently it is very error prone and takes up to 20 minutes to process 20-30 records! I'd like to write a SQL stored ...
Can SQL Server do this?
Brent White -
27 Oct 2005 3:51 PM - 5 messages
I was curious. I am building a filter string on a webpage to pass to a stored procedure. The filter string would be some kind of IN clause. Is there a way to pass the IN clause to the stored procedure? ...
Data Types
TS -
27 Oct 2005 3:26 PM - 4 messages
I'm creating a windows .net form that has SQL as the back-end. One of the controls is a group box with three radio buttons options. What data type should this column have, so whatever option the user chooses will be saved on ...
Alter a column to allow null or not null values if meets criteria
imagabo -
27 Oct 2005 2:47 PM - 4 messages
I'm very new working with SQL server and I'm trying to create a check constraint that will allow the an specific field to be null only if the result on a second field is zero and not null if this result is greater ...
check link server availability in sp
rinfo -
27 Oct 2005 2:43 PM - 4 messages
I am changing a stored proc to use linked servers. We have 5 linked sql servers, each in different physical locations and from time to time the network connection at one of the locations may go down. It is critical that if I can't get to a linked server, that my sp ...
Triggle rule change name ?
Agnes -
27 Oct 2005 2:32 PM - 6 messages
Does anyone know how to change the triggle rule's name ?? Thanks ...
Simple Count Function help
Patrice -
27 Oct 2005 2:10 PM - 4 messages
Hi, I am trying to perform what should be a simple count function, I need to count how many times a record has an instance based on an "Identifier" with the unique combination of 'Policy Number", Policy Date Time" with the policy ...
Easy Date Problem
brentkelli -
27 Oct 2005 1:41 PM - 3 messages
I am somewhat new to SQL and was trying to subtract 11 days from today but I want it to go to 00:00:00 rather than 11 days whatever time it is I run it. Example: It is 8:39 AM right now and when I run ...
1st column sequential output
Bob -
27 Oct 2005 12:48 PM - 5 messages
I have a table as follows: EmpID Name 1027 Jason 1032 Amy 1059 Robert 1193 James 1202 Kelly I want to have an output with a 1st column that shows the ranking ...
Insert not returning Identity
Phill -
27 Oct 2005 12:33 PM - 6 messages
I have a SP that inserts a record and is supposed to return the id, which is an identity column. The record is inserted ok and the id is incremented, but the value is not returned. What could be the problem? Here is my SP: ...
SQL Query: Conditionally updating a column
CJM -
27 Oct 2005 12:25 PM - 4 messages
I have a query which 'Completes' any open orders where all order lines are complete, cancelled, closed etc The requirements have changed now and I need to modify this code so that it sets an order as 'Complete' if all orderlines are Complete/Cancelled/Failed ...
constraint?
Jason -
27 Oct 2005 12:17 PM - 8 messages
Hi, I was wondering how i could set up a constraint if i want to prevent duplicates. For example, in a table where i have 4 columns: -id (identity and primary) -contactid -type -period One can have values like: id | contactid | type | period ...
SELECT by DATE (doubt)
ReTF -
27 Oct 2005 10:59 AM - 3 messages
Hi all, I have one table with many rows, and one column of this table is a DATETIME (CONSTRAINT gdtdf DEFAULT GETDATE() ), I need select rows by day, I did try this: SELECT * FROM transacoes WHERE data = convert(nvarchar, getdate(), 112) ...
How to change collation settings of a database
Daniel Walzenbach -
27 Oct 2005 10:49 AM - 8 messages
Hi, what would be the best way to change the collation settings of a database? I need to change the collation from SQL_Latin1_General_CP1_CI_AS to Latin1_General_CI_AS. Thank you a lot in advance! Daniel ...
Running Store procedures
Roy Goldhammer -
27 Oct 2005 10:10 AM - 5 messages
Hello there I have some procedure that i would like to build store procedure for it If two users who which their name is dbo and run the same store procedure at the same time, and the store procedure using temp tables. will it cause ...
Need Help Regarding SQL Query
Atif Iqbal -
27 Oct 2005 10:07 AM - 2 messages
HI, I've a database with 250,000+ records records are being logged in realtime with 5 mins of interval. Now what i want is to query the database and on the basis of some calculations i want to display records of every hour total in a 24 ...
Cancel showing output
Roy Goldhammer -
27 Oct 2005 9:59 AM - 4 messages
Hello there I have an update trigger that must be run only if i update one record only. To do this i add this code: SELECT 1 FROM Inserted IF @@Rowcount=1 BEGIN .. the update single record code ...
how much index are reasonable on a table?
SOHAIL MALIK -
27 Oct 2005 9:55 AM - 5 messages
I have a table with about 25 colums. In my application, we have provided an interface through which , search can be made on different column, either alone or with combination of different columns. Now there are about 10 columns , upon which search can be made, either ...
how much index are reasonable on a table?
SOHAIL MALIK -
27 Oct 2005 9:54 AM - 4 messages
I have a table with about 25 colums. In my application, we have provided an interface through which , search can be made on different column, either alone or with combination of different columns. Now there are about 10 columns , upon which search can be made, either ...
One Triggle rule or 3 triggle rules ?
Agnes -
27 Oct 2005 9:42 AM - 3 messages
Now, I create 3 separate triggle rules to save the copies of the record . However, I saw a sample which use 1 triggle rule to do it. and I found it will count the record first. My question is , Which design is better ? 1 triggle rule is easier to handle ...
Email ID Validation in SQL Query
Dinesh -
27 Oct 2005 9:19 AM - 4 messages
Hi, Can someone help me with a query to validate if a value stored in the emailaddress field in a table is a valid email id or no. Please mail me ASAP. Thanks in advance. Regards Dinesh ...
Update for random sampling featutre
hals_left -
27 Oct 2005 9:18 AM - 5 messages
Hi I need to run a proc that updates a random selection of records. I have a column called Sampled which is type bit, default 0 against each record. When I run the proc I need to set a selected number of the values to 1, ...
Database Design problem
Agnes -
27 Oct 2005 8:30 AM - 4 messages
My Account database got around 50tables , For each Table, I need to make a history table with same structures. Now, I can use triggle to do it very well. My question it. Should I create another database named "ACCOUNT_HISTORY" , and create same table ??? ...
Stored Procedure concurreny
Philip L. Nielsen -
27 Oct 2005 7:50 AM - 7 messages
Hi, I was wondering how concurrency regarding Stored Procedures is working. Assume we have 2 clients(user#1 and user#2) connected to the same database. If these clients call the same stored procedure, will it always run "serializable"? I mean, could you get into the situation, where user#1 is halfway through ...
Problem with SELECT...WHERE IN procedure
Anders -
27 Oct 2005 7:25 AM - 4 messages
This works! SELECT au_lname, state FROM authors WHERE state IN ('CA', 'IN', 'MD') ---------- But when I do the same in a proc it doesn't! create procedure mytest @test varchar(1000) as SELECT au_lname, state ...
strange conversion
helmut woess -
27 Oct 2005 7:13 AM - 5 messages
Hi, i tried this in the QueryAnalizer: declare @f double precision, @s varchar(20) set @f = 1123.452123 select @s = cast(@f as varchar) select @f, @s and see as result: 1123.452123 1123.45 which means, i have lost some of my digits during convert to a string. But ...
ALTER COLUMN
Adam Knight -
27 Oct 2005 7:01 AM - 3 messages
Hi all, I am trying to alter a column with the following statement. Can anyone help me get the syntax correct.. ALTER TABLE asmt_v1_question_passed ALTER COLUMN pass_dt SET DEFAULT getdate() Cheers, Adam ...
Export a table data in a script file
Man Utd -
27 Oct 2005 6:43 AM - 2 messages
How can I export a table data as a script file as INSERT statement from Enterprise Manager or Query Analyser ? ...
Keeping track History Maintainance--Design Issue
thomson -
27 Oct 2005 4:53 AM - 2 messages
Hi all, i do have a new module named as Project Costing, in which i have to create a Heirarchy of Activities, Some thing of this sort ...
Create view using UNION
Man Utd -
27 Oct 2005 4:00 AM - 4 messages
I have 2 tables with exact structure: Employee: ID FirstName LastName Position ExEmployee: ID FirstName LastName Position And the reference table Position: ID Name I want to create a view something like: CREATE VIEW viewEMPLOEE_ALL as SELECT e.ID AS EmployeeID, e.FirstName AS FirstName, e.LastName AS LastName, ...
Server Side Include
mt -
27 Oct 2005 3:45 AM - 2 messages
Hi Friend, I am new to ASP with SQL 2000 connection. I need to use Server Side Include file for connect SQL 2000 using VBScript. According to my project, I will connect from my asp page to that include db ...
Convert
SOHO -
27 Oct 2005 3:39 AM - 6 messages
Hi All, Sample:- Declare @xx varchar(10) select @xx = '1x' select convert(int, @xx) && Error ½Ð°Ý¥i§_¤£¥Î¥X error , ¥HP System °±¤î. ...
|
|||||||||||||||||||||||