|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
passing in a value to use as a column 'as name' in a stored proc
Aussie Rules -
10 Jun 2006 11:46 PM - 4 messages
Hi, I want to hand into a store procude the column name to use in the returned result set... create proc sample @colName as nvarcher(20) as select col1 as @colname, col2 from table1.. But this produces an error... saying incorrect syntax near @colname ...
Create Excel doc from SQL sp
Mark Paulson -
10 Jun 2006 9:47 PM - 5 messages
Hi All, Any suggestions for the following would be appreciated: I need to create an Excel doc from an SQL stored procedure where I pass parameters into the sp. I know how to pass and accept parameters into the sp ...
SQLDataset.WriteXml and filtering bad characters
JR -
10 Jun 2006 9:25 PM - 1 message
I wrote a VB .NET program that part of it is reading from a SQL Server 2000 database and outputting data to XML. Problem is when I go to transform the XML, from time to time, the data is bad as it contains ...
locking behaviour 2005?
Egbert Nierop (MVP for IIS) -
10 Jun 2006 1:32 PM - 6 messages
Hello, I know that SQL has changed a lot and that it should be backward compatible with 2000. (I'm certified with SQL 2000 fyi). I'm experiencing a locking problem. For some specific app, I really -needed- pessimistic row locking. ...
Separate business database from authentication DB ?
Philippe -
10 Jun 2006 11:53 AM - 3 messages
Hi Everybody, I'm developping a commerce Web Site using ASP.Net 2.0 and SQLServer. ASP.Net 2.0 relies on SQL Server to manage authentication, profiles... Should I use a second SQL Server Database to store my business informations ...
Alter Table Alter Column sometimes fails when changing to Not Null
Doug MacLean -
10 Jun 2006 8:04 AM - 6 messages
I have created and run scripts to alter numerous numeric fields in 19 tables: 1. To set any null values on those fields to zero 2. To then change the properties of those fields to Not Null All of the fields are either int(4) or float(8). ...
Propagating results of Alter Table to its views
Doug MacLean -
10 Jun 2006 7:47 AM - 8 messages
When I alter a table to add columns or change their properties, either in Enterprise Manager or with T-SQL statements in Query Analyzer, the alterations are not automatically noticed by the views that use the table. The only thing I have been able to figure out to do is to find each ...
reproducing deadlock
vicky -
10 Jun 2006 7:21 AM - 2 messages
I have done some research in how to avoid and view trace logs for deadlocks. now iwant to test this on my test db. Is there any steps by which deadlock can be reprduced in any test dbsay authors or pubs? ...
Connect to SQL Server 2005 Using Visual Studio C++ 2005 ?
Pete Moscatt -
10 Jun 2006 5:56 AM - 5 messages
Hi All, I hope I am in the correct group to ask such a question, anyway: I am new to Visual Studio C++ (2005) and SQL Server 2005 as I have recently moved across from using Borland C++, so VS has been pretty much ...
Timestamp Question
James Hancock -
10 Jun 2006 4:00 AM - 4 messages
I'm doing synchronization of two databases. I cannot use replication in this case because I need to control too much of the process and I need to be able to update tables. (if I'm wrong about these limitations requiring me to use ...
save results to multiple files
JR -
9 Jun 2006 9:58 PM - 4 messages
I have a table with hundreds of thousands of records. I don't want to get into why, however I need to take all this data and save it to file. Now I can do this fine with Query Analyzer saving to file, however ...
Is it possible to make a HTTP Post in TSQL? (SQL Server 2000)
Tom -
9 Jun 2006 9:05 PM - 3 messages
I am new to TSQL and cannot find anything in my reference book or on the internet about how this can be done. If so, can you let me know how. Many thanks Tom ...
Procedure/cursor question about returning results (started by Tony Murunion)
John the ScrubMaster -
9 Jun 2006 8:10 PM - 1 message
Thanks for the reply. I just started looking into the tables option. I'm fairly new to advanced script writing. I've done a lot of select and updates over the years but most of my data manipulation\retrieval has been ...
WHERE clause optimization
Sericinus hunter -
9 Jun 2006 8:09 PM - 4 messages
Consider the following WHERE clause: ...WHERE (Col = 1) OR (Col IN (SELECT OtherCol FROM OtherTable)) Would it be different performance-wise from the following: ...WHERE Col IN (SELECT 1 UNION SELECT OtherCol FROM OtherTable) Thank you. ...
Procedure/Cursor Question about returning results (Started by Tony Murnion)
John the ScrubMaster -
9 Jun 2006 8:00 PM - 1 message
Thanks for the reply. I just started looking into the tables option. I'm fairly new to advanced script writing. I've done a lot of select and updates over the years but most of my data manipulation\retrieval has been ...
Using break with nested cursors
vguddanti -
9 Jun 2006 7:46 PM - 2 messages
I wrote a stored proccedure with nested cursors. If one condition failed in the first child cursor, break that child fetch, and should go to the parent cursor and continue looping to next row. My problem is when a condition falis in CHILD 1, then the PARENT FETCH ...
replacing Apostrophe
Logger -
9 Jun 2006 7:07 PM - 2 messages
I’m trying to key the syntax for replacing the Apostrophe with double Apostrophe and update table. Example: Programmer’s with Programmer’’s Here code for finding occurrences: SELECT DEALNAME FROM DLWKTABLE20060609 where dealname like '%['']%' ...
Add auto number field to view
JR -
9 Jun 2006 4:54 PM - 9 messages
I have a simple view something like "SELECT * from <table_name> order by field1,field2,field3 I have a program that needs to read these values in by the order I have ordered them in the database however it needs an incremental numeric ...
backing up 2005 to something I can restore to 2000
PJ6 -
9 Jun 2006 4:31 PM - 2 messages
I have an exiting database which I'd rather not manually recreate that I'd like get a backup file from that I can restore to a 2000 database. Is this in principle possible? Paul ...
distributed transaction with loopback linked server
JohnC -
9 Jun 2006 4:25 PM - 2 messages
Folks, I am wondering if there is workaround for distributed transaction query in loopback linked server. Thanks ...
Startup stored procedures
imss -
9 Jun 2006 4:23 PM - 3 messages
Hi all i need to write script that check if there is any 'Startup stored procedures ' , how i write it? Thanks ...
Datetime problem
Levent Helvacioglu -
9 Jun 2006 4:11 PM - 6 messages
an existing application sends server an sql string like insert into dbo.test (c1, c2) values (1, '22.1.2006 10:10:10') where c1 is an int, and c2 is a datetime field. This command returns an error. Server: Msg 242, Level 16, State 3, Line 1 ...
Primary Information
S Chapman -
9 Jun 2006 4:05 PM - 3 messages
Given a column id/name and table name/id I need to find out if the column is a primary key. I have checked all the SYS* tables and could not find the information I was after. Can you point me in the right ...
how to convert varchar into datetime field
TG -
9 Jun 2006 3:44 PM - 5 messages
Hi! I have the following field: e.g this field is called admit 60124 varchar 255 (type length) I want to convert it to a date. e.g 20060124 How can I achieve this? I tried using ...
Return ADO recordset to worksheet
Terri -
9 Jun 2006 3:05 PM - 2 messages
Any help would be appreciated. I am trying to return a recordset to a worksheet using ADO. I want to go dsn-less. I confident that my recordset returns data, I've tested this in Access and can return records there. I am a new excel programmer. ...
Cursor doesn't loop properly???
Tim::.. -
9 Jun 2006 2:42 PM - 4 messages
Can someone please tell me why this doesn't work??? I am trying to loop through a table and populate a column called LocalIDNumber with random numbers... But there must not be any duplicates! This runs perfectly but only populates the first record and not the other ...
create function
john doe -
9 Jun 2006 2:09 PM - 7 messages
I'd like to return a NULL value from a mssql function, but i can't get it to. here's my sample: CREATE FUNCTION dbo.FixVarChar (@val nvarchar(30) ) RETURNS nvarchar(30) AS BEGIN declare @retval as varchar (30) ...
How to use getdate() and user_name() functions with Windows NT login
Randall Arnold -
9 Jun 2006 1:27 PM - 9 messages
I am connecting to my SQL Server 2000 database with a Windows NT security login. Several of my tables require a timestamp and user id for row added. I use getdate() for the former default and user_name() for the latter. This ...
SQL-92 varchar maxlength
Svenne -
9 Jun 2006 12:18 PM - 4 messages
Hi! I want to design a database that is compatible with SQL-92 standard. Does anybody know what the SQL-92 standard says about the maximal length of the varchar datatype? Thanx in advance /Svenne ...
No transaction is active
Morten Snedker -
9 Jun 2006 11:39 AM - 7 messages
I've google'd like a crazy, tried a lot of stuff, but still can't get it to work: When run on our old SQL 2000 it worked fine. Now, running SQL 2005 it doesn't: An UPDATE-trigger on a table calls a stored procedure that selects ...
use go on varriable
Ganesh -
9 Jun 2006 10:41 AM - 3 messages
Hi There, How can i use go on multiline statement, I would like to create job step which contains go in it. But i can not create. I try to use something like this EXEC sp_add_jobstep @job_name = N'Audit_Log Truncate', ...
Compatibility level, SQL 2005
Morten Snedker -
9 Jun 2006 10:32 AM - 9 messages
In SQL Server 2005 it is possible to set a compatibility level. Prior to this server we were running SQL 2000. Wil still have one linked server running SQL 2000. What I'm confused about: what does this comp. level actually do? When ...
EXEC(@SQL) And Unicode Result Bug
Tris -
9 Jun 2006 10:28 AM - 4 messages
I've got a dynamic SQL query that is generated inside a SP, and is run using the EXEC (@SQL) or EXEC sp_executesql @SQL This has worked fine until now, where we are now using a database for unicode charachters to support Japanese language. ...
Update statment problem
Agnes -
9 Jun 2006 10:13 AM - 2 messages
(1)select * from tmp_gltransaction where tmp_gltransaction.reportid = 'MGR-6530234110' (2)UPDATE tmp_gltransaction SET acctname = (select acctname from chartofaccount where chartofaccount.acctcode = tmp_gltransaction.acctcode and tmp_gltransaction.reportid = 'MGR-6530234110') For Statment(1), I found that only 108 records. ...
stop using dynamic sql
farshad -
9 Jun 2006 9:57 AM - 11 messages
Hi, The following stored procedure (SP) is using a dynamic sql to build the query. How can this be written using a standard sql. i.e. NOT dynamically being built. Initially I thought I can have something like the following query but it ...
UDT, what's the point?
Micke 2.0 -
9 Jun 2006 9:08 AM - 9 messages
Sorry about the crosspost; not sure in which it belongs. I tried making a simple UDT comprising of a few integers that are closely related, and the user designed type seemed perfect (using visual studio 2005). Easily made and easily installed, and from T-SQL it works as ...
SQL use of processes.
Simon -
9 Jun 2006 9:01 AM - 4 messages
Had a look on the site but haven`t really found an answer so hope someone can point me in the right direction. Should the calling application kill a SQL process once it has finished. If not what are the implications in terms of the memory available to the server. ...
how to write extended stored procedure to generate sequences.
Veeru -
9 Jun 2006 7:39 AM - 10 messages
Hi, I have one table called sequence_number with two columns Seq_name nvarchar(50) last_num bigint. I have one function, in that i am calling extended stored procedure. this XP has to return the next seq number based on the sequence name we have given. ...
Number of days in previous quarter?
Jan Doggen -
9 Jun 2006 6:57 AM - 6 messages
Hello I need to calculate the number of days in the previous quarter relative to 'today'. I thought it would be as simple as the number of days between today and one quarter earlier: datediff(dd,dateadd(qq,-1,getdate()),getdate()) ...
What is wrong with this code?
Adrian -
9 Jun 2006 6:37 AM - 5 messages
Coud someone please tell me what is wrong at the line marked xxxxxx ? Adrian. using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.SqlClient; namespace WindowsApplication2 { public class Form1 : System.Windows.Forms.Form ...
dll & Web Service in VB.Net 2005 Stored Procedure
James Wong -
9 Jun 2006 6:36 AM - 6 messages
Hi, I am writing a vb.net2005 program that needs to create a stored procedure with SqlServerProject Template. Now, I have two questions for this stored procedure. 1) How can I import and execute the .dll in this Stored Procedures? ...
permission to execution stored procedure
imss -
9 Jun 2006 6:19 AM - 2 messages
Hi, how can i know with t-sql command who has permission to execute stored procedure? ...
Sorting a parent-child list
Sonny Sablan -
9 Jun 2006 4:23 AM - 9 messages
tblCat ID CatName ParentID 1 Cat 1 NULL 2 Cat 2 NULL ...
Running MS SQL query from Excel VBA
excel_hari -
9 Jun 2006 3:01 AM - 3 messages
Hi, I posted in microsoft.public.sqlserver yesterday, but it seems that microsoft.public.sqlserver.programming would be more appropriate for my issue. (MS Sql 2005 and Office 2003) I have a MS SQL query file which generates 8 outputs. I want to be able ...
In ADO.NET how to tread a large NTEXT field in small chunks? e.g. my NTEXT field is many megabytes b
Daniel -
9 Jun 2006 1:52 AM - 2 messages
In ADO.NET how to tread a large NTEXT field in small chunks? e.g. my NTEXT field is many megabytes but i only wat 10k at a time? how to do this in ADO.net? ...
In ADO.NET how to tread a large NTEXT field in small chunks? e.g. my NTEXT field is many megabytes b
Daniel -
9 Jun 2006 1:50 AM - 1 message
In ADO.NET how to tread a large NTEXT field in small chunks? e.g. my NTEXT field is many megabytes but i only wat 10k at a time? how to do this in ADO.net? ...
Can deadlocks caused by creating functions in SQL Server?
hellmanv3 -
9 Jun 2006 1:50 AM - 1 message
Hi, I have a datawarehouse that summarises a POS solution' daily transactions. Frequently (1-2 in 7) when building this warehouse I receive the message. 'Deadlock occurred and you are the deadlock victim.' This seems to regardless of other database activity. ...
UDF's in SQL2005
Andrew -
8 Jun 2006 11:30 PM - 2 messages
Hi all, We have been performing some testing on an application that has been upgraded from SQL 2000 to SQL 2005 and have had dramatic improvements. A job that was previously taking 13 hours is now completing in 90 minutes. This ...
DTS task logic
GB -
8 Jun 2006 11:10 PM - 2 messages
Hello, My DTS package is a sequence of tasks. Can I add a logic to the task sequence? For example: If ... then do these tasks, else do that task? Thanks, GB ...
Need help understanding fn_get_sql and the stmt_start and stmt_end columns
pshroads -
8 Jun 2006 10:17 PM - 2 messages
I have been using fn_get_sql for sometime now to get information on running processes. I have been passing the handle of an active SPID and fn_get_sql returns the text of the stored procedure that is running. Then I came accross a script that someone wrote that gets the actual ...
UNION problem
S R H -
8 Jun 2006 10:02 PM - 5 messages
I have 3 tables which have a "sortOrder" column of int datatype. I have a UNION query which is sorting on sortOrder column: SELECT fgs.objectid, fgs.form, fgs.sortOrder, fgs.dbColName FROM formgenselect fgs WHERE fgs.form = 'personal' UNION ...
SQLXML
Nikolami -
8 Jun 2006 10:01 PM - 2 messages
Is it possible to install SQLXML on Win 2003 with SQL 2000??? ...
Optimize the Query
Joe K. -
8 Jun 2006 9:40 PM - 5 messages
Listed below is tsql statement that I set up execute every 60 minutes. To check to see if all the values exist in the following list: '806478', '806479','806480','806481' in the Call_Movements table. I am only interest in the first six characters and I'm converting iNum data ...
Adding Unique data
Selvarathinam -
8 Jun 2006 8:50 PM - 4 messages
Dear Folks, I have a table like Invno Amount 55 100 55 200 ...
truth or fiction about writing correct queries
VMI -
8 Jun 2006 8:47 PM - 4 messages
Somebody once told me (or I read it, I'm not sure) that no matter how much data is returned or how complex the query is, if the query is written correctly, data should be displayed almost instantly. Is this true? ...
process is blocking itself
TSQL -
8 Jun 2006 7:54 PM - 7 messages
I have a stored proc created for report and now suddenly the report is taking lot of time to run. The store proc is having simple select statement with multiple case statements. I checked the sysprocesses table and noticed that the process is blocking ...
SELECT Query With Sum
Saima -
8 Jun 2006 7:53 PM - 6 messages
I have a table like the following: MyField1 MyField2 MyValue F1 A 5 ...
Procedure/cursor question about returning results
Tony Murnion -
8 Jun 2006 7:52 PM - 3 messages
I'm working on a procedure that needs to cycle through the records of some raw data and combine the the current record with the datetime field of the prior record. I have been able to write a script to do that with cursors ...
alert e-mail
GB -
8 Jun 2006 7:51 PM - 3 messages
Hello: In SQL Server 2000 database I have a table MyTable which is updated daily with previous day data. In some reason data could be missing for particular day. To control the situation I'd like to create alert message to be sent to ...
Global Property in SQL?
rmg66 -
8 Jun 2006 7:44 PM - 4 messages
Here's one for you all.... [SQL Server 2000] I need to somehow create a place (in memory?) that will store a value. This value needs to be visible to all sessions BUT - it needs to die if and when the session that created it dies. ...
remote stored procedure call
Tomm -
8 Jun 2006 7:32 PM - 1 message
I have an issue and I hope someone can explain. I am simply executing a remote exteneded stored procedure, xp_readerrorlog. I setup the linked server with the sa (I know you should do that) and I am using the following ...
Problem with a where clause
Epervier -
8 Jun 2006 6:48 PM - 2 messages
I'd like to set the where clause of my query from a field in a table ex: Select TableX.field1 from tableX, TableY where TableY.field2 Field2 is equal to "fieldW like '%blabla%' " Thanks for your help ...
How to construct a like compariso when there are special characts
bic -
8 Jun 2006 6:32 PM - 6 messages
How do I construct a like compariso query when there are special characts such as [ and ] in the string, i.e. [Y] to be searched? Thanks. ...
SQL SELECT INTO ... IN external_database - syntax error
ryan_willow -
8 Jun 2006 6:17 PM - 3 messages
I am trying to execute the following sql query on SQL Server 2000: select * INTO "11111111_Poll 137_Archive" IN DB_91163_rwArchive from "11111111_Poll 137" And I receive the follwing error: Incorrect syntax near the keyword 'IN'. DB_91163_Archive is the name of an external database (on the same ...
Default constraints in SQL Server 2000
deathtospam -
8 Jun 2006 6:03 PM - 8 messages
I have a int column, SortOrder, that explicitly defines the order in which rows should be sorted. Is it possible to assign each new row a default value equal to the number of existing rows plus one? For ...
How to Move Sql2000 DTS into Sql2005 legacy folder
Naana via SQLMonster.com -
8 Jun 2006 5:48 PM - 5 messages
Hi All, I have a large DB with 111 DTS's in Sql2000 and I need to move them to a New Server and Domain. What will be the best way to approach it. Since these DTS's are complex, I don't want to upgarde them but to move them saftly to ...
SQL Server Linked Server problem (with AS400/DB2)
Massimo -
8 Jun 2006 4:29 PM - 2 messages
Hi, I've connected AS400/Db2 to a Sql Server2000 DE with the Client Access ODBC drivers. Everything works fine, except that sometimes, when the AS400 goes offline for any reason (maintenance etc.), after a while, SQL server becomes extremely slow and it give me errors saying that there are too many ...
How to work with SQL Server reporting services.
MSK -
8 Jun 2006 3:55 PM - 3 messages
Hi all, How can we create reports using SQL Server reporting services 2000? I know how to generate reports using SQL server reportings services ,but my question is related to front-end, Should I have .NET in my pc? Is ...
How to generate reports !!! some basic question
MSK -
8 Jun 2006 3:50 PM - 3 messages
Hi all, How can we create reports using SQL Server reporting services 2000? Should I have .NET in my pc? Is there any other option. (Any other tool) Or can we create reports directly in SQL Server reporting services (via browser...) ...
How to generate a table script in T-SQL?
Edmund -
8 Jun 2006 3:27 PM - 6 messages
Hello, Is there a way to generate a CREATE TABLE script from an existing table in T-SQL? For stored procedures I can use sp_helptext in Query Analyzer to get the procedure definition, make changes, test and then issue the ALTER. I ...
SQL Query to get the result
NAT -
8 Jun 2006 3:24 PM - 2 messages
I have the below table : Column1 Column2 Column3 Column4 Row1 T1 T2 12 12 ...
log shipping
Geo -
8 Jun 2006 2:44 PM - 5 messages
Hi guys can anyone give me some pointers on how to set up log shipping with SQL server 2000 sp4 standard edition. I was reading the following article but it seems the standard edition doesn't have the 'ship the transaction logs to other SQL serve(log ...
Collections in UDT?
Marcin -
8 Jun 2006 2:13 PM - 1 message
Hi everyone, MS SQL Server allows creating UDT which can be easilly accessed from an application. Is it possible to create a collection of values (objects) in the UDT? If yes, where to find any samples? Thanks in advance for the reply. ...
Using FileCopy to Copy Files via T-SQL
Larry Menzin -
8 Jun 2006 2:12 PM - 3 messages
I am looking to automate copying of files by using the FileSystem object via OLE automation. I'm using the following code: DECLARE @hr int DECLARE @ole_FileSystem int ...
Simple distributed transaction example does not work
Scott Nichol -
8 Jun 2006 2:01 PM - 5 messages
I cannot get distributed transactions to work on a single server. I am hoping that someone can help. As the simplest test I can imagine, I have added a linked server pointing to the local server by doing EXEC sp_addlinkedserver @server='pubsserver', @provider='SQLOLEDB', ...
Cursors and Temp Table : in SQL Server
akpatelrs -
8 Jun 2006 1:41 PM - 2 messages
1. Can I pass Parameter to a Cursor ??? 2. Is it must to declare the Holding variable for a Cursor above it before opening ? 3. Can a temp table be update ? ...
Calculated columns...
Kurt Rogiers -
8 Jun 2006 1:30 PM - 4 messages
Hello, can anyone help me with this? SELECT (A+B) AS X FROM TABLE WHERE X = 'sqdf' The point here is, if I use the following query SELECT (A+B) AS X FROM TABLE WHERE (A+B) = 'sqdf' ...
Latin to Cyrillic
fede07m -
8 Jun 2006 1:25 PM - 2 messages
Hi everybody, i'm a new SQL server user and i have a problem I have to select a loto of cyrillic records saved on a table that has Latin collation How can i see them in Cyrillic? i just tried to make another table with a column with Cyrillic ...
Check box in a Combo Box
Bharathi Kumar -
8 Jun 2006 12:15 PM - 2 messages
Hi, Iam working on a window application using .NET framework 2.0. I want a check box + some text in a combobox. User can select multiple items in combo box by using the check ...
ADO Connection terminates automatically after one hour
Pushkar -
8 Jun 2006 11:49 AM - 3 messages
Hi, I am facing some problem with ADO connection to SQL Server. My application connects to SQL Server through ADO, excute some query and then for more than an hour application does not use this connection. It does something else. ...
Execute an sp by via a trigger?
basulasz -
8 Jun 2006 11:17 AM - 3 messages
Is it possible to execute a stored procedure by a trigger on insert event? If so, how should i create the trigger? I created as like below but it did not work; create trigger tg_sms on SMS FOR INSERT AS my_sp ...
HOW "TOP" is interpreted??
MUKUT -
8 Jun 2006 10:07 AM - 8 messages
All, Not any project specific but just a beginner's query put me at corner. SELECT TOP 10 * FROM <TABLE_NAME> Sqlserver2000 returns 10 results, but the question is "these 10 results are top 10 results" means what? There are 100s columns in the table ...
Bring back Query Analyser
Steve Lloyd -
8 Jun 2006 8:26 AM - 8 messages
Hi, I am using 2005 SQL Management to edit my T-SQL stuff but it reformats all of my SQL statements (just like Enterprise Manager) making complex statements impossible to read. Can anyone tell me if there any options to turn this off and/or an ...
MDX: Rolling YTD
RS -
8 Jun 2006 7:21 AM - 2 messages
Hi, I have been searching for a solution in MDX to create rolling Year-to-Date calculated members. For example: When the current member time is June 2006, I want the total sales YTD of last year, that means from January 2005 till June 2005. ...
Comparing databases
Ivan Debono -
8 Jun 2006 6:39 AM - 6 messages
Hi, I need to compare 2 databases to check for missing objects, columns, etc. Comparing objects was pretty easy. Just a pair of sql statements on the sysobjects table and it worked fine. Now I need to go a level deeper, by comparing missing & different columns in ...
how to display 10 rows at a time when 1000's returned form sql query
Daniel -
8 Jun 2006 5:15 AM - 2 messages
how to display 10 rows at a time when 1000's returned form sql query how to select the 20th-30th row in a where clause? e.g. select the 20th to 30th employee who name is 'bob' in tsql. i need this because my select often ...
SQL 2005 - Select XML Data Field
Bryan -
8 Jun 2006 3:29 AM - 3 messages
Does anyone know how you can select certain XML elements from an XML data field? I have an XML field in a table that contains XML like this: <Form> <Row/> <Row/> ...
Select all Rows on distinct only on one column
jason.teen -
8 Jun 2006 1:42 AM - 5 messages
Hi, I've been racking my brain for days on how to select all the details on a distinct field of only on one column. For Eg. TableOne ------------------------------ ProdID | Description ------------------------------ 1 | Toy ...
sql x sysbase
Frank Dulk -
8 Jun 2006 12:25 AM - 3 messages
would like to know if I get to do some view tying a table SQL with sybase for the query analiser, I have a program that the database this in Sybase and other in SQL and I need to tie those tables. ...
Use of SELECT...,0 FROM
Darius Sanders -
8 Jun 2006 12:23 AM - 6 messages
I am relatively new to SQL programming and I found some code that I am having a problem understanding. The basic format of the code is a SELECT statement followed by some column references with the final being 0 FROM (i.e. SELECT ...
SQL Query
murtaza -
7 Jun 2006 10:54 PM - 3 messages
i've a database where huge data is dumped realtime, i'd like to run a query in DTS which should keep only the last 90 days data and every day delete the 91st day. hope i'm able to explain well. please advise necessary procedure ASAP. ...
which query is more efficent? (oppinion time!)
WebBuilder451 -
7 Jun 2006 10:51 PM - 14 messages
I have two queries and was wondering which would be considered more efficent? Please, all oppinions welcome! as to table structure, well i'll giv it if any one wants it, but all i got to say is i didn't create it! ...
MERGE
Goran Djuranovic -
7 Jun 2006 9:48 PM - 3 messages
Hi all, What would be SQL Server's version of this Oracle code: ************************************************************* MERGE INTO destination_table dest USING (SELECT col1, col2, col3 FROM source_table) source ON (dest.col1 = source.col1) WHEN MATCHED THEN ...
Help! Users can't connect to database
Sandy -
7 Jun 2006 9:26 PM - 13 messages
Hello - I am new to Sql Server 2005 and most probably screwed something up. I am getting an error "The user is not associated with a trusted Sql Server connection" when accessing my app using a regular user login. ...
Need help with this
Chris -
7 Jun 2006 8:34 PM - 5 messages
Hi, I have the foll sample table prodid saledate 01 2006-04-01 ...
automatic backup / restore to another db
Smokey Grindle -
7 Jun 2006 8:24 PM - 3 messages
we have a "snapshot" database used for development testing we it constantly (weekly only) synced with the development database (on same server) I wanted to set up a schedule that will backup the database called development every sunday morning, then restore that onto the "devsnapshot" database right ...
Stored Procedure Help
Justin -
7 Jun 2006 7:39 PM - 5 messages
I need some assistance I am trying to create a stored procedure where data will be inserted into a temporary tbl. Now the name of the table will have a variable, which will include time. But when I try to run the procedure, i get an error stating ...
Dynamically use variables in SQL in EXECUTE
stuart.karp -
7 Jun 2006 7:37 PM - 4 messages
Hi, What I want to do is: DECLARE @sqlName varchar(255) DECLARE @temp NVARCHAR(100) SET @sqlName =(select name from master.dbo.sysdatabases where name like 'Job_%') SET @temp = 'USE ' + RTRIM(@sqlName) PRINT @sqlName EXEC (@temp) GO --rest of my SQL code ...
select with no Result set
bill -
7 Jun 2006 7:26 PM - 4 messages
All, Is there anyway to ask SQL to run a Select statmant but not return the result set? Thanks in advance, Bill ...
|
|||||||||||||||||||||||