I want to create a simple function that will take the datetime and convert it to
14-AUG-2013.
Now the current select works fine until we get to the start of the month
and it shows
1-AUG-2013
but is there any way to make it show
01-AUG-2103
SELECT DATENAME ( DAY, GETDATE()-13 ) + '-' +...
Hi trying to send a file to a folder and having a few issues !
SQL2012
Error = [Microsoft][SQL Server Native Client 11.0]Unable to open BCP host data-file
Exec master..xp_cmdshell 'bcp "select name from sysobjects" queryout "\\SERVERNAME\FileDrop\out.txt" -c -T -S'
I have also tried the...
Hi In need of help or a bit of advice in the way forward
I have a 50 row table mill table with over 100 columns and want to do a merge now the first method is accpetable although a little cluncky , I als have concern over time . I then thought of using on the when matched trying checksum to...
Hi having a little bit of an issue and wondered if its possible to do soemthing better??
so create table new_tbl (id int, basket varchar(10), Calc numeric)
insert into new_tbl
values (1, 'Test', 123.12)
, (2, 'Test', 456.78)
, (3, 'Test', 901.12)
My question is the only way...
HI
Was looking at creating a table where to use the default constraint.
CREATE TABLE Customer
(
CustomerID INT CONSTRAINT pk_customer_cid PRIMARY KEY,
CustomerName VARCHAR(30),
CustomerAddress VARCHAR(50) CONSTRAINT df_customer_Add DEFAULT 'UNKNOWN'
)
If I insert
Insert into...
HI
I'm in need of some help grouping some data
partNo Qualification SequentialNumber SortOrder Sets
877 Vehicle Equipment 10801 00003 1
877 To construction year 10801 00004 1
877 Block Separation 10801 00005 1
877 To construction year 10801 00006 2
877...
HI All
I was wondering if the following syntax
cpio -ivt -C32768 < /dev/st0 /data/jvedi/jv-ediinp
is the best way to find this file ( jv-ediimp) on my tape as its taking ages!! I also get the message
cpio: warning: skipped 9373909 bytes of junk
cpio: warning: skipped 594005 bytes of junk...
Ive joined it on to a calendar table but what condition can you use to select the 05/06??
NULL NULL 2011-07-03 00:00:00
NULL NULL 2011-07-04 00:00:00
DO 2011-07-05 00:00:00 2011-07-05 00:00:00
DO 2011-07-06 00:00:00 2011-07-06 00:00:00
NULL NULL NULL 2011-07-07 00:00:00
DO 2011-07-08 00:00:00...
Got the first one
S DO S By
select distinct COLA, COLB, COLC
into #s1
from table
and CODE = ('DO')
select distinct COLA, COLB, COLC
into #s2
from table
and CODE = ('S')
Select * from #s1 a inner join #s2 b on a.COLa = b.colB-1
inner join #s2 c on a.fk_pemast = b.fk_pemast
and...
I am sure this is easy but I'm really unsure in how to approach this
Col a Col B Col c
2011-07-03 00:00:00 B Y
2011-07-04 00:00:00 S Y
2011-07-05 00:00:00 DO N
2011-07-06 00:00:00 S Y
2011-07-07 00:00:00 DO N
2011-07-08 00:00:00 S Y
2011-07-09 00:00:00 B Y
What I need is...
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.