all groups > sql server (alternate) > recent posts
win 2003 server
Posted by jansi at 3/3/2008 12:12:17 AM
how many user create in win 2003 server?
From http://www.developmentnow.com/g/95_2004_7_1_0_0/comp-databases-ms-sqlserver.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com... more >>
Re: How do I link a database in SQL
Posted by Erland Sommarskog at 10/14/2007 12:00:00 AM
(rzito@si.rr.com) writes:
> I am working on a databse on my local box, my source data is on
> another. How can I link the database and table from one server to
> another? Currently I am using DTS to just transfer the records!
You can set up a linked server. If the stars align, it's as simple... more >>
Re: Query Variables
Posted by Erland Sommarskog at 10/13/2007 10:16:45 PM
Yota (yotaxp@gmail.com) writes:
> I'm new to SQL Server, but an experienced .Net developer. I'm trying
> to accomplish a query the most efficient way possible. My question is
> if you can define a temporary variable within a query to store tables
> or fields. (Like the LET clause of LINQ) My ... more >>
Query Variables
Posted by Yota at 10/13/2007 10:01:23 PM
Hi,
I'm new to SQL Server, but an experienced .Net developer. I'm trying
to accomplish a query the most efficient way possible. My question is
if you can define a temporary variable within a query to store tables
or fields. (Like the LET clause of LINQ) My query makes use of
subqueries whi... more >>
Jobs in HCL-Noida/Gurgaon/Chennai/Bangalore/Mumbai
Posted by dbaguru at 10/13/2007 9:19:45 PM
Jobs in HCL-Noida/Gurgaon/Chennai/Bangalore/Mumbai
1. Citrix Admins - Noida - Chennai [L2/L3 Support]
2. Sun Solaris Admins - Noida - Chennai - Mumbai [L2/L3 Support]
3. HP Unix Admins [Chennai] / IBM AIX Admins [Chennai & Mumbai]
4. Linux Admin [L2/L3 Support] - NCR & Chennai
5. Oracle DBA... more >>
How do I link a database in SQL
Posted by rzito NO[at]SPAM si.rr.com at 10/13/2007 9:12:45 PM
I am working on a databse on my local box, my source data is on
another. How can I link the database and table from one server to
another? Currently I am using DTS to just transfer the records!
... more >>
Re: Speed Issues After SQL Upgrade
Posted by Ed Murphy at 10/13/2007 8:30:35 PM
Side note: When posting the same thing to multiple newsgroups,
please crosspost (to all of them in a single step) rather than
multi-posting (to each of them individually). I responded to
this in another group before reading in this one that you'd
already resolved the issue.... more >>
Re: Would special character cause insertion problem?
Posted by Erland Sommarskog at 10/13/2007 4:56:53 PM
(tatata9999@gmail.com) writes:
> I'm not sure I follow you this time.
And I am not sure that I am following you. You post some loose bits of
code that I don't really know what language it is. In the middle of at
you get an SQL error:
Violation of PRIMARY KEY constraint 'PK__myTBL__772... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Re: Indexed View Crashes ASP.NET App
Posted by Erland Sommarskog at 10/13/2007 3:18:13 PM
Jason Wilson (wilsonj@ausrad.com) writes:
> I was looking to improve the performance of an ASP.NET application by
> creating the an indexed view that could be used instead of some of the
> root tables.
>
> What I didn't realize is that it would affect any future conenctions
> to the root tabl... more >>
Re: Speed Issues After SQL Upgrade
Posted by Erland Sommarskog at 10/13/2007 3:11:07 PM
Ben (pillars4@sbcglobal.net) writes:
> We recently upgraded our MS SQL Server 2000 to 2005.
>
> Here is what we did:
>
> 1. Perform backup of the database from the old server.
> 2. Created a blank database in the new server.
> 3. Restored the database into the blank database located in the ... more >>
Re: Speed Issues After SQL Upgrade
Posted by Ben at 10/13/2007 1:07:46 PM
The sp_updatestats did the trick. Now the speed as it should be.
Thanks.
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns99C8AFB6246FYazorman@127.0.0.1...
> Ben (pillars4@sbcglobal.net) writes:
>> We recently upgraded our MS SQL Server 2000 to 2005.
>>
>> Here is w... more >>
Re: Would special character cause insertion problem?
Posted by tatata9999 NO[at]SPAM gmail.com at 10/13/2007 11:05:53 AM
On Oct 13, 11:56 am, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (tatata9...@gmail.com) writes:
> > I'm not sure I follow you this time.
>
> And I am not sure that I am following you. You post some loose bits of
> code that I don't really know what language it is. In the middle of at
... more >>
Re: Speed Issues After SQL Upgrade
Posted by Greg D. Moore (Strider) at 10/13/2007 9:39:39 AM
"Ben" <pillars4@sbcglobal.net> wrote in message
news:T%RPi.1672$LD2.1355@newssvr17.news.prodigy.net...
> The hardware configuration below:
>
> - Has two Intel Quad-Core Xeon processors
> - 10GB of RAM
> - 15,000RPM SATA hard drives
>
> The old server was just a regular P4, 4G RAM.
>
... more >>
Re: get value of a single record instead of aggregated value with GROUP BY
Posted by Erland Sommarskog at 10/12/2007 9:21:12 PM
blackpuppy (mingzhu.z@gmail.com) writes:
> I would like to use the following SQL statement to get the latest
> comment for all products.
>
> SELECT PRODUCT_ID, COMMENT, UPDATED_ON
> FROM PRODUCT_COMMENT
> GROUP BY PRODUCT_ID
> HAVING UPDATED_ON = MAX(UPDATED_ON)
>
> But this leads to... more >>
Re: Would special character cause insertion problem?
Posted by Erland Sommarskog at 10/12/2007 9:16:19 PM
(tatata9999@gmail.com) writes:
> Very simple sql dml code (all the columns are of varchar of various
> length):
> insert into myTBL (col1,col2,col3)
> values ('#ranVar#','#FORM.element1#','#FORM.element2#')
>
> The err msg is:
> Violation of PRIMARY KEY constraint 'PK__myTBL__772828B3... more >>
Re: how to query for a column value that contains dashes
Posted by MC at 10/12/2007 7:56:29 PM
Something like this (untested, but you see the point):
select <col list>
from profile
where msgdate >= @date and msgdate < dateadd(dd,1,@date)
date would be a parameter...
MC
<jdrake@living-dead.net> wrote in message
news:1192208492.248548.49030@e34g2000pro.googlegroups.com...
> H... more >>
Re: how to query for a column value that contains dashes
Posted by Roy Harvey (SQL Server MVP) at 10/12/2007 5:56:08 PM
What exactly is the data type of the column msgdate? You mention it
is a 'datetime' column. If it is the datatype of datetime then forget
about strings, it is stored internally as a couple of numbers. With a
non-zero time the standard way to test for a specific date is:
WHERE msgdate >= '2... more >>
Re: Would special character cause insertion problem?
Posted by Jack Vamvas at 10/12/2007 5:01:20 PM
Could you post your stored procedure or code?
Are you able to get an output of the sql string that will be used, the one
that throws the error.
--
Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL
<tatata999... more >>
Re: Would special character cause insertion problem?
Posted by tatata9999 NO[at]SPAM gmail.com at 10/12/2007 4:34:59 PM
Sorry for security reason, I have to remove the previous post and
repost it with revision.
The err msg is:
Violation of PRIMARY KEY constraint 'PK__myTBL__772828B3EFCA'. Cannot
insert duplicate key in object 'myTBL'.<P><P>
SQL = "insert into myTBL (col1,col2,col3) values
('342*783'... more >>
Re: Would special character cause insertion problem?
Posted by tatata9999 NO[at]SPAM gmail.com at 10/12/2007 4:32:00 PM
On Oct 12, 4:16 pm, Erland Sommarskog <esq...@sommarskog.se> wrote:
> (tatata9...@gmail.com) writes:
> > Very simple sql dml code (all the columns are of varchar of various
> > length):
> > insert into myTBL (col1,col2,col3)
> > values ('#ranVar#','#FORM.element1#','#FORM.element2#')
>
... more >>
Re: Speed Issues After SQL Upgrade
Posted by Ben at 10/12/2007 2:54:16 PM
The hardware configuration below:
- Has two Intel Quad-Core Xeon processors
- 10GB of RAM
- 15,000RPM SATA hard drives
The old server was just a regular P4, 4G RAM.
"Ben" <pillars4@sbcglobal.net> wrote in message
news:FURPi.1671$LD2.266@newssvr17.news.prodigy.net...
> We recently upg... more >>
Speed Issues After SQL Upgrade
Posted by Ben at 10/12/2007 2:46:33 PM
We recently upgraded our MS SQL Server 2000 to 2005.
Here is what we did:
1. Perform backup of the database from the old server.
2. Created a blank database in the new server.
3. Restored the database into the blank database located in the new server.
After this process, there was an obvi... more >>
Indexed View Crashes ASP.NET App
Posted by Jason Wilson at 10/12/2007 2:40:57 PM
I was looking to improve the performance of an ASP.NET application by
creating the an indexed view that could be used instead of some of the
root tables.
What I didn't realize is that it would affect any future conenctions
to the root tables.
This of course crashed the application on any ty... more >>
Re: how to query for a column value that contains dashes
Posted by aj at 10/12/2007 2:09:27 PM
The fact that the datetime column values contain dashes is incidental.
You need to query just the date part of the datetime.
Try something like this:
select * from profile
where dateadd(dd,datediff(dd,0,msgdate),0) = '10/2/2007'
---
This should work also:
select * from profile
where msgdat... more >>
Re: Would special character cause insertion problem?
Posted by tatata9999 NO[at]SPAM gmail.com at 10/12/2007 1:57:43 PM
Hi Jack,
Very simple sql dml code (all the columns are of varchar of various
length):
insert into myTBL (col1,col2,col3)
values ('#ranVar#','#FORM.element1#','#FORM.element2#')
The err msg is:
Violation of PRIMARY KEY constraint 'PK__myTBL__772828B3EFCA'. Cannot
insert duplicate key in ... more >>
Re: How to Execute SQL Scripts using Batch file?
Posted by Dan Guzman at 10/12/2007 11:31:26 AM
> How can i give UserName,Password,Database and all those things?
>
> Plz send me details how to do that...if possible with example...
To expand on Erland's response, you can pass parameters on the command line
and reference using %1 through %9. The examples below execute all the
".sql" sc... more >>
Re: get value of a single record instead of aggregated value with GROUP BY
Posted by Roy Harvey (SQL Server MVP) at 10/12/2007 11:11:26 AM
On Thu, 11 Oct 2007 23:47:18 -0700, blackpuppy <mingzhu.z@gmail.com>
wrote:
>I would like to use the following SQL statement to get the latest
>comment for all products.
>
>SELECT PRODUCT_ID, COMMENT, UPDATED_ON
>FROM PRODUCT_COMMENT
>GROUP BY PRODUCT_ID
>HAVING UPDATED_ON = MAX(UPDAT... more >>
how to query for a column value that contains dashes
Posted by jdrake NO[at]SPAM living-dead.net at 10/12/2007 10:01:32 AM
Hi,
I have a large table with a 'datetime' column that has date and time
values in it. The data is in this format:
2007-10-02 09:54:00.000
The table is called 'profile' and the column 'msgdate'
I want to return only rows that match a specific date. So far I have
the following query wor... more >>
Would special character cause insertion problem?
Posted by tatata9999 NO[at]SPAM gmail.com at 10/12/2007 7:21:33 AM
Hi,
SQL env: sql server 2000
Target column of insertion: varchar(15)
Case, a var is made up of a character of the following characters
(random selection):
A,B,C,D,E,$,!,%,^,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,&,*,(,)
and a few numbers (random selection), and then
var = ran1&ran2
... more >>
get value of a single record instead of aggregated value with GROUP BY
Posted by blackpuppy at 10/11/2007 11:47:18 PM
How to get a record value instead of aggregated value with GROUP BY?
Assume that I have a PRODUCT_COMMENT table defined as below. It logs
the multiple comments for products. A product may have multiple
comments logged at different time.
CREATE TABLE [dbo].[PRODUCT_COMMENT](
[COMMENT_ID] ... more >>
|