all groups > sql server programming > august 2003 > threads for friday august 29
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 31
How to find no. of Fridays in a month
Posted by Muhammad Usman at 8/29/2003 10:36:21 PM
Hi
Our Week ends on Friday. We want to calculate the Weekly
average on the basis of total no. of Fridays in a month.
Is there a way to calculate No. of Fridays in a month?
Thanks in advance
Muhammad Usman
IFFCO
musman@iffco.com... more >>
where can I find sql server system tables poster. thanks.
Posted by sunita at 8/29/2003 10:13:16 PM
date and time
Posted by Aurelio at 8/29/2003 7:18:44 PM
Hello to everybody!
i've just a little question...
how can I have updated time and date so that they are distinguished with
two different functions in SQL 2000 server??
thanks a lot!!
aurelio
... more >>
Problems applying SP3a
Posted by Venkat Venkataramanan at 8/29/2003 6:38:34 PM
When I tried to apply SP3a, the window said "Validating
password. Please wait..."
Well, I waited until it timed out and I got the error
message.
I made sure that I am able to start SQL Server and sign
with the sa credentials I supplied during the above
process.
Can somebody guide me... more >>
FULL Cascading a delete to itself: Reflexive relationship
Posted by James Cooke at 8/29/2003 5:54:12 PM
Hi all,
I have a single table that is related to itself. It is called Navigator.
[Tree] [int] IDENTITY (1, 1) NOT NULL ,
[ParentTree] [int] NULL ,
[NodeName] [char]
Each Navigator.ParentTree has 0:Many Navigator.Tree.
ie
Tree ParentTree NodeName
1 0 ... more >>
Problem Grouping Date Data
Posted by Alastair MacFarlane at 8/29/2003 5:17:00 PM
Dear All
I have a Table with 2 Columns among others:
ReadingDate - smalldatetime (Default Value: gatdate())
ReadingValue - tinyint (Values from 1 to 200)
I am trying to create an output like the following:
Date Total
30/08/2003 - 100
29/08/2003 - 110
28/08/2003 - 3
27/08/2... more >>
converting varchar to integer
Posted by Helena at 8/29/2003 5:06:19 PM
I have this data as a varchar datatype -
001
002
01
03
25
78
How do I load this in a integer field without loosing the
zeros on the right of the numbers?... more >>
Update from PriceList..?
Posted by Kent Johnson at 8/29/2003 4:26:38 PM
Hi all,
I have a table with Prices and I would like to update the Statistic table
with the prices:
PriceTable
Price FromMonth ToMonth
10 1=January 10=October
20 11=November 12=December
The price 10 is valid between January and October
Between November and December the price i... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Server Registration Indicator (Red Squiggle)
Posted by Kirby at 8/29/2003 4:02:35 PM
Hello All,
While doing a re-boot of one of our servers, the MMC console icon changed.
What usually is an Icon of a Mini-Server and a Right Facing Triangle was
replaced with a Mini-Server and a Red-Squiggle.
Does anyone know what this means, I looked up Status, Indicator, Red, and
several ot... more >>
Query to combine two 'many:one' tables
Posted by Jon Maz at 8/29/2003 3:40:47 PM
Hi,
I'm hoping someone can help me with an SQL query (SQL Server 2000).
There is a many:one relationship between my Cases table and my Clients table
(a Client can have n Cases). I'd like to combine the Cases and Clients
table to give the following result set:
++++++++++++++++++++
TARGET... more >>
To create SP to Exclude data of All tables
Posted by Frank Dulk at 8/29/2003 3:38:30 PM
I have more than 150 tables in my bd and I need to clean all of them, as I
can make that through a stored Procedure.
... more >>
Prob with a table
Posted by Martin vom Bruch at 8/29/2003 3:06:25 PM
Hallo i have a problem with a table. In this table is 1 column stand this:
@J
>3p2000002359FF8000000100000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
@J
>3p2100002359FF8000000500000000000000000000000000000000000000000000000000000
0... more >>
Does anybody know how to use ADO in Extended Stored Procedure?
Posted by Jasper at 8/29/2003 2:41:52 PM
Please,
I've tried everything I can think of to get the ADO Open connection
method to work within a VC++ unmanaged .NET AppWizard generated Extended
Stored Procedure. If anyone has gotten this to work, please feel free to
share. I do not want to resort to dblib (actually cannot use dblib i... more >>
Help with developing my idea
Posted by Yaheya Quazi at 8/29/2003 2:41:28 PM
Hi, I have this query that I run here is a sample run from
that query..
order_num item user
1 A A
2 B A
3 B A
4 A B
5 A B
I run a pretty complex query to get the result as the
above. Now my question is I want to send an email to User
A with all the rows that has the User A in it. Em... more >>
Very simple query...
Posted by Sender at 8/29/2003 2:32:01 PM
Using DTS Wizard I have created (and saved package) which copies data from a
notepad file to a SQL Server Table. I want to run this saved package
(package name mypackage) from a stored procedure. Please tell me in simple
steps...
... more >>
Stored procedure, insert, trigger...
Posted by Miroo_news at 8/29/2003 2:08:07 PM
Hi,
Is there a possibility to find out inside a trigger
if insert/update is inside a stored procedure
or is it standalone (e.g. in Query Analyzer)?
Regards,
Miroo... more >>
Problem Using Parameter in ALTER TABLE Stored Procedure
Posted by Larry Stinson at 8/29/2003 2:04:41 PM
I want my application to have the capability of adding columns to an SQL
table by providing parameters for the table name and the column properties.
I successfully wrote a stored procedure that adds a column to a table where
the column name and properties are stated directly in the SQL script. Bu... more >>
fill factor
Posted by PCH at 8/29/2003 1:41:59 PM
When you are creating or editing an index, you can set the fill factor %
which controls how much room on the page that sql should leave before
splitting.
my question is... if you give a value of 10%.. does that mean that only 10%
of the page is used, and 90 available, or that 10% is left free ... more >>
Datetime based error checks in store procs
Posted by Joshi at 8/29/2003 1:34:09 PM
Hello all,
I am re-thinking an existing buildout on a query which is
embedded within an application and need some help.
Here is what the query is supposed to do:
Get Sales details from the fields [1]. "FROMDATE" by user-
defined date range and; [2] "PAIDDATE" by user defined
Paid Da... more >>
UDF...thi is really difficult...
Posted by fabriZio at 8/29/2003 1:30:59 PM
How can I write an UDF that does this work
first input --> '0x800000000000000000000000000000'
second input --> '1'
output --> 'CAST(SUBSTRING(Column,1,1) AS INT) & 128 > 0'
I pass to UDF binary value and it returns me the clause CAST... according
the first bit is ON in mask.
Thx very... more >>
Query Processor Error
Posted by Mark Frank at 8/29/2003 1:05:36 PM
Hi all,
I got the following error I haven't seen before and am not
sure how to avoid it or how to remedy it. Any ideas would
be greatly appreciated. Thanks in advance.
Internal Query Processor Error: The query processor ran
out of stack space during query optimization.
Mark Frank... more >>
MSSQL2000 problem -view not working
Posted by Arthur Hoornweg at 8/29/2003 1:00:27 PM
Hello all,
sorry for the double-posting; I have just found out that
my problem is MSSQL specific and not ADO specific because
it happens in Enterprise Manager also.
I have a VERY VERY weird problem (MSSQL 2000 SP3 on Windows
XP pro SP 1)
In order to implement row-level security I have ... more >>
NText > Money
Posted by Henry at 8/29/2003 12:22:36 PM
What is the best way to convert a value stored in an NText column to Money.
Thanks
Henry
... more >>
breakpoints not working
Posted by jay at 8/29/2003 12:18:37 PM
When I attempt to debug a stored procedure in SQL2000
using Query Analyzer, my single step buttons are disabled
and breakpoints are ignored.
SQL is not running on a system account, and the procedures
are owned by the dbo with no duplicate names.
Obviously I'm missing something but I ca... more >>
T-SQL Weirdness
Posted by DaMan at 8/29/2003 11:54:50 AM
I have an SQL statement that I have abbrev. for example but it still blows
up. I essen. select data between
2 times in format HH:MM:SS. the @tmpvariables are NVARCHARS.
Here it is:
insert into mytable SELECT * FROM alarmevents
WHERE (convert(nvarchar,alarmevents.EventTime,108) between
@t... more >>
sql performance
Posted by Joel Russell at 8/29/2003 11:43:02 AM
Thanks in advance for the help. I've got a query that runs <1 second in
Query Analyzer but takes +10 seconds in my ASP page. I'm connecting via ADO
using a server side, open static, lock read only recordset type. I've tried
different combinations but nothing seems to work. The SQL is used for a... more >>
How do I insert a character in front of some data?
Posted by Sam at 8/29/2003 11:13:41 AM
Hi,
I wanto to insert some dashes "-" in front of category names. I know how to
insert just one dash. But the number of dashes I will insert also comes from
the database.
CategoryName -- Depth
Autmobile -- 0
Accessories -- 1
Batteries -- 1
Brand A Batteries -- 2
Brand ... more >>
Weird index behavior
Posted by YKaeder at 8/29/2003 10:59:37 AM
I have two tables that are at the core of most queries run
of a 8 GB SQL 2000 database. TABLE A has ~2.7 rows and a
primary key, clustered index on column A. TABLE B has ~5.4
rows and has a primary key, clustered index on column B.
Column A is also in TABLE B and there will be two matching
... more >>
update
Posted by Luis at 8/29/2003 10:41:44 AM
Hello,
The update is the following:
UPDATE TableA
SET Campo1=-1
WHERE (Id=57) AND (NOT EXISTS (select * FROM TableA where
Campo1=57))
I want to modify the "Campo1" of the row with ID=57 of the
TablaA if no exists nothing row in TablaA with "Campo1=57".
How can i make to nobody mod... more >>
assign error number to a variable
Posted by Mike at 8/29/2003 10:24:13 AM
Hi ,
Sorry I have another question about sql error number.
I can't figure out how to return @@error other than 0.
The following example doesn't work, I guess it's fatal error,
Is it possible that you could help me to find an example so it assign
@@error (non-zero) to variable @crazy?
Ano... more >>
bigint - Arithmetic overflow
Posted by Ram at 8/29/2003 10:04:40 AM
Hi,
I am getting
Server: Msg 232, Level 16, State 3, Line 1
Arithmetic overflow error for type int, value =
1152921504606847000.000000.
when I do
select power(2,60) in query analyzer
then I tried
declare @b bigint
select @b = power(2,60)
same error.
I tried
select c... more >>
Text is truncated
Posted by Dennis Davis at 8/29/2003 9:55:03 AM
How do I retrieve all data from a text field? SQL truncates the text when I
run a query against a text field.
Thanks
Dennis
... more >>
May I do this? CASE statement...
Posted by fabriZio at 8/29/2003 9:49:01 AM
SELECT
*
FROM
CASE @var
WHEN '1' THEN 'T1'
WHEN '2' THEN 'T2'
It doesn't work for me :(
Thx
--
==
fabriZio
... more >>
Which ADO server-side cursor type holds the least locks?
Posted by Ian Boyd at 8/29/2003 9:38:43 AM
i want to open a server-side cursor using ADO. My intention is to inside a
thread retreive all the rows as quickly as possible.
(i'm doing this with a server-side cursor instead of ADO's client-side
cursor, because i don't want ADO to have to download all the rows in the
result-set into local ... more >>
declare curW cursor for EXEC spMySproc - Trying to assign sp resultset to cursor variable
Posted by Dan at 8/29/2003 9:36:20 AM
In a stored procedure I am getting an error trying to assign a resultset =
from a stored procedure into a cursor variable.
Here is the line of code in particular..
declare curW cursor for
EXEC sp_Crosstab=20
@select =3D @temp,
@sumfunc =3D'count(partgroupid)',
@pivot =3D'sheetname',
... more >>
How to convert Char to Datetime
Posted by sharad at 8/29/2003 8:25:51 AM
Hello Fiends
I am taking the data from one database where the date is
stored in Char format i want to convert the same in
datetime while updating the database of mine.
please suggest.
best regards
Sharad... more >>
How I get the server date formate via query
Posted by umer at 8/29/2003 7:22:36 AM
Hi,
I need to know about some bult in functions or
procedure that will return me the servers date format.
Best Regads
Umer... more >>
Using ADO from within an Extended Stored Procedure
Posted by mevenson NO[at]SPAM adelphia.net at 8/29/2003 7:19:22 AM
I am trying to use ADO to write to tables in my database from within
an extended stored procedure. The problem I am having is on the
connect. I have a routine I am trying to use that works quite well for
me from a normal DLL or EXE based application created with the Visual
Studio App Wizard. It ... more >>
Square Carriage Return
Posted by Lynn at 8/29/2003 7:18:40 AM
I imported data from excel into SQL via DTS. The problem
is that all of the carriage returns/line feeds in excel
now show up as a square in SQL. How do I replace the
square with a true sql carriage return/line feed.
Thanks!... more >>
Index
Posted by sardinka at 8/29/2003 6:59:22 AM
If I need to support dubs but at the same time I need to
create index should I drop UNIQUE from following
statemnet?
CREATE UNIQUE CLUSTERED INDEX UCLINX_Account
ON Master (Number, GNumber, ANumber) ... more >>
TSQL, SELECT data from a textfile
Posted by TNL at 8/29/2003 6:00:05 AM
Hi,
I want to use TSQL to select data from a textfile
(newTab.txt), that delimited with ";".
SQL Server had some rowset functions, such as
OpenDataSource, Openrowset. But I don't know, how I can
use them for textfiles.
SELECT * from OpenDataSource('Microsoft.Jet.OLEDB.4.0',
'Data Sourc... more >>
Self Join or Not?
Posted by aaronss NO[at]SPAM the-mdu.com at 8/29/2003 5:38:12 AM
Here's a "quickie" for someone hopefully:
I have a table... many rows (a million plus).
Over the years it would appear that there has been poor migration
elements which meant that we have start dates which are identical.
The table would look something like this:
member_id 10001A... more >>
subquery(nested)
Posted by hrishikesh musale at 8/29/2003 3:04:21 AM
can we select more than one field in subquery?
thanks and regards
hrishikesh
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
|