all groups > sql server mseq > december 2003
Filter by week: 1 2 3 4 5
SQL script to update a table
Posted by ravinder at 12/28/2003 2:36:00 AM
I have to write a SQL script to update a table named
PA with a column heading of testone update the qty from
10 to 20? ... more >>
max record to join with other tables
Posted by kda at 12/26/2003 11:21:18 AM
I am currently working with 3 tables.
Table1 has records that have an effective time stamp according to a store number, or ALL stores.
Table1(RetailID, effectiveDate, storeNum, price)
Table2(RetailID, SKUID, vendorID)
Table3(SKUID, Size, desc)
I am currently working on a way to get the SK... more >>
UPDATETEXT Not Working
Posted by WiliamG at 12/23/2003 3:55:21 PM
I am using MSDE-SP3a on a Win2K-Pro PC.
I am trying to concatenate a field (type TEXT) with
another field (type TEXT) from another table. I have
followed the example in the BOL but it appers as though my
resulting field is not being updated.
I don't know what I am doing wrong, any sugestion... more >>
Rename SQL database datafile name
Posted by Goodman at 12/23/2003 5:34:05 AM
Hi,
I attached my DB with a new name and the datafile name
remains the old name - how can i alter this name ?
Thanks in advance
... more >>
Emailing Reports using xp_sendmail
Posted by Chris Preslar at 12/23/2003 5:12:23 AM
I am trying to email three reports in a single email. I
have written a TSQL stored procedure the mixes print
statements and select statements to display a report. The
stored procedure works fine in query analyzer. However,
when I specify this stored procedure as the sql in
xp_sendmail, ... more >>
Sorting Question
Posted by Dan at 12/22/2003 7:55:12 AM
I need a query that will do two things:
1) return the information in a table based on time
2) limit the returned information based on a criteria. (I
do not want to see duplicate records and would like the
query to return one record based on the max part number)
I have figured out the first ... more >>
parsing text out of a field for later use
Posted by Sonja at 12/19/2003 1:36:19 PM
Hello
I thought I was being clever when I arranged a field that could hold any note in it, to be specific and hold the text part of the entry in [ ] and the date enclosed in || (two pipes) example: [RoutingCircuit1, |12/12/2003|]--
Now we want to pull out only what is between the two pipes and us... more >>
How can you execute a DTS from VB?
Posted by Bradley Anderson at 12/19/2003 11:31:25 AM
I would like to execute a DTS on a server from a VB application, how can I do this
Thank
Bradley... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
T-SQL Query
Posted by Phil Bouadana at 12/18/2003 8:48:19 AM
Hi,
Is there a way to retrieve a date using a t-sql query
while specifying variables? e.g. I want the dates
(dd/mm/yyyy) for all the Friday's in December
Thanks in advance.
Phil... more >>
Select Query - UNEXPECTED RESULT
Posted by GW at 12/18/2003 12:02:51 AM
Help,
I have a query as follows:-
SELECT count(*) as counter
FROM tblProvision
WHERE (tbl1.field1 = CONVERT(DATETIME, '2003-11-30
00:00:00', 102))
AND (tbl1.field2=N'SHL')
and the result is 4 instead of 400 (actual record = 1000)
but when i removed either one of the criteria as the
f... more >>
Restore Backup
Posted by Joanne at 12/17/2003 8:56:47 PM
Hi ..
I have upgrade my Server from SQL 7 to SQL 2000.
I have done a backup for the SQL 7.
How do i use the backup files ( *.dat ) from the SQL 7
to restore it at the new Server 2000?
I have encounter error of different file id.
Is there a way to recovery back from the backup files?
... more >>
service pack
Posted by Randy at 12/16/2003 3:14:46 PM
Hi All,
On SQL server 7.0 Is there any way to show my current SQL
Server service pack?
... more >>
Sort and Collation Settings
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 12/16/2003 12:41:40 PM
Is there a way to determine the sort and collation
settings that are configured on a SQL7 Server?... more >>
SQL 7.0
Posted by gtaylor NO[at]SPAM chasi.org at 12/16/2003 10:35:48 AM
Will scheduled backups run if Enterprise Manager is open?
... more >>
Disk size not decreasing after truncating
Posted by Steven at 12/16/2003 9:05:09 AM
Hi,
I am in EM and SQL 2000 on w2k sp3. I shrink the log
files and then shrink the database but my disk size is
not decreasing. Can some please explain to me how to free
up disk space when truncating the logs.
Any help would be greatly appreciated as I am a newbie.
Thanking You
Steve... more >>
If...Else syntax problems
Posted by Michael Fitzpatrick at 12/15/2003 3:49:48 PM
I am working in SQL 2k and trying to teach myself on the
go...I have run into a query/situation that I can't get to
work. I was hoping someone here mmight be able to point
me in the right direction.
I have a case managment DB that is tracking, among other
things, contacts and their addre... more >>
Linked Servers
Posted by Fulvio Hayes at 12/15/2003 12:38:19 PM
Can one use Linked Servers to link back to the same
server? If so, how can one perform this operation?
fulvio
... more >>
=> Date Format
Posted by Rhonda Fischer at 12/15/2003 10:49:28 AM
Hello,
I am having problems with the datatype date. I
sometimes want to refer only to the time part of
date to display in my Access Project form field.
In fact most of my current forms separate time
from date and deal with both separately, this is
possible in Access. Though cases a problem... more >>
Sql-Disp
Posted by Prem at 12/15/2003 3:57:00 AM
How to display the Record nUmber alongwith other fields.
For example if i have table with name and address, I would
like to have the o/p as
Record# Name Address
1 xx yyy
....
through SQl... more >>
How to find the maximum value
Posted by GUESSWHO at 12/13/2003 1:03:53 AM
Help..
Any possibility to find the maximum value from thousand of
records using SQL Query ? Let say I want to find 10
records which have the maximum value.... more >>
Outside of Range
Posted by Sam at 12/12/2003 7:41:08 AM
Dear all,
I composed a query, which runs as follows:
SELECT GLDOC AS Doc_Number, GLAN8 AS Address, GLDGJ AS range
FROM F0911
WHERE (GLAN8 = 20102) AND (GLDGJ BETWEEN 103305 AND 103334) OR
(GLAN8 = 900010)
ORDER BY GLDGJ
However the query always return... more >>
SQL CMD to view large field
Posted by TT at 12/12/2003 2:02:26 AM
I have a field with 3000 characters, when I do a select
the field, I can only see part of it.
What is the command to allow viewing of the result set?
... more >>
SQL Server Service packs
Posted by TPhan at 12/11/2003 12:49:09 PM
Hi All,
Our SQL server 2000 was installed last year. I don't
think I have the latest service pack applied.
Is there any way to show my current SQL Server service
pack.
Thanks... more >>
Truncate the log
Posted by cougarford200 NO[at]SPAM yahoo.com.au at 12/11/2003 9:38:28 AM
hi,
I am a newbie with SQL 2000. In sql 7.0 I used to right
click the database and truncate the log, and shrink the
database. Is there anyways in SQL 2000 that I can
truncate the log without using query analyzer.
Thanks
Steven... more >>
Attach a new database
Posted by Eureca at 12/11/2003 7:39:10 AM
Hi, I would like to attach a new database to our SQL
Server, how should I do?
Database is "ccmdb2.mdf","ccmlg2.ldf"
My instance is:
sp_attach_db 'ccmdb2',
filename1='f:\Win2kEsp\MSSQL7Data\ccmdb2.mdf',
@filename2='f:\Win2kEsp\MSSQL7\Data\ccmlg2.ldf'
And I get the following error:
... more >>
Attach database
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 12/11/2003 12:14:11 AM
Hi, I have to import a database in SQL 7.0 Service Pack 4
from which I have the *.mdf and *.ldf files in a new
server. The problem I get when I do "sp_attach_db" is:
"Server: mesagge 1816, level 16, state 1, line 1
Cannot attach db due to the difference in Character Set,
Sort Order or Un... more >>
error 9004(Please hurry up)
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 12/10/2003 11:15:20 PM
Hi..
I got a problem for SQL 2000 Advanced Server.
Error No.9004 and Description is
"An error occurred while processing the log for
Database ...... .mdf"
I lost one day data transation.Please help me to how to
recover my dbase.
... more >>
How can I restore a SQL 6.5 database backup to a SQL 7.0/2000 server?
Posted by Pedro Cunha Rodrigues at 12/9/2003 4:38:40 PM
Thanks,
Pedro Rodrigues
pedro@markdata.pt
... more >>
How to change the Connection or Server within a query?
Posted by Bradley Anderson at 12/9/2003 11:41:27 AM
I would like to run a SQL Query that pulls data from one SQL Server and then executes some commands on another SQL Server. Is this possible
Thank
Bradley... more >>
Execute Commands Stored in Table
Posted by Bradley Anderson at 12/9/2003 8:31:20 AM
I have a table that has a list of SQL Commands. Each command is in a seperate row. What is the best way to run these, so that I can schedule them with a DTS?
Thanks
Bradley... more >>
\\computer - not connected
Posted by Brian Wideman at 12/8/2003 12:38:41 PM
I ran the installation instructions for MSDE, using my
student Microsoft Office Professional diskette. I cannot
start MSDE, however, because the SQL Server Service
Manager has a note at the bottom COMPUTER - Not
conntected. The "Server" line is greyed out.
I had a problem with my instal... more >>
Error 3197
Posted by Paul at 12/8/2003 9:00:37 AM
I'm working on a developing a database and I am the only
user attached to the SQL server.
I am using Access 2002 to interface with SQL 7.0 and I
can create a record but when I try to delete it I get the
following error.
The Microsoft Jet database engine stopped the process
because you ... more >>
ms sql7.0 case sensitivity
Posted by ernest at 12/8/2003 8:23:52 AM
we're trying to do a case sensitive sql query with php
over odbc. can somebody help... we tryed to convert the
data into binarys before comparison but without result...
any help would be great, thanx in advance!... more >>
Sum query on nvarchar datatype
Posted by Guesswho at 12/7/2003 7:39:19 PM
Why i cant get the exact total sum figures for the
following queries,
select sum(cast(tblProvision.sp_open_balance as float)+cast
(tblProvision.sp_charged as float)
-cast(tblProvision.sp_written_back_amount as float)-cast
(tblProvision.sp_written_off_amount as float)
-cast(tblProvision.sp_l... more >>
need SQL Server DB to learn .net
Posted by Dennis at 12/5/2003 9:53:05 PM
I'm starting to learn vb.net after purchasing Visual
Studio.Net Academic. I was wondering is there a built in
SQL Server to work with or do I have to buy SQL Server?
Because when I try to use the pubs or northwind database I
get a message that the SQL Server does not exists or
access deni... more >>
=> DatePart
Posted by Rhonda Fischer at 12/5/2003 7:37:49 AM
Hello,
The following query works correctly. Although I would
like to collect all orders after 10:30am however when
I replace > 10 with 10.3 or 10.5 neither works.
SELECT OrderReceived.OrderDateReceived,
OrderReceived.Supplier, OrderCodes.OrderCode,
OrderReceived.OrderTimeReceived, DATEP... more >>
SQL Query statement (Sum problem)
Posted by GUESSWHO_M_EYE at 12/4/2003 11:09:06 PM
help ..pls,
how to use sum statement in SQL. If msaccess used,
select sum(field1) as totalfield1 from tableA ....
how about sql query analyzer? I tried to use sum(cast
(field1 .... with 2 decimal points but the sum result is
not accurate.
... more >>
Command to UnCluster and ReCluster Primary Key
Posted by Bradley Anderson at 12/4/2003 1:41:08 PM
What would be the command to UnCluster and ReCluster a Primary Key via a command statement
I tried the following, but the drop command did not work for a Primary Key
Drop Index Release_SubPart.PK_Release_SubPar
create clustered index PK_Release_SubPart on Release_SubPart (Project_ID ASC,LineItem... more >>
convert?
Posted by Darren at 12/4/2003 12:26:00 PM
This sort of relates to a prvious post with subject monet
format.
I have multiple fields with type "money". I have
converted them using:
convert(varchar(25), field1,1) AS field1
I have five fields that will be for mileage in an expense
report. I want the mileage to be entered by the... more >>
SQL QUERY ANALYZER
Posted by Guesswho_m_eye at 12/4/2003 5:55:59 AM
Help me, pls..
How to DELETE record for tableA.field1 which matched to
tableB.field2 using sql query analyzer
... more >>
changing datatype from varchar to text
Posted by obscurr at 12/4/2003 1:46:38 AM
hi, I'm having trouble fetching all data from a varchar
field in php, and I'm told changing the datatype from
varchar to text will solve this. My concern is that since
my table is already filled with data, something will go
wrong if I alter the datatype now.
Will I get into trouble or ca... more >>
Carriage return in a field of text data type
Posted by mtuan at 12/3/2003 6:24:52 AM
I have a query that select a column of text data type.
SOME of the returned records are with a carriage return at
the end. It becomes a problem when I have the query
result saved as a text file. How do I get rid of the
carriage returns?... more >>
How can I get Next date of the specified day name
Posted by Bhadresh Patel at 12/2/2003 9:22:13 PM
I want to display the next date of the specified day name
Like in Oracle NEXT_DAY function. I'm migrating Oracle
Query to SQL server. Query is having NEXT_DAY() function
in oracle. How do I convert it to SQL SERVER. Please send
me the example query in SQL SERVER.
for example
Today is w... more >>
Money Fromat
Posted by Darren at 12/2/2003 10:41:16 AM
I have a databse with numerous columns in it. I am
outputting the dtat to an ASP page using the Frontpage
wizzard. I am using a custom query. It looks like this:
SELECT
break_mon, break_tue, break_wed, break_thu, break_fri,
break_sat, break_sun,
break_mon+break_tue+break_wed+break_t... more >>
=> ALTER TABLE stmt conflicted with COLUMN FK constrt
Posted by Rhonda Fischer at 12/1/2003 7:31:28 AM
Hello,
On trying to reinstate some lost joins between tables
I receive the error msg:
"Unable to create relationship FK_Delivery Discrepancy
_Suppliers' ODBC error: [MS][ODBC SQL] ALTER TABLE
statement conflicted with COLUMN FK constraint
FK_Delivery Discrepancy_Suppliers'"
... more >>
|