Click here to Skip to main content
14,976,129 members
Home / Discussions / Database
   

Database

 
GeneralRe: Sandwich Query For Employee Attendance using SQL Server 2005 Pin
DevParty11-Jun-21 1:20
MemberDevParty11-Jun-21 1:20 
QuestionLoad JSON file from network location Pin
Member 144746073-Jun-21 7:36
MemberMember 144746073-Jun-21 7:36 
AnswerRe: Load JSON file from network location Pin
Member 144746073-Jun-21 8:42
MemberMember 144746073-Jun-21 8:42 
AnswerRe: Load JSON file from network location Pin
Mycroft Holmes3-Jun-21 12:15
professionalMycroft Holmes3-Jun-21 12:15 
QuestionSQL Server 2010, smalldatetime insert Pin
jkirkerx1-Jun-21 14:52
professionaljkirkerx1-Jun-21 14:52 
AnswerRe: SQL Server 2010, smalldatetime insert Pin
Mycroft Holmes1-Jun-21 21:31
professionalMycroft Holmes1-Jun-21 21:31 
AnswerRe: SQL Server 2010, smalldatetime insert Pin
Victor Nijegorodov1-Jun-21 21:49
MemberVictor Nijegorodov1-Jun-21 21:49 
AnswerRe: SQL Server 2010, smalldatetime insert Pin
jkirkerx2-Jun-21 8:47
professionaljkirkerx2-Jun-21 8:47 
I thought about what you both said, and would like to say thanks and show gratitude as well.

I went back and keep the Select statement raw, took the convert out.
The dumped my CRUD function to add the record, and converted the calling function to SQL.
Then used PHP to convert the raw date object I picked up to a string, and declared it in SQL.

I suppose I could go back to my add CRUD function and do the conversion there instead
$result2 = sqlsrv_query($conn, $query2) or die(" setDbProjectCost " . LINE . " - " . $query2 . " - " . print_r(sqlsrv_errors()));
if (sqlsrv_has_rows($result2)) {
    $row2 = sqlsrv_fetch_array($result2);
    $addDateString = $row2[13]->format('Y-m-d H:i:s') . '.000';

    $query3 = "
    DECLARE @addDate AS VARCHAR(33) = '$addDateString';
    INSERT INTO [proj_cost] 
    VALUES ... @addDate
If it ain't broke don't fix it
Discover my world at jkirkerx.com

QuestionGet columns name Pin
_Flaviu27-May-21 23:55
Member_Flaviu27-May-21 23:55 
AnswerRe: Get columns name Pin
Victor Nijegorodov28-May-21 0:22
MemberVictor Nijegorodov28-May-21 0:22 
GeneralRe: Get columns name Pin
_Flaviu3-Jun-21 5:57
Member_Flaviu3-Jun-21 5:57 
GeneralRe: Get columns name Pin
Victor Nijegorodov3-Jun-21 20:13
MemberVictor Nijegorodov3-Jun-21 20:13 
GeneralRe: Get columns name Pin
_Flaviu3-Jun-21 20:37
Member_Flaviu3-Jun-21 20:37 
GeneralRe: Get columns name Pin
Victor Nijegorodov3-Jun-21 21:48
MemberVictor Nijegorodov3-Jun-21 21:48 
GeneralRe: Get columns name Pin
_Flaviu3-Jun-21 23:33
Member_Flaviu3-Jun-21 23:33 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 0:55
MemberVictor Nijegorodov4-Jun-21 0:55 
AnswerRe: Get columns name Pin
Gerry Schmitz4-Jun-21 7:02
mveGerry Schmitz4-Jun-21 7:02 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 7:21
MemberVictor Nijegorodov4-Jun-21 7:21 
GeneralRe: Get columns name Pin
Gerry Schmitz4-Jun-21 7:54
mveGerry Schmitz4-Jun-21 7:54 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 8:02
MemberVictor Nijegorodov4-Jun-21 8:02 
GeneralRe: Get columns name Pin
Gerry Schmitz4-Jun-21 9:01
mveGerry Schmitz4-Jun-21 9:01 
GeneralRe: Get columns name Pin
Victor Nijegorodov4-Jun-21 9:47
MemberVictor Nijegorodov4-Jun-21 9:47 
AnswerRe: Get columns name Pin
Mycroft Holmes4-Jun-21 12:43
professionalMycroft Holmes4-Jun-21 12:43 
QuestionSQL statements Pin
Erick Kaira27-May-21 8:09
MemberErick Kaira27-May-21 8:09 
AnswerRe: SQL statements Pin
Victor Nijegorodov27-May-21 8:40
MemberVictor Nijegorodov27-May-21 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.