all groups > sql server programming > may 2005 > threads for friday may 20
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
ntext problem
Posted by Ados at 5/20/2005 9:56:19 PM
Hi friends,
Sorry for my not perfect English.
I am new in sql, please help me with this problem.
I have a table preview and table products.
When the user clicks button "submit" all data from current posting in
preview have to be moved in table customers.
I am using this SP
CREATE... more >>
Creating a Password Retrieval Stored Procedure
Posted by EvanK at 5/20/2005 8:27:01 PM
I would like to create a stored procedure to pass a login name and password
to and have it verify the info and return a few fields of data back to the
calling function from a javascript page. I have tried a few things but can't
seem to verify the data and return a value to verify the data.... more >>
URGENT: Count(*)ing by field value
Posted by Kirsten at 5/20/2005 8:05:57 PM
Suppose I have MyTable:
A C
--------
1 x
2 x
2 y
3 x
I need to return COUNT() when (c = x) and when (c = y)
Does exists something like this?
SELECT COUNT(c = 'X') as CountX, COUNT (c = 'Y') as CountY
FROM MyTable
Thanks a lot!
Kirsten
... more >>
How do I Import textfile into SQL table using schema
Posted by hushtech at 5/20/2005 6:58:01 PM
I've been importing delimited textfile data into Access db using a Schema.ini
file
to describe the text like this
[Import.TXT] ( where the raw text is )
ColNameHeader=False
Format=CSVDelimited
CharacterSet=ANSI
Col1 = Field1 text width 255
Col2 = Field2 text width 255
Col3 = Field3... more >>
clearing log
Posted by Paul Pedersen at 5/20/2005 6:33:36 PM
As a relative newcomer to MSSQL, I've been playing around with a database,
adding and removing tables and tons of data. Now I'm ready to get down to
business.
I notice that the log (LDF file) is now three times the size of the database
itself. I'm pretty sure there's nothing in there that i... more >>
Putting 'NA' in a Money Datatype Column
Posted by Alex A. at 5/20/2005 3:51:03 PM
Hello,
Can anyone solve this prob...
BACKGROUND:
I have a column in my query that is calculated from money datatypes. To
avoid the divide by zero error I created a nice inline case statement that
places something else in that field instead. It works great with any number
of my choice. ... more >>
Access 97 to SQL
Posted by Dianne at 5/20/2005 2:46:12 PM
I have an Access 97 program that for many years linked to tables in another
database through drive letter access. Recently, because of speed, we
converted the Access tables to a SQL Server 2000 database and linked the
tables via an ODBC connection.
The program can read the tables but there... more >>
Malicious user erase a table
Posted by BED at 5/20/2005 1:44:08 PM
Please. I need to find the way to identify a user of the database that erase
a table. Since I can do it ?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Permissions...
Posted by Chris Marsh at 5/20/2005 1:22:40 PM
I have been looking for an example of applying permissions to all the
tables, view, stored procs, etc., in X sql database without much luck.
Clearly, it's simple to do for a single record but I have over 500 tables,
views, etc., that need to have permissions assigned for SELECT, INSERT,
UPDA... more >>
PK/UQ dumb question?
Posted by Paul Pedersen at 5/20/2005 12:42:53 PM
If there's a primary key constraint on a field, is it redundant to have a
unique key constraint on that same field?
... more >>
Problems Ordering Data
Posted by Richard at 5/20/2005 12:33:38 PM
Hey
I'm new to sql programming and looking on google isn't helping, so i thought
i'd try here!
I'm trying to do a sql query to select data from a table, and order it by
date, by putting data that's for today at the top, then the rest of them
under, in date order.
Here's my sql query s... more >>
maxdop 1 doesn't seem to work inside batch
Posted by Need more Zzzz at 5/20/2005 12:20:15 PM
I have several dynamically-generated queries that I would like to run with
the option(maxdop 1). However, if I put the queries with the option in either
Exec or sp_executesql, the option is ignored and the query runs with
parallelism (I've seen the degrees of parallelism and execution plan for... more >>
SQL Syntax for Insert INTO with subselect
Posted by Bill Nguyen at 5/20/2005 11:49:41 AM
I need to insert rows into a table like this:
INSERT INTO tableA
(Column1, Column2)
VALUES var1,var2)
WHERE var1 IN (SELECT column3 from table2)
Is this a legal T-Transact syntax? If not, what's the alternative?
THanks
Bill
... more >>
problem with output parameter stored procedure
Posted by Rich at 5/20/2005 11:46:12 AM
My stored procedure below compiled - not sure if it is even correct though.
I have to get the sum of a totalpaid column from one table and get the sum of
a totalpaid column from a second table. I need to return the difference of
these sums.
------------------------------------------------... more >>
Run an SP without adding anything to the transaction log?
Posted by adami at 5/20/2005 11:41:11 AM
Hi, I have an SP that will basically copy one table's data to another with
some transformation involved. The source table over 1 billion rows. The
machine has limited disk space and the transaction log will grow too large
and cause trouble.
Is there a way to run this SP and not have the tra... more >>
How to Insert Raw text into SQL table
Posted by tom d at 5/20/2005 11:34:14 AM
HI all,
I have raw text like these:
test1
test2
test3
....
I want to pass these text in to a SP from Query Analyzer as a paremeter and
the SP will handle to import them to a sql table exactly like the format I
passed in: In this case sql table should store:
test1
test2
test3
....... more >>
Slow queries using date parameters
Posted by George at 5/20/2005 11:23:38 AM
I'm rather new to learning T-SQL so I am probably missing something very
basic. I am noticing a definate slowdown in queries that use date parameters
than if I hard code dates into the stored procs.
For example I have a rather large set of queries in a single stored proc
that are build... more >>
Removing accented characters
Posted by MatthewR at 5/20/2005 11:23:33 AM
I have a list of French words and want to replace all of the accented
characters with unaccented characters. I could go through and replace each
accented character one at a time, but if I can somehow do it with collations
or some other automatic method, that would be great!... more >>
What's the best way to do Date Comparisons
Posted by Jim Abel at 5/20/2005 11:22:04 AM
I just ran into a snag with a comparison and would like suggestions of the
best way to correct the issue. I am comparing the CUTTENT_TIMESTAMP to a
saved date in the databse to establish a Yes or No answer. Because of the
Time portion of the DateTime data type my test fails at certain times ... more >>
Any special way to create an index
Posted by Vik Mohindra at 5/20/2005 9:13:31 AM
Hi All,
I am not very experienced in creating indexes. Is there a preferred way
one should follow. I created come indexes using EM. When I do that, and
hit save on the table, does the SQL server at that point generate the
indexes?
Thanks for your comments/help.
*** Sent via Developersdex... more >>
How to find what tables/views/functions a stored proc uses
Posted by Vik Mohindra at 5/20/2005 9:11:50 AM
Hi All,
Is there any way How to find what tables/views/functions a stored proc
uses.
Thanks for your help.
*** Sent via Developersdex http://www.developersdex.com ***... more >>
What Data mdf file log file ?
Posted by MAF at 5/20/2005 8:48:33 AM
Is there a quick SQL statement that I can run on a server to tell me what
mdf file and log file are associated with each database?
... more >>
Change collation with osql
Posted by szoli at 5/20/2005 8:09:02 AM
Hi,
I have an MS SQL Server 2000 database with collatio
'SQL_Hungarian_CP1250_CI_AS'. I wanted to run a script file to inser
values into one of my table by osql.exe the following way:
OSQL.EXE -U myUserID -P mypassword -d myDB -i "C:\myscript.sql" -n
The script was run successfully but t... more >>
Sproc works but doesn't work(?)
Posted by dj at 5/20/2005 7:19:21 AM
I have a sproc that clears and populates a table based on a number of input
parameters. I can call the sproc from QA, passing in the expected
parameters, and it runs fine and populates the table with some 90k rows.
When I can the sam sproc from my VB.NET program with the same parameters, in ... more >>
logic of sum() with joining the same table
Posted by POKEMON at 5/20/2005 3:41:03 AM
hi everybody
I have a question about the sum() function. when I join two tabeles and one
of them is the main table which I used in the from statement, sum function I
used for the joined table is giving the sum incorrectly(it is governing times
the other joined tabele). how can i eleminate t... more >>
Executing Dynamic SQL with out Select Permission
Posted by Prakash at 5/20/2005 2:00:15 AM
I have Procedures with Dynamic SQL, using EXEC(@sql) or Execute sp_executesql
@sql I am executing the dynamic sql, few of my procedures are getting input
parameter for table name and/or column names also. Now the database user is
modified with privileges, he has assigned only execute Permissio... more >>
Implementing cascade updates with instead of triggers
Posted by Razvan Socol at 5/20/2005 1:05:30 AM
Assuming the following DDL and sample data:
IF EXISTS (SELECT * FROM sysobjects WHERE name='Conversions')
DROP TABLE Conversions
IF EXISTS (SELECT * FROM sysobjects WHERE name='Units')
DROP TABLE Units
CREATE TABLE Units (
Code varchar(3) PRIMARY KEY,
UnitDescription nvarchar(50) NO... more >>
Query Response
Posted by Renjith at 5/20/2005 12:58:01 AM
Is there any way i can get , how much rows processed , how much left to
process , when executing a select/update/delete statement... more >>
Query help
Posted by Jack at 5/20/2005 12:49:09 AM
CREATE TABLE [dbo].[stuff] (
[c1] [char] (10)
)
insert into stuff values ('a')
insert into stuff values ('b')
Is there an easy way to get this output ?
a 1
a 2
a 3
b 1
b 2
b 3
Thank you in advance for your help
... more >>
Top5 plus others per time period
Posted by John Shiangoli via SQLMonster.com at 5/20/2005 12:00:00 AM
Hello All,
Please may I have your assistance on how I can improve the performance of
the following query?
At the moment it takes approximately 2 minutes which is far too long.
Any advice would be greatly appreciated
The original table structure is as follows
time_t deviceAId deviceBId Ap... more >>
Confused over query cost of execution plan
Posted by Khooseeraj Moloye at 5/20/2005 12:00:00 AM
I am a bit confused with the query cost information displayed by the
execution plan.
First request:
I am using a function to get the required data. The implementation is quite
complex so I am not posting it now. I hope it suffices to mention that the
function has a primary key defined on t... more >>
Create a View Command in Query Analyzer
Posted by A_PK at 5/20/2005 12:00:00 AM
Hey...a simple question that I forgot....
May I know how to create a view under Query Analyzer....below is what i have
type, but command succesfully, but view not created....wonder why ?
CREATE VIEW dbo.VIEW1
AS
SELECT * FROM Table1
... more >>
custom(and dynamic) record fields query
Posted by Pawel Rogozinski at 5/20/2005 12:00:00 AM
Hello,
I need to create a query that depends on custom fields (virtual).
First I'll try to outline the background.
I got Nodes table, that has NodeID field, and other (not really important)
fields like name, some boolean fields and so on.
Lets define node as an item for sale (just for the... more >>
Execute program
Posted by simon at 5/20/2005 12:00:00 AM
Hi,
I have exe program with user interface.
If I run it with parameter than it do something and after that it unload
itself.
So, it doesn't require any user interaction.
So I create a wsf script, which executes it.
If I dblClick (run) the script, the program openes, and shortly afte... more >>
Query question.
Posted by Jack at 5/20/2005 12:00:00 AM
CREATE TABLE [dbo].[stuff] (
[c1] [char] (10)
)
insert into stuff values ('a')
insert into stuff values ('b')
Is there an easy way to get this output ? The range of numbers could be
larger
a 1
a 2
a 3
b 1
b 2
b 3
Thank you in advance for your help
... more >>
SELECT SERVER_NAME.DB_NAME.TABLE_NAME
Posted by Sergey at 5/20/2005 12:00:00 AM
Hi,
In query analyzer I want use select statement with server and dbname
(without using "use" statment) like this:
SELECT * FROM SERVERNAME.DBNAME..sysobjects WHERE xtype = 'U'
When servername is my local machine name:
------------------------------------------------
Could not find server ... more >>
|