Hi all,
My table have just few fields. I need to compare price in current week to prior week, determine PRICE DROP and put flag for this record.
WK_END SKU PRICE
-------------------------------------
07/18/03 5565317330 1.29
07/25/03 5565317330 1.29
08/01/03 5565317330 1.29...
I have to import to SQL server text file with field in exponential format:
|40|10|1|+3.00000000000000E+000|+6.70000000000000E+000|+6.70000000000000E+000|
Is any one aware of the best way to that? To import as CHAR and then convert to numeric? Too many fields to convert! Your help greatly...
Hi,
I have a very silly question
If I have three records
vndnumber vendorname
---------- --------------
296333 Kraft Inc.
296333 Kraft Inc
296333 Kraft Inter.
and I need to group by vndnumber and make one record from these three and I was told to take...
Hi, almost fanny, but
nothing works!
I have a numeirc field and value in this field are (examples):
112300
42101
52301
71901
It's total over 3 million records in this table.
How to convert this field to datetime?
Thank you
I have two related tables, Invoice Header and Invoice Detail. They have two key fields: Vendor# and Invoice#. What is the best way to find orphaned records - records in Detail table that have no match in Header table?
What is wrong with this syntax?
select
vnd_nbr = ltrim(f1),
vnd_name = ltrim(f2),
invnbr = ltrim(f3),
invdt = f4,
case when ltrim(rtrim(f5))='1' then
case when ltrim(rtrim(f6))='X' then
cast(f7*-1 as numeric(15,2))
else
cast('0' as numeric(15,2))
else
case when...
I need to build invoice table based on accounts payable table. Depends on value in some fields, I need to populate invoice amount field. Actualy I have a RPG program printout and I need to translate this program in SQL code. Part of RPG program adds line count to program. If record line for...
I have problem to convert CHAR data to smalldatetime.
My data value in table in format like "09-AUG-2000", this field size is CHAR(11). When I run ISDATE function to determine what's wrong, i have result 0, nothing wrong. I was able to convert to DATETIME after running same procedure...
How can strip trailing zeros from one of the field in my table, data type decimal(10,0), but string has different length.
Example of data values:
14080
140800
1408000
256479900
25647990
2564799000
230880
2308800
23088000
I need to use this field as a link, but data is not consistent. People...
Is Minus legal function in T-SQL?
select * from tableA
minus
select * from tableB
Table A has 1,000,000 records
Table B has 15,000,000 records
I have three key fileds for comparison, but if I do:
select * from tableA
minus
select * from tableB
where TableA.col1=TableB.Col1
and...
I have two tables table A and table B. They keep identical data, same fields, same datatype.
Table A has 1000000 records.
Table B has 55000 records.
I need all records from table B which not exist in table A.
How I can do this?
I have field in a table which has numeric(6,0)data type and has value range from 26 to 999999. I need to add leading zero's and have as finish result data type numeric(6,0). My values should be from 000026 to 999999
Example: 26 to 000026
154 to 000154
1008 to 001008
21009 to...
Is this syntax does not work on SQL SERVER 2000 for suspect database. I used it couple times on older versions of SQL.
USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES', 1
GO
RECONFIGURE
GO
update master..sysdatabases set status='256'
where name='MY DB'
SP_CONFIGURE 'ALLOW UPDATES', 0
GO
RECONFIGURE...
Hello all,
I do
"SELECT INTO" some fields from two tables, which have three key fields, using syntax "TBL1 left outer join TBL2 on TBL1.f1=TBL2.f1 and TBL1.f2=TBL2.f2 and TBL1.f3=TBL2.f3".
TBL1 has 2,800,000. I thought my new created table should have same number of...
I have two tables TBL1 and TBL2. Both have three key columns (they are not PK and FK, we have identity column asigned by the data load tool as PK ) Since all rows distinct because of identity column, What is the best way to check if it is one-to-one relationship between this two tables on key...
Hi all,
When I import client flat file to SQL Server using DTS, I have no errors, but my table missing 300 records. It's simple import using "data import wizard". I found few records in file, that missing in my table, and try to analyze it. We have UltraEdit tool, but I'm new to file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.