all groups > sql server programming > april 2006 > threads for thursday april 13
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
select statement to assign values to multiple variables using min()
Posted by Cismail via SQLMonster.com at 4/13/2006 8:03:58 PM
Hello,
A solution or workaround to this problem would be much appreciated!
CREATE TABLE [IndexTables]
([Indexnm] [varchar] (50) NOT NULL ,
[SortOrd] [int] NOT NULL ,
[Tablenm] [varchar] (50) NOT NULL ,
[Columnnm] [varchar] (50) NOT NULL )
Lets say "IndexTables" has the following row... more >>
Cannot sort a row which is greater than 8094??
Posted by Stimp at 4/13/2006 6:59:05 PM
I've recently started getting the following error when I retrieve
long text entries from my MS SQL Server database...
"Cannot sort a row of size 8150, which is greater than the allowable
maximum of 8094"
I have one column in one of the tables involved in the SELECT statement
that has a m... more >>
most efficient way to check for table?
Posted by Markus Zingg at 4/13/2006 6:46:25 PM
Hi group
What is the most efficient way to check if a table (who's name is not
known in advance) exists? I don't need any information about the
collums nor do I need to known any information about the rows it
contains - just wether it exists or not.
TIA
Markus
... more >>
Getting Row Number in the Db
Posted by pmud at 4/13/2006 5:05:02 PM
Hi,
How to select a record which has the row number 2694 in the database?
Thanks
--
pmud... more >>
CASE in where clause?
Posted by David at 4/13/2006 3:22:36 PM
I want to create SQL (maybe stored proc) using a SELECT statement that can
add WHERE conditions if (and only if) values are sent to it. For example:
SELECT ID, Person
FROM People
WHERE LastName LIKE '%@var1%' +
CASE WHEN @var2 IS NOT NULL THEN ' AND TypeCode = ' + @var2
ELSE ''
END
...... more >>
Pulling trans logs from one server to anthother
Posted by SBAUER at 4/13/2006 3:04:02 PM
I know this can be done using a bat file, but am having issues finding any
documentation.
I need to connect to a mapped drive and move trans log backups from on
server to another server so they can be applied.
Any help would be greatly appreciated.
Thanks in advance
Susan
... more >>
ASP.NET 2.0 Tree Control and Navigation Controls - General Question
Posted by davidwank NO[at]SPAM gmail.com at 4/13/2006 2:55:45 PM
Hi.
Why is it practical to have the ASP.NET navigation controls based on
XML? I would love to just use databinding and then be able to
dynamically update the navgiation menu (e.g. for a product list).
I tried to use a dropdownlist with hyperlinks for navigation (not the
main navigation --... more >>
How many joins is too many?
Posted by Shane C at 4/13/2006 1:43:02 PM
Does anyone have any good sources of information that talk about how many
joins is too many? I've heard the number 4 or 5 thrown around but haven't
found any 'evidence' to back them up.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Can I register SQL 2005 Server in the SQL 2000 Enterprise Manager?
Posted by microsoft.public.dotnet.languages.vb at 4/13/2006 12:11:16 PM
Hi All,
I was wondering if I could register SQL 2005 Server in the SQL 2000
Enterprise Manager or vice versa.
I have two database servers. One of them is SQL 2000 enterprise edition
and the other one is SQL 2005 developer edition. We have not moved
completely to our new server from our old ... more >>
Help parsing parts of column data in T-SQL
Posted by Mike at 4/13/2006 11:37:14 AM
I need to break the parts of column data that are seperated by underscores
into thier own variables using T-SQL so I can use them for an insert into
another table and am having troubles doing so. Help would be greated
appreciated. The column data looks like:
2300_EOF_02148_07Y_01_003_2005... more >>
Convert varchar to decimal
Posted by Pancho at 4/13/2006 10:24:01 AM
Hello, I am running a SELECT statement on a varchar 50 field. I would like
to convert the output to a numeric field with 2 decimal places. I tried a
CAST but that didn't work. Any suggestions would be appreciated. Thanks,
Pancho.... more >>
calculated rows?
Posted by PJ6 at 4/13/2006 10:19:16 AM
I've been waiting for this for a while. I'd like to be able to define a
table by specifying a set of numbers with the option of giving or not giving
bounds. Like, "all the integers between 200 and 500", or "all integers
greater than 2". Or, "all the Sundays between now and next year". There ar... more >>
can view be dynamically filtered like an MSAccess query?
Posted by Rich at 4/13/2006 10:12:02 AM
In MSAccess you can dynamically filter a query by adding square brackets [ ]
to the criteria section and a prompt inside the brackets [enter filter code].
Then you can open the query directly and be prompted for a filter. I tried
this in the view without any success.
I was approached toda... more >>
Want to buy Pentium 3
Posted by faizankhan666 NO[at]SPAM gmail.com at 4/13/2006 9:24:22 AM
Genuine P3 intel CPU (used for 1 year)
Ram:128 MB
Processor :733MHz(intel)
Want to order :Mail on hotmal_pass_admin@hotmail.com
... more >>
Stored procedure not returning a resultset
Posted by andrew.roberts NO[at]SPAM poundland.co.uk at 4/13/2006 9:07:32 AM
Hope someone here can help with this.
I have a stored proc (copy below) which returns a resultset to Query
Analyser but returns nothing to either a Excel spreadsheet or a Crystal
report. I have already tried setting the nocount option to on but still
nothing. I have another similar proc that d... more >>
Rollback a replication
Posted by Will at 4/13/2006 9:00:49 AM
Hi All,
If a merge subscription goes wrong (i.e. inserts corrupted data) then
is there any way to roll back that change.
unfortunately I can almost certainly say it won't be as it's a commited
transaction, so that data would have been replicated to other people,
and generally firmed up in t... more >>
How to Script Muplitple SPROCS/VIEWS at one time
Posted by RobertP at 4/13/2006 8:26:59 AM
In Enterprise Manager one can select several SPROCS/VIEWS using the
CONTROL key and then Right-Click to script out those objects.
Alternativly, pressing CONTROL-C copies, to the clipboard, the T-SQL to
create the selected objects.
SQL Management Studio seems to only allow you to script one obj... more >>
Using variables for tablename in stored procedures/getting records in a Recordset from stored procedure
Posted by fuka at 4/13/2006 5:50:29 AM
Hello,
with this stored procedure I can get Table data in a Recordset
(VB6/SQL-Server 2000)
a) stored procedure
CREATE PROCEDURE [dbo].[sp_WJNr] @JahrAng int, @NrAng int, @DSNr
nvarchar(5)
AS
SELECT * FROM tbl_VerfW WHERE Jahr =3D @JahrAng AND Nummer =3D @NrAng AND
DSNr =3D @DSNr
b... more >>
HTML form to input data
Posted by Stewart Lacey at 4/13/2006 5:40:01 AM
I am trying to set up and HTML form using XML that I can publish for my
clients to submit their data. I have tried Microsoft's demo examples on
their help page using their demo Nwind traders db, however their examples
don't work - I have followed all their instructions to the letter.
Has a... more >>
How to search a field from many tables
Posted by hon123456 at 4/13/2006 5:33:00 AM
Dear all,
I have many tables in SQL server. Now I want to search a
field name as "size" in one of the table, but I forgot which table it
is located in. How can I find out which table the "size" is located?
Thanks
... more >>
How to return a record with max value of a field
Posted by hon123456 at 4/13/2006 5:29:03 AM
Dear all,
I got tableA as follows
TableA
Name Address Name-number
Peter Road1 1
Peter Road1 2
Peter Road1 3
I want to select the Record with the maximum Name-number , I try t... more >>
How to get a character from a string field
Posted by hon123456 at 4/13/2006 5:22:17 AM
Dear all,
I have a field with String type. The format is like that e.g
12345a 23456b or 12345 . The last english character of the field is
optional. Now I need to determine whether the last english character
exist, if it exist, then I need to extract the last english character.
fo... more >>
Identity Seed
Posted by marcmc at 4/13/2006 4:41:02 AM
Can you run an alter table script to change the seed on a table or do you
have to redefine the table DDL?
I want the seed to be 0 instead of 1... more >>
setting up report server
Posted by Mike P at 4/13/2006 4:31:15 AM
How do you set up a report server when using Reporting Services 2000?
I've managed to create a report, but I don't know how to set up a server
as a report server and then use it to host my reports.
Any help would be really appreciated.
Cheers,
Mike
*** Sent via Developersdex http... more >>
replication and 'syntax error near E'
Posted by janez at 4/13/2006 3:51:02 AM
I use SQL2005 with bunch of stored procedures. All worked fine. Then I set up
push transactional replication with sqlexpress so all agent were running on
publisher. Replication ran without errors and replicated articles. After some
time (about 1 hour) few stored procedures failed with 'Incorre... more >>
Error in SELECT clause: expression near '='.
Posted by Jeroen at 4/13/2006 2:52:21 AM
When I use a construction like this in the sql designer of visual
studio 2005. i get the error that it doesnt understand this. However
the sql is just fine is there a way to make this work in visual studio?
i did set the prefix for the parameters so it does understands the @ in
other types of qu... more >>
Question about writing basic stored procedures
Posted by M. Simioni at 4/13/2006 2:03:36 AM
Hi,
i'm training a little in coding stored procedures to quickly develop
applications.
I'm asking you if it is a good thing to do to code procedures for
Insert, Select and Update for each table in my database.
I mean, if i have a table "LOG", what about writing three procedures
like the on... more >>
Crash in Execute() method of _ConnectionPtr
Posted by Ashish choudhari at 4/13/2006 2:01:49 AM
Hi All,
I have a piece of code where object of _ConnectionPtr is used. When I
call the Execute() method for this object I get an debug error stating
that "The Value of ESP could be saved...".
If I ignore the message this leads to crash with "Access violation
error".
Following is the code s... more >>
Question regarding state of processes in sysprocesses table
Posted by Archana at 4/13/2006 12:15:36 AM
hi all,
I am having one question releated to processes in sysprocesses table.
What i want to ask is, is it possible that state of sleeping process
can go change to running state.
If yes, then say suppose i am running one time consuming stored
procedure. Then is it possible that once i sta... more >>
Retrieving details of Backup schedules, maintenance plans, or SQL Agent jobs, from SQL Server
Posted by Joe Spears at 4/13/2006 12:00:00 AM
Hi
Does anyone have any sample code (pref. C#), that can obtain details of the
backup schedules, maintenance plans, or SQL Agent jobs, from SQL Server,
perhaps using DMO, or SMO (2005)
Any sample code appreciated
Thanks
... more >>
recreating deadlock problem
Posted by Vikram at 4/13/2006 12:00:00 AM
In our app we r using ASP .Net 1.1 and sql 2000.
We frequently get the dedlock problem and receive the follwoing error :
"Transaction (Process ID 55) was deadlocked on lock resources with another
process and has been chosen as the deadlock victim. Rerun the transaction."
We r not able to recre... more >>
need help with a nested sql statement
Posted by Milsnips at 4/13/2006 12:00:00 AM
hi there,
i have 2 tables, 1 = stock, 2 = softwareLicencing. What i'm trying to do is
return a normal list of records from STOCK, but return a grouped cound from
softwareLicensing where stock.stockID = softwareLicensing.stockID... but the
inner sql is returning more than one value and it bo... more >>
|