all groups > sql server (alternate) > november 2004
Filter by week: 1 2 3 4 5
Is a subselect possible on a stored procedure
Posted by kjc at 11/30/2004 10:29:13 PM
I have a stored procedure what produces N number of rows.
The rows are ordered by a cataegoryType as follows
catA
catB
catC
What is needed to do on the C++ code side is break these out into
their respective categories by iterating through the rows and checking
the category ... more >>
Tricky SELECT and ORDER BY
Posted by theintrepidfox NO[at]SPAM hotmail.com at 11/30/2004 8:26:25 PM
Dear Group
I wonder whether you can push me in a direction on how to design the
following statement. I'm looking for a SELECT with some tricky ORDER
BY.
The database table looks like this:
MenuID TabText SubTabID TabOrderID
------- ----------- ----------- -----------
1 ... more >>
counting the inserts and updates on a table in a sql server database
Posted by vthalakola NO[at]SPAM yahoo.com at 11/30/2004 6:45:55 PM
Hello,
Can someone point me to getting the total number of inserts and updates on a table
over a period of time?
I just want to measure the insert and update activity on the tables.
Thanks.
- Vish... more >>
How to change TrimTrailingBlanks from No to Yes
Posted by txt NO[at]SPAM emia.com.au at 11/30/2004 5:57:21 PM
Hi I've got many tables that has columns definition TrimTrailingBlanks = NO to
all char and varchar columns.
How can I set TrimTrailingBlanks to Yes without re-creating the tables.
Thanks... more >>
DTS Help with Update?
Posted by jtvinar NO[at]SPAM yahoo.com at 11/30/2004 5:25:58 PM
I'd like to create a DTS package to update records within a table
leaving other information stored in those records as is. For example,
table a has a record with 5 columns where 3 are null. An external
source has the non-null values for those 3 columns. Can anyone help
with some general steps... more >>
What is a cursor?
Posted by seearoomhawaii NO[at]SPAM resonant.com at 11/30/2004 3:17:41 PM
I had a friend write a stored procedure to perform a function for one
of my clients. What he wrote doesn't fully do what I need, and I hope
to finish it myself. I have programming sense, but not so much with
SQL.
I'm trying to figure out the code, and he has used something called a
"cursor." ... more >>
dumbest question of the day: run a simple query and save the results into a text file
Posted by emebohw NO[at]SPAM netscape.net at 11/30/2004 1:37:27 PM
Can someone demonstrate a SIMPLE way to do this that does not require
additional functions or stored procedures to be created? Lets say I
want to execute the following simple query - "select * from clients" -
and save the results to a text file, we will assume c:\results.txt
How can I do this ... more >>
relationships as a table
Posted by Vinodh Kumar P at 11/30/2004 1:05:53 PM
I have the tables tblEmployees and tblProjects.
tblProjects has one column called Percentagetime, to hold the percentage of
time by an employee for a project.
My Question : Why should we introduce a 3rd table called
tblProjectsAndEmployees?
tblProjectsAndEmployees will have
1)EmployeeNum... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
MS Sql 2000 vs. Pervasive SQL
Posted by Chuy at 11/30/2004 11:30:55 AM
I am using Maximizer Enterprise 8.0 as my companies CRM solution. Currently
we are using the included Pervasive SQL that shipps with the product. Is
there someone out that who could tell me if there are any performance
benefits to switching the Pervasive Engine with a Microsoft SQL engine.
... more >>
Linking Scheduled Jobs
Posted by stuart_ferguson1 NO[at]SPAM btinternet.com at 11/30/2004 8:12:43 AM
I currently have 4 scheduled jobs which are all scheduled for 4
different days and was wondering if there was anyway these could be be
stopped automatically in the event of a job failure, consider the
example below
Monday
Job runs to produce a file requesting BACS Payments.
Wednesday
Job ... more >>
Query to get all user tables with columns
Posted by dag.o.johansen NO[at]SPAM gmail.com at 11/30/2004 6:12:59 AM
Hi,
I tried to create a simple view as follows
CREATE VIEW V_ALL_USERTABLE_COLUMNS
AS
(
SELECT
OBJ.NAME as TableName,
COL.NAME as ColName,
TYP.NAME AS TYPE
FROM
SYSOBJECTS OBJ,
SYSCOLUMNS COL,
SYSTYPES TYP
WHERE
OBJ.TYPE = 'U'
AND OBJ.ID = COL.ID
AND COL... more >>
Select-into with identity
Posted by newtophp2000 NO[at]SPAM yahoo.com at 11/30/2004 5:46:20 AM
I have the following query that has been working so far. I modified
it slightly to work from another source table (new_products). Now,
SQL Server complains that the identity is inherited already:
"Cannot add identity column, using the SELECT INTO statement, to table
'dbo.my_products', which ... more >>
Kaliedo
Posted by tbowden NO[at]SPAM pmsi-consulting.com at 11/30/2004 4:38:33 AM
Hello,
I wonder if anyone can help, I am trying to track down information on
a product called Kaleido.
Apparently it is a database/data warehouse reporting system written by
Shell, which then spun-off the company and sold it into a lot of other
companies.
They don't seem to have a websit... more >>
Query that returns record that arn't duplicated in another table
Posted by luke.curtis NO[at]SPAM westoxon.gov.uk at 11/30/2004 3:18:02 AM
Hi.
I have a table (websitehits) which holds statistics about websites.
This table has a date field (datecounted). What I need is to create a
query which returns a list of dates between two date ranges (say a
year ago from today and a year from now) which only shows dates that
haven't been us... more >>
User Guest
Posted by audrey2 NO[at]SPAM email.it at 11/30/2004 2:00:16 AM
Nel database "master" ho mappato, per errore, l'utente "guest" su un
utente sql "XXX" creato in SQLServer.
Questo tipo di impostazione non permette più di aver accesso con
l'utente anonimo "guest" (mappato su null) al db (con autorizzazioni
limitate al ruolo public).
Ho provato sia da EM che ... more >>
Enterprise Manager: defaults lost in import/export
Posted by steve at 11/30/2004 1:32:48 AM
Hi,
When I copy tables in a database from one server to another using
enterprise manager, everything copies ok, except for field defaults.
Has anyone seen this, and what is the solution?
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked... more >>
table columns storage
Posted by hopehope_123 NO[at]SPAM yahoo.com at 11/29/2004 10:41:08 PM
Hi ,
This is related to datawarehouse , data mining . We are told that data
mining tools such as spss or sas , need a large table which has lots
of columns inside . Based on our project , out final table which will
be used in data mining , has lots of computed values . The final
number of col... more >>
use column alias in another calculation
Posted by DC at 11/29/2004 2:51:30 PM
Is there a way to use a column alias in an another calculation within the
same query? Since I am using some long and complex logic to compute total1
and total2, I don't want to repeat the same logic to compute the ratio of
those two columns. I know that I can do a nested query, but that seems too... more >>
Data update
Posted by Alberto at 11/29/2004 12:12:06 PM
Hello all,
I'm new in this newsgroup and I apologise if my question has already done.
Let me knwo if FAQ is avaible somewhere.
I use msSQL server to manage data for a B2B portal.
Orginal data comes from as400 db2.
I need to update msSQL data from db2 source.
I used MetaDataService exec... more >>
Help! SQL Collation
Posted by sjoshi NO[at]SPAM ingr.com at 11/29/2004 11:11:16 AM
Hello All
I'm a bit confused about collation settings so needed some info. on
it. My database server is currently using SortOrder as
Latin1-General, case-insensitive, accent-sensitive,
kanatype-insensitive, width-insensitive for Unicode Data, SQL Server
Sort Order 52 on Code Page 1252 for non... more >>
SELECT and UPDATE in the same query
Posted by Mattias Yngvesson at 11/29/2004 8:14:45 AM
I have a table with only one row to get unique ID-numbers. To get the next
ID-number I have to increase the number in the row: first, get the number
from the database, and then do the update.
Some ASP-code:
Set rs = db.execute("SELECT id FROM tbl_id")
id = rs("id")
db.execute("UPDATE... more >>
combine 2 queries
Posted by avitalnagar NO[at]SPAM walla.co.il at 11/29/2004 7:29:17 AM
Hi,
I have 2 queries that I need to join. I have the following tables:
attendancelog :
headerid
reportmonth
attlogstuds:
headerid
sid
class:
sid
class
status
yearcode
logdate
cdate
mid
The result must return all the classes that appear in query2 but not
in query1.
I am no... more >>
email being sent, but no message
Posted by jsa1981 NO[at]SPAM hotmail.com at 11/29/2004 2:18:51 AM
I have setup an email notifications system, that basically takes each
row from a table and sents out an email according to the data in that
row. The emails get sent, with the subject being filled as expected.
Only problem is that sometimes there is no message.
Here is the stored procedure that... more >>
Use TSQL to create a data matrix
Posted by Andrew Chanter at 11/29/2004 12:05:57 AM
I am developing a SQL database to cover operations that were previously
handled in a spreadsheet, and need to create a view or procedure that
presents data into a matrix format similar to what the users are currently
working with. There must be a way I can create this using Transact SQL but
I c... more >>
Update Table
Posted by jonascasberg NO[at]SPAM yahoo.com at 11/28/2004 8:48:47 PM
Hi,
I got a new SQL Server database and are in the process of porting my
Access databases to my new SQL Server. I have worked with Access and
Oracle in the past but I am new to the SQL Server environment. I have
a tool called ConVersion that is helping me rewrite my queries in
Access into SQL... more >>
Storing japanese characters
Posted by fake_healer NO[at]SPAM hotmail.com at 11/28/2004 6:34:47 PM
I'm trying to make a site work for japanese characters. It works fine
except for the alerts in javascript.
The characters are stored in unicode, as this;
'コミック全巻配'
Those unicode characters are translated by the browser, but not in the
alert.
... more >>
Triggers
Posted by Mark Flippin at 11/27/2004 10:08:13 PM
I'm just starting to use triggers in my databases and find the support
in Enterpise Manager lacking.
Using Enterprise Manager and Query Analyzer you can maintain the
triggers, but it's cumbersome.
Are there better tools for creating and managing triggers?
Mark Flippin
... more >>
link to access.mdb
Posted by nando NO[at]SPAM consolidated.net at 11/27/2004 6:01:15 PM
i'm new to sql server.. i have searched google / help, but can't find
what i need..
basically i just need a "how to" on creating an sql view in an sql
database using an access.mdb
how do bring an access.mdb table into an sql view so i can create links
w/ other sql tables
... more >>
MS SQL Server JDBC Driver Type 2 and Driver Type 4 Differences
Posted by agupta NO[at]SPAM in.ibm.com at 11/26/2004 9:59:03 PM
Hi,
Could some please tell me whether Microsoft provides Type 2 and Type 4
jdbc driver ? For Type 4 MS provides
com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the
cofiguration required for type 2 driver and what driver class files
required ?
Its very urgent to me please reply.... more >>
Store procedure's debug
Posted by saimon at 11/26/2004 8:56:56 PM
While I debugging a SP, I try to catch the value of local variable ( DECLARE
@ls_where VARIANT(8000) ) but I see that is not completely, but truncate.
The SP works correctly ... how can I catch the completely value of the local
variable ?
I have The same result if I Print the variable.
Thx
... more >>
audit trail...
Posted by heruti NO[at]SPAM lycos.com at 11/26/2004 3:12:26 PM
Hi...
A much lamented question, I guess..
I'm trying to create a simple audit trail.
log the changes to an SQL 2000 table, so that they are written into a
mirror table. The entire record, only the updated one, i.e. if say
only one field changes, the audit table will be inserted with one
rec... more >>
Technique for concurrent access?
Posted by Robin Tucker at 11/26/2004 2:18:10 PM
I've been asked to turn our single-user database system into a multi-user
system. At present, each user has a copy of the MSDE on their desktop
machine and uses our program to access it. In future, we would like to
centralise our MSDE instance and allow multiple users to access it. In
ord... more >>
LIMIT in MS SQL ??!!
Posted by Urban at 11/26/2004 1:13:48 PM
hi,
I have a question.
Maybe You know the equivalent to command LIMIT from MySQL
I couldn`t find something like this in MS SQL
PS
I try to display 10 records begining form e.g. 4 sort by id
something like: "SELECT * FROM table WHERE name=... LIMIT 4, 10 ORDER BY id"
in MySQL
thanx,
Urb... more >>
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Posted by tony.despain NO[at]SPAM gmail.com at 11/26/2004 10:33:29 AM
Anyone,
I have a user "john" whose machine is part of the "job" domain. He is
trying to establish an odbc connection to an MS SQL 2000 server on the
"school" domain. He uses Windows authentication to establish the odbc
connection however it gives the error "Login failed for user '(null)'.
... more >>
locking and rowid
Posted by Tenkre at 11/26/2004 10:21:19 AM
Hello!
1. How can I know exactlly what row is locked? Is data in "resource"
column of sp_lock usable? For example, resource = 03000d8f0ecc
51 14 0 0 DB S
GRANT
51 14 277576027 1 KEY (03000d8f0ecc)
X GRANT
51 14 277576027 1 PAG 1:1112
IX GRANT
51 14 277576027 0 TAB
IX G... more >>
if..then
Posted by avitalnagar NO[at]SPAM walla.co.il at 11/26/2004 7:58:17 AM
Hi,
I have a sql query with cases. I need to add a condition that if
hasamafactor=5 then display only cases m11-m14 else display the rest.
Of course sum ( kamut) as total4mosad
has to be only for the relevant cases and not all of them.
CREATE PROCEDURE [dbo].[MisgeretMosad_Sum]
(@... more >>
sql7\sql200 connectivity
Posted by nick.fletcher NO[at]SPAM apdcomms.com at 11/26/2004 1:52:23 AM
Im trying to access a sql200 database from a sql7 hosted stored
procedure and this is not working. I know that SQL7 is not compatible
with the MDAC for SQL 2000. Does anyone know if this is what is
causing me my problems and if so is it possible to upgrade the SQL7
MDAC without breaking it?
T... more >>
common UPDATE syntax for SqlServer and Oracle
Posted by Jan van Veldhuizen at 11/25/2004 11:44:54 PM
The UPDATE table FROM syntax is not supported by Oracle.
I am looking for a syntax that is understood by both Oracle and SqlServer.
Example:
Table1:
id name city city_id
1 john newyork null
2 peter london null
3 hans newyo... more >>
How to use a value from one recordset in another..?
Posted by Bane at 11/25/2004 10:43:38 PM
Im doing a select that should retrieve a name from one table and display the
number of correct bets done in the betDB (using the gameDB that has info on
how a game ended)
I want the "MyVAR" value to be used in the inner select statement without
too much hassle. As you can see im trying to get ... more >>
Executing Script Files From Transact-SQL
Posted by hp_howell NO[at]SPAM hotmail.com at 11/25/2004 9:28:02 PM
Hi,
I have my create statments for tables, procedures, views, etc in
individual Transact-SQL script files (.sql).
I wnat to write another script file that executes these scripts in the
correct order to create the database.
What is the syntax for executing script files from Transact-SQL?
... more >>
audit tables, delete triggers, and asp.net
Posted by encee5 NO[at]SPAM gmail.com at 11/25/2004 8:44:57 PM
i'm in a bit of a bind at work. if anyone could help, i'd greatly
appreciate it.
i have a web app connecting to a sql server using sql server
authentication. let's say, for example, my login/password is
dbUser/dbUser. the web app however, is using windows authentication.
so if I am logged... more >>
good table design...
Posted by toedipper at 11/25/2004 3:59:31 PM
Hello,
I am designing a table of vehicle types, nothing special, just a list of
unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor
etc etc
For the table design I am proposing a single column table with a field name
called vehicle_type and this will contain the vehic... more >>
Data replication from MSSQL to MYSQL
Posted by Luca at 11/25/2004 2:27:05 PM
Hi all.
I need to set a oneway replication of some data from MSSQL (running under
Windows 2000 server) to MYSQL (running under Linux).
Do you have some ideas to solve the problem?
Thank you
Luca
... more >>
Table Rowcount question
Posted by MissLivvy at 11/25/2004 8:28:22 AM
What's the difference between the rowcount column returned by:
DBCC SHOW_STATISTICS('table_name','primarykey')
and
SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2
Is the second query always accurate, whereas the 1st may not be if the table
stats are bad?
... more >>
SUM function with negatives values
Posted by jeanclaude.darchivio NO[at]SPAM getronics.com at 11/25/2004 8:10:05 AM
I have a table like this
order_id price
1 -1000
2 2000
3 3000
4 4000
I want to know the total of the order amount, I use this query
SELECT SUM(price)
FROM MyTable
and I get 8000 instead of 9000. The negative value seems to be read twice!
... more >>
Join stored procedures?
Posted by gjvdkamp NO[at]SPAM hotmail.com at 11/25/2004 7:18:55 AM
Hi all,
I have a challenge (not a problem). Simplifing it as far as i could, i
have this situation:
Table Persons
Id (PK)
Name
Table Scores
FK_Person (PK)
Period (PK)
Value
Now, i want to make a stored procedure that returns the scores for all
people in a certain... more >>
Peak During Time Period
Posted by dave NO[at]SPAM court-technologies.com at 11/25/2004 2:02:25 AM
Hi
I am hoping someone might be able to help me out with this.
I am writing a helpdesk system which records agents logging in and out
of the system.
I need to write a stored procedure which will show the peak number of
agents logged in concurrently during a specified time period. Within
... more >>
Seeking Testing Volunteers W2K MTS/DTC to VMS DECdtm Distributed 2PC Transactions
Posted by Richard Maher at 11/24/2004 6:58:42 PM
Hi,
I am seeking the help of volunteers to test some software that I've
developed which facilitates distributed two-phase commit transactions,
encompassing any resource manager (e.g. SQL/Server or Oracle) controlled by
Microsoft's Distributed Transaction Coordinator in a Windows2000
environme... more >>
SQL Delete Syntex
Posted by rc NO[at]SPAM die NO[at]SPAM you NO[at]SPAM !spammers.sandworm.demon.co.uk at 11/24/2004 6:49:09 PM
Hi
You can do a select top 1 * from <table>, my question is
how does one delete the row whithout having to do lots of where
clause ?
Is there a equivelant delete top 1 from <table>
Thanks
... more >>
View on different databases!!!
Posted by MerLiN at 11/24/2004 2:10:24 PM
How to make view based on two different databases.How do i access table
in other database.. Thanx... more >>
|