all groups > sql server programming > september 2003 > threads for monday september 1
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
An apostrophe is messing me up (there has to be another way)
Posted by Fox at 9/1/2003 10:19:16 PM
The variable
SelectedTournament
will sometimes have an apostrophe within it.
When it does I get a 500 server error.
There have been some suggestions on how to
deal with this, such as doubling the single quotes
but there is no place to do this. Is there another
way to fix this right within the... more >>
SQLDMO question
Posted by M at 9/1/2003 9:41:59 PM
I am using SQLDMO in an attempt to get a list of all the tables in a
database.
I am able to get a list of all the system tables, but none of the user
tables. In fact, the call to dmosqlTables.ItemByID(i) fails for the user
tables with the error "The ID 'n' was not found in the Tables Collection,... more >>
Locking question
Posted by Loukas Marinis at 9/1/2003 8:52:21 PM
from vb6 using unbound forms i call a stored procedures which include just a
select statement like
select * from users where userId = @userId
Always return one row.
My question is how i can determine if this record is locked regardsless of
whether it will be changed or not; just to avoid ... more >>
update query
Posted by Sandra at 9/1/2003 6:40:43 PM
This update query is taking too long and the tables are
not big. All the proper keys are indexed. How can I
optmize it? Thanks in advance for any help.
T1=12875 records
T2=12875 records
T3=30 records
UPDATE T1
SET SOMECOLUMN=T3.SOMECOLUMN
FROM T2 LEFT JOIN T3
ON T2.SOMECOLUMN=T3.SOME... more >>
using RAND & functions
Posted by Harag at 9/1/2003 6:16:01 PM
Hi all
Win 2k sp4 | SQL 2k dev sp3
I've currently got a stored proc that will create a random password
and pass the password back to the calling stored proc. no problems
I thought that a function would be better to create the password as it
doesn't look at any tables or anything. So I cop... more >>
Interesting View
Posted by LIN at 9/1/2003 6:01:09 PM
HI
I want to create an table or view that will list all possible dates when I
am giving
From Date and To date
for Example If I have given 2003-09-01 and 2003-09-05 as from and to date
then
it should list out
2003-09-01
2003-09-02
2003-09-03
2003-09-04
2003-09-05
Need Advice
LIN
... more >>
HEX values
Posted by fabriZio at 9/1/2003 5:18:33 PM
How can I do the following UDF and/or SP:
input --> 0xC00000000000000000000000000000 (it means that first and second
bit are ON)
output --> a result set that have 2 rows: 1,2
input -->
0x0E000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000... more >>
index defrag all tables in db
Posted by Anders Vindal Eriksen at 9/1/2003 4:59:35 PM
Hello guys
I am using MSSQL 2000. I have a very slow database, which I would like to
repair. Any suggestions ?
I have checked the 'dbcc' comands. The "Indexdefrag" command only seems to
take one table at a time (specified in a parameter). Can I not run a
command, which "fixes" all tables at ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Can you help me to write this UDF?
Posted by fabriZio at 9/1/2003 4:22:20 PM
I would like to write an UDF that do this:
myUDFFunction(column, idcat)
I pass to my fn levelcat that is an integer (from 1 to 10) and idcat that
can be only a number (int) or a list of number (varchar)
myUDFFunction('Column1', 1) should give me --> ' CAST(substring(Column,1,1)
as ... more >>
Table Design Question
Posted by WJ at 9/1/2003 1:02:47 PM
I am designing a database to support the personalization of various reports
for schools. Currently, users (over 100,000) are members of groups (and
sub-groups). There are some 50 different reports that can be run. Each
report can contain any number of 1000 elements in it. I'm giving
permissi... more >>
Record selection by row or rowid
Posted by khurramAlam at 9/1/2003 12:49:36 PM
Hi all
is there any way in sql query to select a record through row or rowid. I
record selection by row number if any the please help me thanks in advanced.
Regards
khurram
... more >>
outer join and indexes
Posted by eXavier at 9/1/2003 11:23:05 AM
Hello,
I have query joining several tables, the last table is joined with LEFT
JOIN. The last table
has more then million rows and execution plan shows table scan on it. I have
indexed columns
on which the join is made. If I replace LEFT JOIN with INNER JOIN, index is
used and execution
takes... more >>
INSERT UPDATE trigger question
Posted by imani_technology NO[at]SPAM yahoo.com at 9/1/2003 11:02:19 AM
How would I write a trigger that updates the values of a Description
column to upper case for even IDs and to lower case for odd IDs? I
need this trigger to fire for INSERT and UPDATE events.... more >>
Query Question
Posted by at 9/1/2003 10:36:58 AM
Given the following set of tables and data, what would be the optimal query
to find customers that have certain packages, ie, customer1 has package 1
and customer3 has package 1 and 2? Thanks
Create Table CustomerOptions (
FKCustomerId Int Not Null
, FKOptionsId Int Not Null
)
Create T... more >>
Test versions
Posted by timb at 9/1/2003 9:30:17 AM
Hi,
Am looking for a script which will back up a database, and Restore it as
the same named database but suffixed with test. I can accomplish this using
enterprise manager for the backup and restore and then using query analyser
to run the alterdatabase script to change the logical filenames... more >>
variable problem
Posted by shau at 9/1/2003 8:31:27 AM
create proc spsearchsiccodearea
as
declare @siccode varchar
select
s.salesno,s.salesname,s.division,s.team,c.custno,c.name,c.d
ate_lastsale,c.numemploy,c.ttlpcs,c.area,c.siccode,i.sicdes
c,
sum(d.qtyshp*d.netprice) as 'revenue'
from iuk_detail d
inner join iuk_sls s on d.salesno=s.salesno
... more >>
SP resulting in Timeout expired
Posted by Grace at 9/1/2003 5:38:19 AM
Hello,
From a VB .net application I'm calling an SQL stored
procedure and filling the results in an SQLDataReader,
whose results are returned to an ASP .Net page.
The procedure was running fine and all of a sudden it
started giving this error:
System.Data.SqlClient.SqlException: Timeout e... more >>
CSV Nesting and Parsing
Posted by nickrice NO[at]SPAM eml.cc at 9/1/2003 4:35:29 AM
Please excuse me if you find the following problem a bit irritating or
weird but its just a complex query I have in mind. Kindly do not
suggest normalising the table(s) as I wish to resolve it as is.
Ok, here's the situation, I've got two tables:
Table1.ID - Table1.PlaceHolderText
---------... more >>
Bulk Insert problem (again)
Posted by Mike at 9/1/2003 4:21:16 AM
Hi all,
I posted a similar problem last week but the response did
not solve the problem. Apologies for trying again but I'm
getting desperate here!
Whenever I run Bulk Insert from a t-sql statement (can't
use bcp unfortunately) it only transfers part of the csv
file I want to import. N... more >>
subsum
Posted by u50415039 NO[at]SPAM spawnkill.ip-mobilphone.net at 9/1/2003 3:27:59 AM
#temptable (order, name, activity and count):
1 mark1 null 0
1 mark1 movie 5
1 mark1 game 4
1 mark1 game 3
2 mark2 null 0
2 mark2 sports 6
2 mark2 game 4
2 mark2 game 3
2 mark2 candy 2
3 mark3 null 0
3 mark3 movie 2
3 mark3 game 4
... more >>
date query
Posted by shau at 9/1/2003 2:49:17 AM
I am trying to create a stored procdure that will get
results over a 12 month period starting from the current
date the procedure is run does anyone know how to do this
please... more >>
select query with group by
Posted by priri at 9/1/2003 2:28:57 AM
Hi ,
I want to display empid,fname,lname of those emp whose
name(fname,lname) appear only once. (I know select list
should have same field name as group by,but is there any
workaround)
create table emp(empid char(10),fname char(10),
lname char(10)) --empid ---key
data is as follows... more >>
SQL Help Needed
Posted by Peter at 9/1/2003 2:15:27 AM
Dear All,
I have a one-time conversion problem that I would like
your advice on.
I have a table which holds has four columns, ID, RoleID,
OwnerID, and RoleType, all are ints except for RoleType
which is a char(30)
The Data within this table is set as follows
ID RoleID OwnerID ... more >>
CONVERT function not working
Posted by desphera at 9/1/2003 2:13:15 AM
I have recently installed SQL Server 2000 (with SP3a) on
XP Pro. This was to upgrade from using Access. I am noe
trying to rewrite my SQL statements in my application to
suit SQL Server.
Previously I had a Format function around a date in Access
so now I am trying to use the Convert functio... more >>
Multiple Words Replace
Posted by Jason Davis at 9/1/2003 1:30:56 AM
Hi there,
Is it possible to get an highlighted screen (found words surrounded with
<b></b>) for multiple "hits"/keywords?
i.e, if -
DECLARE @q varchar(300)
SET @q = 'hello,world'
DECLARE @foo varchar(2000)
SET @foo = 'hello, this is a nice story about our world!'
I want to see some... more >>
Data table deployment
Posted by Mike S. at 9/1/2003 12:48:31 AM
I have a table of data that must be encrypted within the table itself. This
is part of an ASP.NET application which will be deployed at the same time.
The table of encrypted data is also fairly large. How does one go about
deploying a table of encrypted data?
Mike
... more >>
Best way to save space inside database?
Posted by Mirja at 9/1/2003 12:17:00 AM
Hi!
What's the best way to save space inside database? Is
there common routines to back up the data on rows (no
database backup)? I'm having float and char columns so
that the length of the whole row will be about 3K - can I
easily back up part of the data on the row - example all
the flo... more >>
|