all groups > sql server programming > july 2004 > threads for saturday july 3
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
Compare 2 Tables Using Multiple Columns
Posted by at 7/3/2004 10:21:44 PM
I have 2 tables...
table1
-------
col1
col2
col3
col4
col5
col6
table2
-------
col1
col2
col3
col4
col5
col6
I have data in table 1 that I need to delete from table2 ONLY where col1,
col2, and col3 are the exact same in col1,col2,col3 in table2. Then I need
to insert all ro... more >>
ADO programming with C++ extensions question
Posted by Tyler at 7/3/2004 10:07:23 PM
i've got a question and i need your help!
i'm connecting to a SQL server 2000 database using ADO C++ extensions,
using the following parameters:
provider: SQLOLEDB
cursor: adUseServer, adDynamic
locking: adLockOptimistic
the table i'm working with has 51 fields, no autonumbers, nothing ... more >>
Question with dates
Posted by Zwi2000 at 7/3/2004 9:41:38 PM
Hi,
I have the follwing sql, the problem is that I am trying to bring up all
records which date is equal to getdate().
The problem seems to be that the "date" which is a timedate field compares
getdate and the time too, do I dont get any matches. How can I compare the
dates only ?
SQL:
... more >>
Exec Stored procedure issue.
Posted by SqlJunkies User at 7/3/2004 7:16:27 PM
Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax
convert(int, ' " &[Forms]![CCN Entry/Edit]![Customer]&"')
but I get an error message saying that there is a suntax
error to convert varchar to int.
Doe... more >>
Creating table from Cross tab query
Posted by Jack at 7/3/2004 4:07:01 PM
Hi,
I have the result of a cross tab query as a table imported from excel spreadsheet. However, I need to transform this table in a form from which cross tab query can be done i.e. the source table of a cross tab query. Is there any article or suggestion to allow me to do that. Thanks.... more >>
SQL Server 2000 ( Date Comparison)
Posted by Kishore Shevate at 7/3/2004 1:14:02 PM
There are two dates ,23/12/1923 and 23-Dec-23 , I want to compare these two dates. Problem is that while comparing it with format dd-mm-yyyy , second date's century becomes the current century and for first date it is 1900 i.e two dates will become as 23-12-1923 and 23-23-2023 .
So how should we o... more >>
SQL Server 2000 (About Date Conversion)
Posted by Abhinesh jadhav (HCSS Pune) at 7/3/2004 1:05:01 PM
There are two dates as 25/12/1923 and 25-Dec-23 and i want to compare these two dates. Problem is that when i am converting second date to dd-mm-yyyy then it takes the current century where as first date's century is 1900.
So how should we compare these dates with date format dd-mm-yyyy ?
Again... more >>
Returning One line for the same trans_no when some columns contain different data
Posted by Linda at 7/3/2004 12:18:22 PM
Hi,
In Access I can use the group statement to return only one record if there
are multiple lines with some different data for the same trans_no. How can I
do this with SQL. The Select Distinct only works when the lines are
completely the same.
TRANS_CD TRANS_NO DOLLAR_AMT VENDOR_CD VENDOR... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
adding constraint with alter table
Posted by Panks at 7/3/2004 11:41:49 AM
Hi ,
I have a table tab1 with column id12. Now i want to change the datatype and
add a constraint in the same statement. I wrote the following statement
(which i thought is correct ) is giving me an error - Incorrect syntax near
the keyword 'constraint'.
The statement is as follows
alter... more >>
query- show each table size in DB
Posted by rooster575 at 7/3/2004 11:12:37 AM
Can someone help me with a query to show actual disk usage of every table in
database 'x'?
[Ideally it would show size of each index as well]
Thanks a lot.
... more >>
HOW TO ATTACH DATABASE TO MSDE USING SQL-DMO ???
Posted by Robert at 7/3/2004 11:02:01 AM
I am having little problem with it , I am using installshield for setup program and at the end when I finish with msde installation I try to attach a database, I would like to use SQL-DMO , but I dont have much clue how can I do it I need some examples scripts
Thanks a lot
... more >>
SQCommand.ExecuteNonQuery and Script Files
Posted by ScanPlus at 7/3/2004 8:01:01 AM
Hi All:)
As part of my deployment project, I'm creating all my tables and their constraints through a script file.
But then stuff like views and stored procs is digested and processed on a one to one basis by .ExecuteNonQuery. For example if I have a script that generates View_A and View_B, SQLCom... more >>
Creating a Rank Value
Posted by Brien King at 7/3/2004 5:51:16 AM
I have been trying to figure out how to create a rank value inside a SQL
Statement and it's been quite challenging :-)
Here is an example of what I want:
Table:
GroupValue ScoringValue
----------------------- --------------------------
A ... more >>
Export relations from SQL Server Database to MS Access
Posted by Bose at 7/3/2004 5:44:22 AM
Hi
I have to make export of SQL Server Database to MS Access and I have
done it with the tables but now I need to transfer(export) the
relations, keys and indexes. Can any1 tell me how to read relations,keys
and indexes from SQL Server and convert them to MS Access.(it seams that
for crea... more >>
basic index question
Posted by Tim Seaburn at 7/3/2004 4:39:28 AM
I am executing the following statment:
select * from GL_Transactions
where acctgmonth = '12'
According to profiler,
with no index on acctgmonth it takes 9310 reads
After putting an index on acctgmonth it takes 9320 reads
I expected the index to save reads.
What's wrong?
TIA,
T
... more >>
|