![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#3
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#4
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#5
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#6
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#7
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#8
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#9
| |||
| |||
|
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx |
|
SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit |
#10
| ||||
| ||||
|
|
Why are you converting date/time values to varchar? What are you actually trying to achieve here? The date column in Oracle is defined as TIMESTAMP(6) and the one in |
|
When do you expect CONVERT(VARCHAR,getdate(),101) to be null? That was on oversight.Sorry. |
|
The transformation around the InsertDate column makes the resulting column read-only if you intend to use the query as a destination What other options do I have? When I directly select the name as |
|
select TrxID, ProdSKU, AcctNum, ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate from Audit_Trx Why are you converting date/time values to varchar? What are you actually trying to achieve here? When do you expect CONVERT(VARCHAR,getdate(),101) to be null? SELECT Trxid,product,acctnum, TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate from TranAudit The transformation around the InsertDate column makes the resulting column read-only if you intend to use the query as a destination. ML --- Matija Lah, SQL Server MVP http://milambda.blogspot.com/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |