all groups > sql server (alternate) > february 2005 > threads for february 15 - 21, 2005
Filter by week: 1 2 3 4
SELECT-how to get only the last 20 records?
Posted by siatki at 2/21/2005 10:03:23 PM
Hello,
Firstly, sorry for my english.
I have problem with creating SQL statement. I am beginner and I think that
it is very easy to do. Look -
I have to get only the last 20 records from table ABC (f.eg.) and according
to that how to create the SQL statement? F.eg. SELECT name, forename, date... more >>
Newbie needs help
Posted by Robert Dickow at 2/21/2005 8:15:42 PM
I set up the MS SQL Desktop server engine on my computer.
I successfully set up a database and the table structure using a query
utility. My Visual Studio logs in to the server using a system account that
magically exists.
but...
I can't make my web application log in to the database. I c... more >>
Help needed
Posted by - at 2/21/2005 4:48:39 PM
Hello to all
I need help on some sql statements and wondering is anyone out there is able
to help.
I've extracted some data from the database into a new table consisting of 4
fields
CustomerID Date Pallets Quantity
A0001 20050108 3 800
A0001 ... more >>
Question: Upper row limit of 6080 characters
Posted by DW at 2/21/2005 2:45:14 PM
Hi, all:
I'd heard that the upper row limit in SQL of 6080 bytes may have been
increased with SP3.
Can anyone confirm/deny this? Is this still a 'carved-in-stone' upper
cap?
Thanks,
DW.
... more >>
Bizarre case behavior.
Posted by twbanks NO[at]SPAM gmail.com at 2/21/2005 1:15:42 PM
I'm doing a select which includes the following:
case
when (rtrim(ltrim(T464.COMMENT_4)) = '' or T464.COMMENT_4 is null)
then ''
else
convert(datetime,left(replace(replace(T464.COMMENT_4,' QTR: ',''),' -
',''),10))
end as QuarterStartDate
The COMMENT_4 field is a char(51), and contains ... more >>
Will OSQL Produce SQL Backup?
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 2/21/2005 1:01:44 PM
Will osql product an SQL backup? By this I mean a text file with the
transact-sql in it so I can use it to recreate the database elsewhere?
Thank you.
... more >>
Can't Export Fields w/ over 255 characters
Posted by quinniii NO[at]SPAM yahoo.com at 2/21/2005 11:26:02 AM
I have a query where I am trying to export a column that has around
2000 characters and it is truncated. What is not setup in MS SQL
correctly so that DTS will export the csv correctly.
Thanks,
John
... more >>
Large binary writes slower than expected
Posted by Code4u at 2/21/2005 10:26:04 AM
Hello, we are investigating the use of SQL Server as a backend to our
scientific imaging application. We have found that when we write a
large image (60 Megabytes) the performance is quite a bit slower than
writing 60 single megabyte images. The tests were performed running
SQL Server 2000 on Wi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Win xp sp2
Posted by Marcin Podlesny at 2/21/2005 10:17:00 AM
Hi All!
I've Win XP Pro with SP2 installed. I've also ms sql server 2000 installed.
The problem is that sqlserver doesn't listen on port 1433. There is no slq
server listening when I check netstat -a.
I opened 1433/1434 ports on Windows firewall but it didn't help. I set
TCP/IP in enabled p... more >>
"Hill Climbing" -- a More General Question on Systematic SQL Skill Upgrade
Posted by NickName at 2/21/2005 8:01:31 AM
I'm wondering if someone has thought about this, one desires to enhance
his/her sql skills proactively vs. skills gained over a period of time
merely because of work experience. SQL skill here refers to mainly MS
SQL Server related skill.
What could be reasonably effective ways to go for th... more >>
Import MS-Excel to SQL-Server
Posted by grawsha2000 NO[at]SPAM yahoo.com at 2/21/2005 7:25:43 AM
Greetings All,
I have a excel file which is originally a sqlserver table that was
exported as a excel file. I have added more data to this excel file
and now want to import it again to its original table,i.e, it will
overwrite current data in the table but with no change in the schema.
How s... more >>
Semistructured data
Posted by minimalisticphilosophy NO[at]SPAM yahoo.com at 2/21/2005 4:59:04 AM
Does SQL Server support the semi-structured data model?
How can XML documents storage and retrieval be efficiently exploited on
SQL Server?
Where can I find more info on the semistructured data model
implementation on SQL Seerver (if any)?
Thank you.
... more >>
looking for a tool/ middleware tool which...
Posted by hc.b NO[at]SPAM gmx.de at 2/21/2005 3:11:28 AM
Hi all.
I'm looking for a tool which should act like some kind of middleware/
logical layer bewtween the SQL server and the webbased user interface.
- It should be possible to easily create simple web forms (only data
input and output) without programming effort by "clicking" the fields
and... more >>
Anyway to recover delete stored proc?
Posted by KoliPoki at 2/21/2005 12:10:17 AM
Folks.
I screwed up big time, I deleted a very long and smart stored proc (pls
don't ask how).
Is there anyway I can recover it?
Any advice appreciated.
Tada.
... more >>
Query help with 2 tables plus one more - easy I think
Posted by hamilton4003 NO[at]SPAM hotmail.com at 2/20/2005 2:04:01 PM
I have two tables (tblRequest and tblDev) whose items have many-to-many
relationships with each other. I have set things up like this
(simplified):
Table 1 fields: tblRequest.PrimaryKey tblRequest.Description
example: 10 45 Elm
11 ... more >>
SQL JOIN help
Posted by midwesthills NO[at]SPAM hotmail.com at 2/20/2005 4:40:10 AM
I have two tables (simplified example):
table person
PK data
1 A
2 B
3 C
4 D
table choice
PK FK
1 1
2 1
3 1
4 2
5 2
6 2
I need to count the total number of people that made a choice. Each
person should only be counted once, regardless of how many choi... more >>
SQL 2 tables ask
Posted by yuvalbra NO[at]SPAM gmail.com at 2/20/2005 1:17:22 AM
I need an IF statment at SQL
I have 2 tables (names A B)
i need (In SQL stetments) to search from table A if rows in table B
with this conditions:
if B.col1=1 or B.col1=6 then search all row (1=1)
otherwise select A.col1=B.col1
this select is part of a big select from A,B tables
Best ... more >>
sql LEFT JOIN and IN question
Posted by niceguy at 2/19/2005 9:27:31 PM
I'm trying to select records from two tables. the following code works for
what i want to to:
set RSMain = conn.execute ( "select top 20 product, prodcode, edition, (
select count(id) from cartTemp where convert(varchar(4000),cartdetails) in
(a.prodcode)) as counter from Products a where ... more >>
restore db stuck loading
Posted by ragudba NO[at]SPAM sbcglobal.net at 2/19/2005 7:08:06 PM
Hi
I am trying to copy a 20 GB database from server 1 to 2. I took a full
backup, copied to server2 and restored ( ready for use) using EM.
After the message restore completed, I see the database's status as LOADING.
We are on Sql Server 2000 (8.00.818) on Windows 2000 Adv Servers.
I ra... more >>
IF statement in DML
Posted by grawsha2000 NO[at]SPAM yahoo.com at 2/19/2005 4:23:01 PM
Hi,
How can if include If statement in SQL update ?
What I want to do in english is this:
@param1 int
update table1
set field1=getdate()
if @param1=3
MTIA,
Grawsha
... more >>
Multiple Table Joins Makes Query Go To Sleep
Posted by Ed_No_Spam_Please_Weber NO[at]SPAM Weber_Spam_Not_Enterprises.Org at 2/19/2005 11:38:20 AM
Hello All & Thanks in advance for your help!
Background:
1) tblT_Documents is the primary parent transaction table that has 10
fields and about 250,000 rows
2) There are 9 child tables with each having 3 fields each, their own
PK; the FK back to the parent table; and the unique data for t... more >>
SQL ask 2 tables
Posted by m_peled NO[at]SPAM yahoo.com at 2/19/2005 7:11:47 AM
I have 2 tables (names A B)
i need (In SQL stetments) to search from table A if rows in table B
with this conditions:
A.col1 containe 4 char.
B.col1 containe 4 or more char
need all the records that A.col1 IN B.col1
Best Regards,
Yuval
... more >>
Writing your own aggregate functions
Posted by jc_usergroup NO[at]SPAM optusnet.com.au at 2/19/2005 4:42:53 AM
Hi.
Just as we have AVG(COLUMN_NAME) and MAX(COLUMN_NAME) how can I write
my own variation of a such a function. If I can appreciate how to do
this,
then I hopefully I can write a MEDIAN(COLUMN_NAME) type function or a
more general function like a 10% percentile function with syntax such
as
... more >>
Using the same View repeatedly
Posted by jc_usergroup NO[at]SPAM optusnet.com.au at 2/19/2005 4:38:00 AM
Hi.
A question I have is with regard to the use of views with SQL2000. If
I have a view called "A_view" and used in the following manner;
----------------
SELECT ...
FROM A_View
WHERE ....
UNION
SELECT ....
FROM A_View
WHERE .....
-----------------
is the view computed twice? ... more >>
ASP.NET/IIS/SQL help !
Posted by Charlie Ting at 2/18/2005 7:13:50 PM
Hi.
Let me tell you my domain environment. It's NT 4.0 domain with a
Windows 2000 member server running as ASP.NET/IIS/MS SQL 2000, all in one
box, and it worked fine. Recently, we bought a new box with Windows 2003
standard version and trying to move ASP.NET and IIS to this box. Howev... more >>
A story of incorrect syntax
Posted by theintrepidfox NO[at]SPAM hotmail.com at 2/18/2005 7:07:29 PM
Dear Group
Just can't see what I'm doing wrong. Any Ideas?
SELECT Address1, Address2, Suburb FROM i2b_address
IsNull (NullIf (Address1 + '', ''), '') +
IsNull (NullIf('','' + Address2,''),'') +
IsNull (NullIf('', '' + Suburb, ''), '') AS PropertyAddress
Server: Msg 156, Level 15, State... more >>
SQL Debugger Problem
Posted by JJ_377 NO[at]SPAM hotmail.com at 2/18/2005 3:09:20 PM
I can get the debugger to work: I get a message:
"sp debugging may not work if you log as as Local System Account" while
SQL Service is configured to run as a service. You can open Event Viwer
to see details." (Viwer means "Viewer" this is not one of my typos...)
My text book says that this me... more >>
importing DB from another SQL server
Posted by anguo at 2/18/2005 2:52:45 PM
Hello,
I need to set up a development platform at home with a copy
of a DB from a SQL server at a friend's company.
So far, all my attempts at backup/restore or export/import
have failed despite my reading all the documentation I
could find (I am a newbie).
Using DTS/Export wizard, I trie... more >>
execute proc on stopping mssql server
Posted by Indrek Mägi at 2/18/2005 1:02:18 PM
How execute extended proc on stopping ms sql server (it mean before
stoping).
Is it possible to handle this?
Or is in system proc a'la sp_on_stop?
Thx
... more >>
Execute same statement for each value in result set
Posted by Joe Banafato at 2/18/2005 12:12:26 PM
Hi everyone,
My brain refuses to remember the (undocumented?) stored procedure I'm
thinking of. It takes at least two parameters: a sql statement to
execute, and a table name (or something of that nature).
Then, for each value in the table, it executes the sql statement and
passes the valu... more >>
Export
Posted by TaraB at 2/18/2005 9:04:33 AM
I am trying to export a grouped report to PDF with the group section
expanded. I can't seem to accomplish this. Can anyone provide any
suggestions?
Thanks
... more >>
Question:Killing sessions before nightly CHECKDB
Posted by DW at 2/18/2005 9:02:44 AM
Greetings:
I have a SQL 2000 server with several databases on it, and I have a
maintenance plan that includes both a backup and a CHECKDB Integrity
Check.
The backups appear to run correctly each night, but if a user leaves a
connection open to a database all night, the CHECKDB fails.
I'... more >>
SQLMail does not start
Posted by matthewalbum NO[at]SPAM gmail.com at 2/18/2005 8:13:27 AM
I am using SQLServer2000 with sp3.
The SQLServer logs on as user Test on the local computer. I am logged
on as user Test on the local computer.
I have created a Exchange Profile and tested that it can send and
receive mail.
When I go to Enterprise Manager to set-up this profile for SQL M... more >>
stored procedures/security
Posted by eighthman11 at 2/18/2005 7:34:23 AM
First off I am a rookie at Sql Server. Ok let's give this a try. My
company has bought a new software package called Viewpoint. It's On
Sql Server and written in VP. We do not have access to the code.
There is a option in the software package called "Application
Security". When this is clic... more >>
simple problem, it's friday...
Posted by ujjc001 NO[at]SPAM charter.net at 2/18/2005 7:30:45 AM
Here is what I need to accomplish
iif(len(sMemoText) > 15, left(sMemoText, 15) + '...', sMemoText)
How to convert this into a case or anyother way to get this into a
select statement...
Thanks MUCH!
Jeff
... more >>
Return most recent membership based on year stored in joined table
Posted by Ken Post at 2/18/2005 5:44:29 AM
Hello-
I'm fairly new to writing SQL statements and would greatly appreciate
some help on this one.
I'm working on a project for a non-profit that I volunteer for. Part
of the database tracks membership using tables like this:
PersonInfo
-------------------
PersonID (primary key)
Fi... more >>
DB design thoughts??
Posted by grawsha2000 NO[at]SPAM yahoo.com at 2/18/2005 3:04:11 AM
Hi,
I'm in the process of designing a DB (typical management system DB; 2
transaction tables and about 5 look-up ones )for one of the departments
in our company. The user wants this DB and thusly the client (forms,
reports..etc.) solely for his department. However, I do expect soon
after de... more >>
Having Clause won't run on Linked Server
Posted by scottelkin NO[at]SPAM gmail.com at 2/17/2005 11:31:28 PM
I am trying to find all affiliates that have more commissions from this
week to the prior week. The problem is in the having part where
"aff2.affiliateid = aff.affiliateid". SQL Server just doesn't like
trying to use "aff.affiliateid" to refer to the parent table.
The error I get is "Invalid... more >>
incompatiable data sync
Posted by someguy at 2/17/2005 10:30:08 PM
Hi,
We are going to be running two SQL Server 2000's from the same
physical server, with Windows Server 2003, and I need to have certain
tables between them syncronized. Database A is a backend to a website and
database B is going to be used by a different department. Both the
da... more >>
Sending file contents in the body of the email with xp_sendmail
Posted by mjm NO[at]SPAM barwonwater.vic.gov.au at 2/17/2005 7:38:07 PM
I would like to send the contents of a file using xp_sendmail however
I do not want the file contents to be an attachment.
I have no problem sending the file as an attachement.
Can anybody give me an xp_sendmail example of how to do this.
The results of a query can easily appear in the body of t... more >>
VB and SQL Reporting Services
Posted by Aiming4TheFoot at 2/17/2005 5:48:33 PM
Does anyone know how to run reports (.rdl files) in VB.NET? I am trying
to run multiple reports in batch and have only the last one display.
... more >>
Impossible to use a scalar UDF to pass a parameter to another UDF?
Posted by Yarik at 2/17/2005 4:59:19 PM
Hello there!
I am working with MS SQL Server 2000.
I have a table function that takes an integer parameter and returns a
table, and I can successfully use it like this (passing a literal
as a parameter):
SELECT * FROM MyTableFunction(1)
or like this (passing a variable as a parameter... more >>
How to build Gui or forms to wrap SQL queries that are normally run in query analyzer
Posted by michael_w_chan NO[at]SPAM hotmail.com at 2/17/2005 4:21:29 PM
Hi all,
I'm a newbie to SQL and I need help with investigating what ways are
possible to build an interface of some sort that wraps around a SQL
query script.
I have a simple SQL query which we normally run inside Query Analyzer
to update certain fields in the SQL DB based on FQDN provide b... more >>
What's wrong with this View? Duplicate columns?
Posted by robboll at 2/17/2005 1:54:50 PM
When I add this code in a view and try to save . . .
SELECT TOP 610 *
FROM dbo.Master INNER JOIN
dbo.TypeByCase ON dbo.TypeByCase.CaseNum = dbo.Master.CaseNum
It gives the error:
ODBC error: [Microsoft][ODBC SQL Server Driver]Column names in each
view or function must be unique. Column na... more >>
language-font problem
Posted by Elvira Zeinalova at 2/17/2005 1:19:24 PM
In my application I need to make the report in different languages.
I made a table for report parameters, like:
create myTable (
language_id int not null,
parameter char(50) null,
constraint PK_lang_ID PRIMARY KEY (language_id))
and then tried:
insert into myTable values(1, 'Bank info') ... more >>
VB6 connection problem to MS SQL Server 7 table
Posted by Mike at 2/17/2005 12:22:57 PM
I have a VB6 program on my PC that connects into and looks at a slq
server 7 table on a development server. This server is rebooted
everynight. Everytime the connection is interupted, an error message
pops up. This is expected to happen, but I wanted to delay this error
message from popping u... more >>
Planning for SQL Server 2005: 64-bit, OS, processor, memory
Posted by Larry Bertolini at 2/17/2005 11:32:32 AM
I was browsing Microsoft's SQL Server site, looking for
some details about SQL Server 2005. Didn't find what
I was looking for...
I'm thinking about moving an existing SQL Server 2000
workload to a new box, using SQL Server 2005, and
maybe the 64-bit version.
My questions are:
1. What ... more >>
Error converting data type varchar to float
Posted by jaYPee at 2/17/2005 11:24:27 AM
I have created a stored procedure that contain this field (below) in
order to meet certain criteria. But my problem is when I try to run
the stored procedure I encounter an error "Error converting data type
varchar to float".
CASE Final WHEN 0 THEN '--' ELSE Final END AS FinalGrade
The Fina... more >>
osql feedback
Posted by Brian Cryer at 2/17/2005 10:34:51 AM
I have some long running scripts which I fire at my database using osql.
(These are big files and mostly doing inserts but some also do a few other
things.) It would be nice to have some activity indication (other than the
disk activity light) that these are running. When I used to use Oracle,... more >>
SQL Server Agent Job History
Posted by tcaylor NO[at]SPAM thomasnelson.com at 2/17/2005 8:00:18 AM
I have changed the following setting in SQL Server 2000:
Right click SQL Server Agent and go to properties/Job System and
deselected limit size of job history log. I want to keep all job
histories in msdb indefinitely.
Is there a way to leave this setting on, but configure how much history
s... more >>
Obtaining timezone offset in T-SQL.
Posted by yashgt NO[at]SPAM yahoo.com at 2/17/2005 7:37:48 AM
In MS SQL 2000, I would like to obtain the timezone offset from UTC for
a given date. For today's date, I can do
DATEDIFF(ss,GETDATE(),GETUTCDATE()). However, the offset for a future
date may not be the same as today because some countries go in Daylight
Saving mode. Can you suggest a way to obt... more >>
T-SQL script for tran log with - in database name
Posted by Mike at 2/17/2005 6:55:26 AM
Hi,
This is probably a trivial question, as I am simply trying to execute a
BACKUP LOG database WITH NO_LOG. Except T-SQL will not accept anything
I type when database has a - in it, for example data-base. I have
tried:
BACKUP LOG 'data-base' WITH NO_LOG
BACKUP LOG "data-base" WITH NO_LO... more >>
Agregar una tabla a un filegroup existente
Posted by Victor.Vacendak NO[at]SPAM gmail.com at 2/17/2005 5:53:28 AM
Hola a todos:
En mi base de datos tengo dos filegroups llamados FG1 y FG2.
Recientemente he creado una tabla y por defecto quedó alojada en el
filegroup PRIMARY. ¿Cómo puedo hacer para mover la tabla íntegramente
con todos sus datos desde el filegroup PRIMARY hasta el filegroup FG1
por ejem... more >>
Select * from something where field1 = N'literal'
Posted by sdowney717 NO[at]SPAM msn.com at 2/17/2005 5:23:51 AM
What exactly is happening when a query is sent using the N in front of
the string to be found?
Under what conditions would someone use the N' in a query?
I have been testing out some chinese text. I set up some fields of
nVarchar, nText and it works with an N. Without the N, it wont work.
N a... more >>
MS SQL connection could not be established
Posted by John Almeda at 2/16/2005 8:39:58 PM
John Almeda
System Adm
It seems that I have done something really stupid or something went
boonkers. I was restoring a DB whn I got a message that the log file
could not be restored because it was XXXXXX????. This left my DB greyed
out and with a (loading) sign. I tried to detach and then... more >>
SQL 2000 whitepaper?
Posted by JD at 2/16/2005 3:41:17 PM
Is there a whitepaper or other documentation that talks about SQL2000
performance limits?
For example, transaction/sec limit? (Which I understand that hardware config
would be a factor)
thanks
... more >>
How to get the last occurence of rows containing disticnt value in one column
Posted by John A Fotheringham at 2/16/2005 2:45:22 PM
I have a table that tracks GPS records broadly speaking as follows
ts DATETIME
username VARCHAR(16)
...
GPS data
...
I want to select the most recent GPS data for each distinct user.
That is, the table will have may records for a given username, but I
only want the most recent for ... more >>
strtdb80.exe has encountered a problem
Posted by Tom at 2/16/2005 2:28:36 PM
After install Oracle 8.1.7 on Win XP, message "strtdb80.exe has encountered
a problem and needs to close.." occurs after
restarting comoputer..
Any solution???
... more >>
Between Question
Posted by pkruti NO[at]SPAM hotmail.com at 2/16/2005 2:22:39 PM
What am I doing wrong in the statement:
q = "Select * Into etclog_holding from etclog where box# BETWEEN (" &
Box1 & " and " & Box2 & ")"
It gives me the following error message: Incorrect syntax near the
keyword 'and'
the following code is what i am working with but it is not working as
... more >>
Alternatives to SQL *Plus
Posted by Ant at 2/16/2005 2:09:15 PM
Hi,
I have an SQL assignment to do and at my school we use SQL *Plus there
however I don't have Oracle at home, where I would like to do the work ,so I
was wondering whats the easiest way to get an SQL environment up so I can
code in that then just paste it into SQL *Plus later.
I don't ... more >>
searching for any data string in database
Posted by kinde at 2/16/2005 1:41:04 PM
hi
here is a problem:
i have a databes with many, many tables
the problem is that i dont know where 'abcd' string is (but it is for sure
in one of that table)
is there any SELECT that could help me with finding this string in database?
--
greets
... more >>
Merging Duplicate Rows
Posted by hharry at 2/16/2005 1:18:24 PM
Hello All,
I have an issue with dupliate Contact data. Here it is:
I have a Contacts table;
CREATE TABLE CONTACTS
(
SSN int,
fname varchar(40),
lname varchar(40),
address varchar(40),
city varchar(40),
state varchar(2),
zip int
)
Here is some sample data:
SSN: 1112223333
... more >>
comparing data between two tables...
Posted by gloria at 2/16/2005 12:15:26 PM
I would like to compare data across two tables. I have part
information in a table. I get a new set of information periodically.
I would like to compare my new info to my old info. I recognize that
doing a compare of every attribute of every part will take FOREVER. Is
there some way I can do... more >>
Help optimising SQL Query
Posted by Andrew at 2/16/2005 11:10:08 AM
Hi,
I have a problem I would really appreciate help with. I am generating
dynamic SQL and need to optimise it. The specific example I am trying to
optimise looks like this:
SELECT DISTINCT DataHeaderID FROM TB_DataDetailText T1 WHERE
(EntityFieldID IN ( 31) AND (Data LIKE '12BORE%' )) AND... more >>
DLookup equivalent in SQL Server
Posted by Paul at 2/16/2005 6:59:35 AM
I am migrating a student database from Access to SQL Server. In Access
I have a query that displays grade information (grades are calculated
on a 12-point scale). In the query I average the students' scores and
store it in a column called Avg. I look up and display the equivalent
grade letter us... more >>
Quick SQL Server 7.0 index question
Posted by xyz at 2/16/2005 3:57:02 AM
At the moment I only know enough about SQL Server to create the databases I
need as a backend for the various internal desktop/web applications I write.
I haven't ever had the time to get seriously involved with internal workings
of SQL Server and we are far too small to employ a DBA.
With any... more >>
SQL Server Backup
Posted by RLN at 2/16/2005 3:41:52 AM
Is it possible to take backup of database for 1 day change?
also possible to restore it back for the particular date?
for example..
In one month data of database I want to take a backup for changes in
13 of the month.
if required restore it back.
... more >>
Is user logged-on?
Posted by theintrepidfox NO[at]SPAM hotmail.com at 2/16/2005 2:53:44 AM
Dear Group
I wondered whether there's a function or script that will show me
whether a user is currently logged-on to a MSSQL 2000 database? I'm
using SQL Authentication.
Thanks very much for your help & efforts!
Have a nice day!
Martin... more >>
How do I format an integer
Posted by stevek at 2/16/2005 2:07:36 AM
How do I format an integer. Add commas.
1234565 1,234,565
TIA... more >>
accessing the database remotely from non-microsoft platform
Posted by Dan Levy at 2/15/2005 11:05:35 PM
I have a query of the kind brains of this group.
Is it possible to access a microsoft sqlserver database (for select, insert,
update, delete, and for miscellaneous administrative actions such as table
and index creation and deletion) remotely from a compiled C program (and/or,
from Perl) runni... more >>
Select for Cursor Returns 0 Same Select Highlighted Returns 2,000+
Posted by BlueDragon at 2/15/2005 8:15:17 PM
Grrr!
I'm trying to run a script:
print 'Declaring cursor'
declare cInv cursor forward_only static for
select
distinct
inv.company,
inv.contact,
inv.address1,
inv.city,
inv.state,
inv.postalcode,
inv.cmcompanyid
from
dedupe.dbo.ln_invoice as inv
left join
dedupe.dbo.custom... more >>
why does this deadlock?
Posted by hendershot at 2/15/2005 4:24:44 PM
Using SQL Server 2000 SP3a, I run the following in 2 query analizer
windows on the Northwind database, the second one always gets the
deadlock Msg 1205:
Window 1:
declare @cnt int
select @cnt = 5
while @cnt > 0
begin
begin transaction
select * from orders (updlock) where employeeid = ... more >>
Capture Records That Failed Insertion From XML
Posted by Ayron at 2/15/2005 2:46:20 PM
Does anyone know an effective way to capture any records that failed to
insert into a table when inserting from an xml document in SQL Svr
2000?
thanks.
-ak
... more >>
How can I avoid table lock in SQL2000?
Posted by gdekhayser at 2/15/2005 1:19:01 PM
To any and all;
I have a very large table (16Mil+ records), for which I want to delete
about 8 Million records. There are a few indexes on this table.
Is there a way that I can run either a query or a series of queries
that will run against each record and delete based on criteria (date)?
... more >>
@@servername returns NULL
Posted by tgru at 2/15/2005 12:37:24 PM
I am trying to script out the creation of database scripts. I am trying
to use @@servername in the statement. I found out the select
@@servername returns NULL. I used sp_dropserver to drop any servernames
first, restarted SQL, ran sp_addserver 'servername' to add the
servername, restarted SQL. s... more >>
Validating and updating colums
Posted by Guju at 2/15/2005 11:27:23 AM
Hi all,
I am a newbie to sql and I need your help.
I want to update column (email) from one table to another validating the
Customerid column in both table. Update the email address in production
table with the email address in temp table if the customerid is same in both
tables.
What wo... more >>
SQL Server 2005 Datetime data type
Posted by Hoodwink at 2/15/2005 11:03:26 AM
Does anyone know if SQL Server 2005 will support date values before
1/1/1753 in the datetime data type?
... more >>
Odbc - binding sql server binary field to a wide char field only returns 1/2 the daat
Posted by John H at 2/15/2005 10:22:43 AM
Hi ,
Have a Visual C++ app that use odbc to access sql server database.
Doing a select to get value of binary field and bind a char to that
field as follows , field in database in binary(16)
char lpResourceID[32+1];
rc = SQLBindCol(hstmt, 1, SQL_C_CHAR, &lpResourceID,
RESOURCE_ID_LEN_PLUS_... more >>
Help - Corrupted SQL Server 2K Log. Is this serious
Posted by Covi at 2/15/2005 10:04:14 AM
Hello,
I have a SS2K (SP3) that is appending very wierd looking error messages
to the SQL Server Log (Current). The messages are not formatted as
other log entries. The messages suggest some kinda dump information.
The messages have the following characteristics:
Date Information is inval... more >>
Access Data Projects Uniqueidentifier problem
Posted by Ebbie at 2/15/2005 9:28:24 AM
Hi,
I am designing a SQL server backend, MS Access (ADP) frontend
application and I came across an interesting problem.
Lets say I have a table T with the following fields(columns)
[a] (int Not Null, Primary key, Identity auto increment)
[b] (uniqueidentifier, Allow Nulls)
[c] (text)
... more >>
Find Table Size
Posted by NickName at 2/15/2005 7:37:40 AM
Env: SQL Server 2000
The following sql stmt seems to find a particular table's size
programmatically:
select top 1 [rows],rowcnt
from sysindexes
where ID = object_id('aUserTable')
and status = 0
and used > 0
However,
a) I'm not 100% sure of its consistency;
b) Both [rows] col and [... more >>
Moving log files
Posted by buster at 2/15/2005 6:38:49 AM
If I use attach/detach to move my log file to a different drive, will
it break any of my permissions for the sql logins. If so, how can I fix
this.
This all stemmed from needing to setup log shipping to another server
for redundancy. Step 1 says to create a share where the log files
reside. W... more >>
Conditonal SUM function, or similar conditional aggregates
Posted by RobbieGotNeeds NO[at]SPAM netscape.net at 2/15/2005 6:17:24 AM
Are there any conditional aggregate functions, such as SUM()?
An example would probably be the best way to describe what I'm
trying to do...
I have the following table, named Orders, with the following records:
ItemNo qty_ord paid
------ ----------- ------
T101B 1 199.0... more >>
SQL Server Table Backup
Posted by RLN at 2/15/2005 3:09:41 AM
Anybody know how to backup a table with particular range.
Ex one column contains date..
I need to backup only data belong from date to date.
is is possible via programming in C?
if yes give example ( don`t tell backup SQL command)
RLN
... more >>
How pass column to udf in join
Posted by Ray at 2/15/2005 12:39:12 AM
Group,
Passing inline values to a udf is straightforward. However, how or is it
possible to pass a column from the select of one table into a udf that
returns a table variable in a join to the original table. The goal is to
explode the number of rows in the result set out based on the res... more >>
|